diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..30fdb7b --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,10 @@ +# Code owners file. +# This file controls who is tagged for review for any given pull request. + +# For syntax help see: +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax + +* @googleapis/yoshi-java + +# The java-samples-reviewers team is the default owner for samples changes +samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..67e62e8 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,51 @@ +--- +name: Bug report +about: Create a report to help us improve + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +Please run down the following list and make sure you've tried the usual "quick fixes": + + - Search the issues already opened: https://github.com/googleapis/java-service-management/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. service-management version(s): + +#### Steps to reproduce + + 1. ? + 2. ? + +#### Code example + +```java +// example +``` + +#### Stack trace +``` +Any relevant stacktrace here. +``` + +#### External references such as API reference guides + +- ? + +#### Any additional information below + + +Following these steps guarantees the quickest resolution possible. + +Thanks! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..754e30c --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +**Is your feature request related to a problem? Please describe.** +What the problem is. Example: I'm always frustrated when [...] + +**Describe the solution you'd like** +What you want to happen. + +**Describe alternatives you've considered** +Any alternative solutions or features you've considered. + +**Additional context** +Any other context or screenshots about the feature request. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 0000000..9958690 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..575c370 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,7 @@ +Thank you for opening a Pull Request! Before submitting your PR, there are a few things you can do to make sure it goes smoothly: +- [ ] Make sure to open an issue as a [bug/issue](https://github.com/googleapis/java-service-management/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # ☕️ diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 0000000..1a23ea4 --- /dev/null +++ b/.github/blunderbuss.yml @@ -0,0 +1,7 @@ +# Configuration for the Blunderbuss GitHub app. For more info see +# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +assign_prs_by: +- labels: + - samples + to: + - googleapis/java-samples-reviewers \ No newline at end of file diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml new file mode 100644 index 0000000..47c2ba1 --- /dev/null +++ b/.github/generated-files-bot.yml @@ -0,0 +1,11 @@ +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]' diff --git a/.github/readme/synth.py b/.github/readme/synth.py new file mode 100644 index 0000000..7b48cc2 --- /dev/null +++ b/.github/readme/synth.py @@ -0,0 +1,19 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated the README for this library.""" + +from synthtool.languages import java + +java.custom_templates(["java_library/README.md"]) diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 0000000..dce2c84 --- /dev/null +++ b/.github/release-please.yml @@ -0,0 +1,2 @@ +releaseType: java-yoshi +bumpMinorPreMajor: true \ No newline at end of file diff --git a/.github/snippet-bot.yml b/.github/snippet-bot.yml new file mode 100644 index 0000000..e69de29 diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml new file mode 100644 index 0000000..f247d5c --- /dev/null +++ b/.github/trusted-contribution.yml @@ -0,0 +1,2 @@ +trustedContributors: +- renovate-bot \ No newline at end of file diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 0000000..7513aca --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,54 @@ +on: + pull_request: +name: auto-merge-readme +jobs: + approve: + runs-on: ubuntu-latest + if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + script: | + // only approve PRs from yoshi-automation + if (context.payload.pull_request.user.login !== "yoshi-automation") { + return; + } + + // only approve PRs like "chore: release " + if (!context.payload.pull_request.title === "chore: regenerate README") { + return; + } + + // only approve PRs with README.md and synth.metadata changes + const files = new Set( + ( + await github.paginate( + github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }) + ) + ).map(file => file.filename) + ); + if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) { + return; + } + + // approve README regeneration PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped PR!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach automerge label + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['automerge'] + }); diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml new file mode 100644 index 0000000..7c8816a --- /dev/null +++ b/.github/workflows/auto-release.yaml @@ -0,0 +1,88 @@ +on: + pull_request: +name: auto-release +jobs: + approve: + runs-on: ubuntu-latest + if: contains(github.head_ref, 'release-please') + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + debug: true + script: | + // only approve PRs from release-please[bot] + if (context.payload.pull_request.user.login !== "release-please[bot]") { + return; + } + + // only approve PRs like "chore(master): release " + if ( !context.payload.pull_request.title.startsWith("chore(master): release") ) { + return; + } + + // only approve PRs with pom.xml and versions.txt changes + const filesPromise = github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const changed_files = await github.paginate(filesPromise) + + if ( changed_files.length < 1 ) { + console.log( "Not proceeding since PR is empty!" ) + return; + } + + if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { + console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) + return; + } + + // trigger auto-release when + // 1) it is a SNAPSHOT release (auto-generated post regular release) + // 2) there are dependency updates only + // 3) there are no open dependency update PRs in this repo (to avoid multiple releases) + if ( + context.payload.pull_request.body.includes("Fix") || + context.payload.pull_request.body.includes("Build") || + context.payload.pull_request.body.includes("Documentation") || + context.payload.pull_request.body.includes("BREAKING CHANGES") || + context.payload.pull_request.body.includes("Features") + ) { + console.log( "Not auto-releasing since it is not a dependency-update-only release." ); + return; + } + + const promise = github.pulls.list.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open' + }); + const open_pulls = await github.paginate(promise) + + if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) { + for ( const pull of open_pulls ) { + if ( pull.title.startsWith("deps: update dependency") ) { + console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." ); + return; + } + } + } + + // approve release PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped release!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach kokoro:force-run and automerge labels + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['kokoro:force-run', 'automerge'] + }); diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..def8b3a --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,83 @@ +on: + push: + branches: + - master + pull_request: +name: ci +jobs: + units: + runs-on: ubuntu-latest + strategy: + matrix: + java: [7, 8, 11] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + - name: coverage + uses: codecov/codecov-action@v1 + with: + name: actions ${{matrix.java}} + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.bat + env: + JOB_TYPE: test + dependencies: + runs-on: ubuntu-latest + strategy: + matrix: + java: [8, 11] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/dependencies.sh + linkage-monitor: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - name: Install artifacts to local Maven repository + run: .kokoro/build.sh + shell: bash + - name: Validate any conflicts with regard to com.google.cloud:libraries-bom (latest release) + uses: GoogleCloudPlatform/cloud-opensource-java/linkage-monitor@v1-linkagemonitor + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: lint + clirr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: clirr \ No newline at end of file diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml new file mode 100644 index 0000000..c46230a --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,14 @@ +on: + pull_request: +name: samples +jobs: + checkstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Run checkstyle + run: mvn -P lint --quiet --batch-mode checkstyle:check + working-directory: samples/snippets diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..cc0bc34 --- /dev/null +++ b/.gitignore @@ -0,0 +1,17 @@ +# 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 new file mode 100644 index 0000000..05826ad --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,3 @@ +:: See documentation in type-shell-output.bat + +"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 0000000..85d1dfc --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,120 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Java version +java -version +echo ${JOB_TYPE} + +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C + +# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it +if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then + export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) +fi + +RETURN_CODE=0 +set +e + +case ${JOB_TYPE} in +test) + mvn test -B -Dclirr.skip=true -Denforcer.skip=true + RETURN_CODE=$? + ;; +lint) + mvn com.coveo:fmt-maven-plugin:check + RETURN_CODE=$? + ;; +javadoc) + mvn javadoc:javadoc javadoc:test-javadoc + RETURN_CODE=$? + ;; +integration) + mvn -B ${INTEGRATION_TEST_ARGS} \ + -ntp \ + -Penable-integration-tests \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + ;; +samples) + SAMPLES_DIR=samples + # only run ITs in snapshot/ on presubmit PRs. run ITs in all 3 samples/ subdirectories otherwise. + if [[ ! -z ${KOKORO_GITHUB_PULL_REQUEST_NUMBER} ]] + then + SAMPLES_DIR=samples/snapshot + fi + + if [[ -f ${SAMPLES_DIR}/pom.xml ]] + then + pushd ${SAMPLES_DIR} + mvn -B \ + -Penable-samples \ + -ntp \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + popd + else + echo "no sample pom.xml found - skipping sample tests" + fi + ;; +clirr) + mvn -B -Denforcer.skip=true clirr:check + RETURN_CODE=$? + ;; +*) + ;; +esac + +if [ "${REPORT_COVERAGE}" == "true" ] +then + bash ${KOKORO_GFILE_DIR}/codecov.sh +fi + +# fix output location of logs +bash .kokoro/coerce_logs.sh + +if [[ "${ENABLE_BUILD_COP}" == "true" ]] +then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/flakybot + ${KOKORO_GFILE_DIR}/linux_amd64/flakybot -repo=googleapis/java-service-management +fi + +echo "exiting with ${RETURN_CODE}" +exit ${RETURN_CODE} diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh new file mode 100755 index 0000000..5cf7ba4 --- /dev/null +++ b/.kokoro/coerce_logs.sh @@ -0,0 +1,38 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# This script finds and moves sponge logs so that they can be found by placer +# and are not flagged as flaky by sponge. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +job=$(basename ${KOKORO_JOB_NAME}) + +echo "coercing sponge logs..." +for xml in `find . -name *-sponge_log.xml` +do + echo "processing ${xml}" + class=$(basename ${xml} | cut -d- -f2) + dir=$(dirname ${xml})/${job}/${class} + text=$(dirname ${xml})/${class}-sponge_log.txt + mkdir -p ${dir} + mv ${xml} ${dir}/sponge_log.xml + mv ${text} ${dir}/sponge_log.txt +done diff --git a/.kokoro/common.cfg b/.kokoro/common.cfg new file mode 100644 index 0000000..314c8bd --- /dev/null +++ b/.kokoro/common.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. These will be in ${KOKORO_GFILE_DIR} +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# All builds use the trampoline script to run in docker. +build_file: "java-service-management/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/build.sh" +} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 0000000..ace89f4 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +function retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + + # store current flag state + flags=$- + + # allow a failures to continue + set +e + ${command} + exit_code=$? + + # restore "e" flag + if [[ ${flags} =~ e ]] + then set -e + else set +e + fi + + if [[ $exit_code == 0 ]] + then + return 0 + fi + + # failure + if [[ ${attempts_left} > 0 ]] + then + echo "failure (${exit_code}), sleeping ${sleep_seconds}..." + sleep ${sleep_seconds} + new_attempts=$((${attempts_left} - 1)) + new_sleep=$((${sleep_seconds} * 2)) + retry_with_backoff ${new_attempts} ${new_sleep} ${command} + fi + + return $exit_code +} + +## Helper functionss +function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } +function msg() { println "$*" >&2; } +function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 0000000..793f06c --- /dev/null +++ b/.kokoro/continuous/common.cfg @@ -0,0 +1,25 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-service-management/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg new file mode 100644 index 0000000..495cc7b --- /dev/null +++ b/.kokoro/continuous/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 0000000..87524e7 --- /dev/null +++ b/.kokoro/continuous/readme.cfg @@ -0,0 +1,55 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/python-multi" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/readme.sh" +} + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.log" + } +} + +# The github token is stored here. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + # TODO(theacodes): remove this after secrets have globally propagated + backend_type: FASTCONFIGPUSH + } + } +} + +# Common env vars for all repositories and builds. +env_vars: { + key: "GITHUB_USER" + value: "yoshi-automation" +} +env_vars: { + key: "GITHUB_EMAIL" + value: "yoshi-automation@google.com" +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 0000000..0fb8c84 --- /dev/null +++ b/.kokoro/dependencies.sh @@ -0,0 +1,89 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Java +java -version +echo $JOB_TYPE + +export MAVEN_OPTS="-Xmx1024m -XX:MaxPermSize=128m" + +# this should run maven enforcer +retry_with_backoff 3 10 \ + mvn install -B -V -ntp \ + -DskipTests=true \ + -Dclirr.skip=true + +mvn -B dependency:analyze -DfailOnWarning=true + +echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" +## Run dependency list completeness check +function completenessCheck() { + # Output dep list with compile scope generated using the original pom + # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. + # This is stripped from the output as it is not present in the flattened pom. + # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. + msg "Generating dependency list using original pom..." + mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// >.org-list.txt + + # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) + msg "Generating dependency list using flattened pom..." + mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt + + # Compare two dependency lists + msg "Comparing dependency lists..." + diff .org-list.txt .new-list.txt >.diff.txt + if [[ $? == 0 ]] + then + msg "Success. No diff!" + else + msg "Diff found. See below: " + msg "You can also check .diff.txt file located in $1." + cat .diff.txt + return 1 + fi +} + +# Allow failures to continue running the script +set +e + +error_count=0 +for path in $(find -name ".flattened-pom.xml") +do + # Check flattened pom in each dir that contains it for completeness + dir=$(dirname "$path") + pushd "$dir" + completenessCheck "$dir" + error_count=$(($error_count + $?)) + popd +done + +if [[ $error_count == 0 ]] +then + msg "All checks passed." + exit 0 +else + msg "Errors found. See log statements above." + exit 1 +fi diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg new file mode 100644 index 0000000..793f06c --- /dev/null +++ b/.kokoro/nightly/common.cfg @@ -0,0 +1,25 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-service-management/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg new file mode 100644 index 0000000..0048c8e --- /dev/null +++ b/.kokoro/nightly/integration.cfg @@ -0,0 +1,37 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg new file mode 100644 index 0000000..709f2b4 --- /dev/null +++ b/.kokoro/nightly/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg new file mode 100644 index 0000000..cb24f44 --- /dev/null +++ b/.kokoro/nightly/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg new file mode 100644 index 0000000..b0c8981 --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-service-management/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 0000000..11a048a --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-service-management/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg new file mode 100644 index 0000000..495cc7b --- /dev/null +++ b/.kokoro/nightly/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg new file mode 100644 index 0000000..f254293 --- /dev/null +++ b/.kokoro/nightly/samples.cfg @@ -0,0 +1,38 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-docs-samples-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh new file mode 100755 index 0000000..f525142 --- /dev/null +++ b/.kokoro/populate-secrets.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2020 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + + +# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: +# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com +SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" +mkdir -p ${SECRET_LOCATION} +for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") +do + msg "Retrieving secret ${key}" + docker run --entrypoint=gcloud \ + --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ + gcr.io/google.com/cloudsdktool/cloud-sdk \ + secrets versions access latest \ + --project cloud-devrel-kokoro-resources \ + --secret ${key} > \ + "${SECRET_LOCATION}/${key}" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + fi +done diff --git a/.kokoro/presubmit/clirr.cfg b/.kokoro/presubmit/clirr.cfg new file mode 100644 index 0000000..ec57244 --- /dev/null +++ b/.kokoro/presubmit/clirr.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "clirr" +} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg new file mode 100644 index 0000000..6c6c4e8 --- /dev/null +++ b/.kokoro/presubmit/common.cfg @@ -0,0 +1,34 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.txt" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-service-management/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg new file mode 100644 index 0000000..e117bc8 --- /dev/null +++ b/.kokoro/presubmit/dependencies.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/dependencies.sh" +} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 0000000..dded67a --- /dev/null +++ b/.kokoro/presubmit/integration.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg new file mode 100644 index 0000000..709f2b4 --- /dev/null +++ b/.kokoro/presubmit/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg new file mode 100644 index 0000000..cb24f44 --- /dev/null +++ b/.kokoro/presubmit/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg new file mode 100644 index 0000000..b0c8981 --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-service-management/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 0000000..11a048a --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-service-management/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg new file mode 100644 index 0000000..495cc7b --- /dev/null +++ b/.kokoro/presubmit/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg new file mode 100644 index 0000000..f7d1eae --- /dev/null +++ b/.kokoro/presubmit/linkage-monitor.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/linkage-monitor.sh" +} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg new file mode 100644 index 0000000..6d323c8 --- /dev/null +++ b/.kokoro/presubmit/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg new file mode 100644 index 0000000..01e0960 --- /dev/null +++ b/.kokoro/presubmit/samples.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-docs-samples-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} \ No newline at end of file diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh new file mode 100755 index 0000000..acb9703 --- /dev/null +++ b/.kokoro/readme.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +cd ${KOKORO_ARTIFACTS_DIR}/github/java-service-management + +# 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-service-management \ + --synth-file-name=.github/readme/synth.py \ + --metadata-path=.github/readme/synth.metadata \ + --pr-title="chore: regenerate README" \ + --branch-suffix="readme" + +# autosynth returns 28 to signal there are no changes +RETURN_CODE=$? +if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]] +then + exit ${RETURN_CODE} +fi diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 0000000..b1c5de7 --- /dev/null +++ b/.kokoro/release/bump_snapshot.cfg @@ -0,0 +1,53 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + } +} + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-service-management/.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-service-management/.kokoro/release/bump_snapshot.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +} diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 0000000..ec03938 --- /dev/null +++ b/.kokoro/release/common.cfg @@ -0,0 +1,49 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Download trampoline resources. +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/trampoline" + +# Use the trampoline script to run in docker. +build_file: "java-service-management/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-keyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-passphrase" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-pubkeyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "sonatype-credentials" + } + } +} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh new file mode 100755 index 0000000..6e3f659 --- /dev/null +++ b/.kokoro/release/common.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Get secrets from keystore and set and environment variables +setup_environment_secrets() { + export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) + export GPG_TTY=$(tty) + export GPG_HOMEDIR=/gpg + mkdir $GPG_HOMEDIR + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg + export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') + export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') +} + +create_settings_xml_file() { + echo " + + + ossrh + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-staging + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-snapshots + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + +" > $1 +} \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg new file mode 100644 index 0000000..d03972c --- /dev/null +++ b/.kokoro/release/drop.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/release/drop.sh" +} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 0000000..5c4551e --- /dev/null +++ b/.kokoro/release/drop.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:drop -B \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg new file mode 100644 index 0000000..b60a0b6 --- /dev/null +++ b/.kokoro/release/promote.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/release/promote.sh" +} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 0000000..1fa95fa --- /dev/null +++ b/.kokoro/release/promote.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh + +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg new file mode 100644 index 0000000..2d06ef4 --- /dev/null +++ b/.kokoro/release/publish_javadoc.cfg @@ -0,0 +1,23 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/doc-templates/" + +env_vars: { + key: "STAGING_BUCKET" + value: "docs-staging" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/release/publish_javadoc.sh" +} + + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh new file mode 100755 index 0000000..4995f52 --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2019 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET}" ]]; then + echo "Need to set STAGING_BUCKET environment variable" + exit 1 +fi + +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-cloud-service-management +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# build the docs +mvn site -B -q + +pushd target/site/apidocs + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload docs +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET} diff --git a/.kokoro/release/publish_javadoc11.cfg b/.kokoro/release/publish_javadoc11.cfg new file mode 100644 index 0000000..1bd5ada --- /dev/null +++ b/.kokoro/release/publish_javadoc11.cfg @@ -0,0 +1,30 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# cloud-rad production +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2" +} + +# Configure the docker image for kokoro-trampoline +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/release/publish_javadoc11.sh" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} + +# Downloads docfx doclet resource. This will be in ${KOKORO_GFILE_DIR}/ +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/docfx" diff --git a/.kokoro/release/publish_javadoc11.sh b/.kokoro/release/publish_javadoc11.sh new file mode 100755 index 0000000..f142519 --- /dev/null +++ b/.kokoro/release/publish_javadoc11.sh @@ -0,0 +1,55 @@ +#!/bin/bash +# Copyright 2021 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +if [[ -z "${CREDENTIALS}" ]]; then + CREDENTIALS=${KOKORO_KEYSTORE_DIR}/73713_docuploader_service_account +fi + +if [[ -z "${STAGING_BUCKET_V2}" ]]; then + echo "Need to set STAGING_BUCKET_V2 environment variable" + exit 1 +fi + +# work from the git root directory +pushd $(dirname "$0")/../../ + +# install docuploader package +python3 -m pip install gcp-docuploader + +# compile all packages +mvn clean install -B -q -DskipTests=true + +export NAME=google-cloud-service-management +export VERSION=$(grep ${NAME}: versions.txt | cut -d: -f3) + +# V3 generates docfx yml from javadoc +# generate yml +mvn clean site -B -q -P docFX + +pushd target/docfx-yml + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload yml to production bucket +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} \ + --destination-prefix docfx- diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg new file mode 100644 index 0000000..d3826c0 --- /dev/null +++ b/.kokoro/release/snapshot.cfg @@ -0,0 +1,6 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/release/snapshot.sh" +} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh new file mode 100755 index 0000000..098168a --- /dev/null +++ b/.kokoro/release/snapshot.sh @@ -0,0 +1,33 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +source $(dirname "$0")/common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +# ensure we're trying to push a snapshot (no-result returns non-zero exit code) +grep SNAPSHOT versions.txt + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} diff --git a/.kokoro/release/stage.cfg b/.kokoro/release/stage.cfg new file mode 100644 index 0000000..96c59a9 --- /dev/null +++ b/.kokoro/release/stage.cfg @@ -0,0 +1,19 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-service-management/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-service-management/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-service-management" + } +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" +} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh new file mode 100755 index 0000000..16126d2 --- /dev/null +++ b/.kokoro/release/stage.sh @@ -0,0 +1,45 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Start the releasetool reporter +python3 -m pip install gcp-releasetool +python3 -m releasetool publish-reporter-script > /tmp/publisher-script; source /tmp/publisher-script + +source $(dirname "$0")/common.sh +source $(dirname "$0")/../common.sh +MAVEN_SETTINGS_FILE=$(realpath $(dirname "$0")/../../)/settings.xml +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +# attempt to stage 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn clean install deploy -B \ + --settings ${MAVEN_SETTINGS_FILE} \ + -DskipTests=true \ + -DperformRelease=true \ + -Dgpg.executable=gpg \ + -Dgpg.passphrase=${GPG_PASSPHRASE} \ + -Dgpg.homedir=${GPG_HOMEDIR} + +if [[ -n "${AUTORELEASE_PR}" ]] +then + mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml +fi \ No newline at end of file diff --git a/.kokoro/trampoline.sh b/.kokoro/trampoline.sh new file mode 100644 index 0000000..9da0f83 --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -eo pipefail +# Always run the cleanup script, regardless of the success of bouncing into +# the container. +function cleanup() { + chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + echo "cleanup"; +} +trap cleanup EXIT + +$(dirname $0)/populate-secrets.sh # Secret Manager secrets. +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.repo-metadata.json b/.repo-metadata.json new file mode 100644 index 0000000..46a40a4 --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "service-management", + "name_pretty": "Service Management API", + "product_documentation": "https://cloud.google.com/service-infrastructure/docs/overview/", + "api_description": "is a foundational platform for creating, managing, securing, and consuming APIs and services across organizations. It is used by Google APIs, Cloud APIs, Cloud Endpoints, and API Gateway. Service Infrastructure provides a wide range of features to service consumers and service producers, including authentication, authorization, auditing, rate limiting, analytics, billing, logging, and monitoring.", + "client_documentation": "https://googleapis.dev/java/google-cloud-service-management/latest/index.html", + "release_level": "beta", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-service-management", + "repo_short": "java-service-management", + "distribution_name": "com.google.cloud:google-cloud-service-management", + "api_id": "service-management.googleapis.com", + "requires_billing": true +} \ No newline at end of file diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..2add254 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..f2dbdee --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,139 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). + +## Building the project + +To build, package, and run all unit tests run the command + +``` +mvn clean verify +``` + +### Running Integration tests + +To include integration tests when building the project, you need access to +a GCP Project with a valid service account. + +For instructions on how to generate a service account and corresponding +credentials JSON see: [Creating a Service Account][1]. + +Then run the following to build, package, run all unit tests and run all +integration tests. + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-integration-tests clean verify +``` + +## Code Samples + +Code Samples must be bundled in separate Maven modules, and guarded by a +Maven profile with the name `enable-samples`. + +The samples must be separate from the primary project for a few reasons: +1. Primary projects have a minimum Java version of Java 7 whereas samples have + a minimum Java version of Java 8. Due to this we need the ability to + selectively exclude samples from a build run. +2. Many code samples depend on external GCP services and need + credentials to access the service. +3. Code samples are not released as Maven artifacts and must be excluded from + release builds. + +### Building + +```bash +mvn -Penable-samples clean verify +``` + +Some samples require access to GCP services and require a service account: + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-samples clean verify +``` + +### Profile Config + +1. To add samples in a profile to your Maven project, add the following to your +`pom.xml` + + ```xml + + [...] + + + enable-samples + + sample + + + + [...] + + ``` + +2. [Activate](#profile-activation) the profile. +3. Define your samples in a normal Maven project in the `samples/` directory. + +### Code Formatting + +Code in this repo is formatted with +[google-java-format](https://github.com/google/google-java-format). +To run formatting on your project, you can run: +``` +mvn com.coveo:fmt-maven-plugin:format +``` + +### Profile Activation + +To include code samples when building and testing the project, enable the +`enable-samples` Maven profile. + +#### Command line + +To activate the Maven profile on the command line add `-Penable-samples` to your +Maven command. + +#### Maven `settings.xml` + +To activate the Maven profile in your `~/.m2/settings.xml` add an entry of +`enable-samples` following the instructions in [Active Profiles][2]. + +This method has the benefit of applying to all projects you build (and is +respected by IntelliJ IDEA) and is recommended if you are going to be +contributing samples to several projects. + +#### IntelliJ IDEA + +To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in +[Activate Maven profiles][3] to activate `enable-samples`. + +[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account +[2]: https://maven.apache.org/settings.html#Active_Profiles +[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..261eeb9 --- /dev/null +++ b/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/README.md b/README.md new file mode 100644 index 0000000..8d6db5d --- /dev/null +++ b/README.md @@ -0,0 +1,143 @@ +# Google Service Management API Client for Java + +Java idiomatic client for [Service Management API][product-docs]. + +[![Maven][maven-version-image]][maven-version-link] +![Stability][stability-image] + +- [Product Documentation][product-docs] +- [Client Library Documentation][javadocs] + +> Note: This client is a work-in-progress, and may occasionally +> make backwards-incompatible changes. + +## Quickstart + + +If you are using Maven, add this to your pom.xml file: + +```xml + + com.google.cloud + google-cloud-service-management + 0.0.0 + +``` + +If you are using Gradle without BOM, add this to your dependencies +```Groovy +compile 'com.google.cloud:google-cloud-service-management:0.0.0' +``` + +If you are using SBT, add this to your dependencies +```Scala +libraryDependencies += "com.google.cloud" % "google-cloud-service-management" % "0.0.0" +``` + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +## Getting Started + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Service Management API [API enabled][enable-api]. +You will need to [enable billing][enable-billing] to use Google Service Management API. +[Follow these instructions][create-project] to get your project set up. You will also need to set up the local development environment by +[installing the Google Cloud SDK][cloud-sdk] and running the following commands in command line: +`gcloud auth login` and `gcloud config set project [YOUR PROJECT ID]`. + +### Installation and setup + +You'll need to obtain the `google-cloud-service-management` library. See the [Quickstart](#quickstart) section +to add `google-cloud-service-management` as a dependency in your code. + +## About Service Management API + + +[Service Management API][product-docs] is a foundational platform for creating, managing, securing, and consuming APIs and services across organizations. It is used by Google APIs, Cloud APIs, Cloud Endpoints, and API Gateway. Service Infrastructure provides a wide range of features to service consumers and service producers, including authentication, authorization, auditing, rate limiting, analytics, billing, logging, and monitoring. + +See the [Service Management API client library docs][javadocs] to learn how to +use this Service Management API Client Library. + + + + + + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Service Management API uses gRPC for the transport layer. + +## Java Versions + +Java 7 or above is required for using this client. + +## Versioning + + +This library follows [Semantic Versioning](http://semver.org/). + + +It is currently in major version zero (``0.y.z``), which means that anything may change at any time +and the public API should not be considered stable. + +## Contributing + + +Contributions to this library are always welcome and highly encouraged. + +See [CONTRIBUTING][contributing] for more information how to get started. + +Please note that this project is released with a Contributor Code of Conduct. By participating in +this project you agree to abide by its terms. See [Code of Conduct][code-of-conduct] for more +information. + +## License + +Apache 2.0 - See [LICENSE][license] for more information. + +## CI Status + +Java Version | Status +------------ | ------ +Java 7 | [![Kokoro CI][kokoro-badge-image-1]][kokoro-badge-link-1] +Java 8 | [![Kokoro CI][kokoro-badge-image-2]][kokoro-badge-link-2] +Java 8 OSX | [![Kokoro CI][kokoro-badge-image-3]][kokoro-badge-link-3] +Java 8 Windows | [![Kokoro CI][kokoro-badge-image-4]][kokoro-badge-link-4] +Java 11 | [![Kokoro CI][kokoro-badge-image-5]][kokoro-badge-link-5] + +Java is a registered trademark of Oracle and/or its affiliates. + +[product-docs]: https://cloud.google.com/service-infrastructure/docs/overview/ +[javadocs]: https://googleapis.dev/java/google-cloud-service-management/latest/index.html +[kokoro-badge-image-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-service-management/java7.svg +[kokoro-badge-link-1]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-service-management/java7.html +[kokoro-badge-image-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-service-management/java8.svg +[kokoro-badge-link-2]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-service-management/java8.html +[kokoro-badge-image-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-service-management/java8-osx.svg +[kokoro-badge-link-3]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-service-management/java8-osx.html +[kokoro-badge-image-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-service-management/java8-win.svg +[kokoro-badge-link-4]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-service-management/java8-win.html +[kokoro-badge-image-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-service-management/java11.svg +[kokoro-badge-link-5]: http://storage.googleapis.com/cloud-devrel-public/java/badges/java-service-management/java11.html +[stability-image]: https://img.shields.io/badge/stability-beta-yellow +[maven-version-image]: https://img.shields.io/maven-central/v/com.google.cloud/google-cloud-service-management.svg +[maven-version-link]: https://search.maven.org/search?q=g:com.google.cloud%20AND%20a:google-cloud-service-management&core=gav +[authentication]: https://github.com/googleapis/google-cloud-java#authentication +[developer-console]: https://console.developers.google.com/ +[create-project]: https://cloud.google.com/resource-manager/docs/creating-managing-projects +[cloud-sdk]: https://cloud.google.com/sdk/ +[troubleshooting]: https://github.com/googleapis/google-cloud-common/blob/master/troubleshooting/readme.md#troubleshooting +[contributing]: https://github.com/googleapis/java-service-management/blob/master/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-service-management/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-service-management/blob/master/LICENSE +[enable-billing]: https://cloud.google.com/apis/docs/getting-started#enabling_billing +[enable-api]: https://console.cloud.google.com/flows/enableapi?apiid=service-management.googleapis.com +[libraries-bom]: https://github.com/GoogleCloudPlatform/cloud-opensource-java/wiki/The-Google-Cloud-Platform-Libraries-BOM +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png diff --git a/codecov.yaml b/codecov.yaml new file mode 100644 index 0000000..5724ea9 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/google-cloud-service-management-bom/pom.xml b/google-cloud-service-management-bom/pom.xml new file mode 100644 index 0000000..832d926 --- /dev/null +++ b/google-cloud-service-management-bom/pom.xml @@ -0,0 +1,97 @@ + + + 4.0.0 + com.google.cloud + google-cloud-service-management-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 0.10.0 + + + Google Service Management API BOM + https://github.com/googleapis/java-service-management + + BOM for Service Management API + + + + Google LLC + + + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + + + scm:git:https://github.com/googleapis/java-service-management.git + scm:git:git@github.com:googleapis/java-service-management.git + https://github.com/googleapis/java-service-management + + + + true + + + + + sonatype-nexus-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + + The Apache Software License, Version 2.0 + http://www.apache.org/licenses/LICENSE-2.0.txt + repo + + + + + + + + com.google.cloud + google-cloud-service-management + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-service-management-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-service-management-v1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + \ No newline at end of file diff --git a/google-cloud-service-management/pom.xml b/google-cloud-service-management/pom.xml new file mode 100644 index 0000000..c758d7f --- /dev/null +++ b/google-cloud-service-management/pom.xml @@ -0,0 +1,111 @@ + + + 4.0.0 + com.google.cloud + google-cloud-service-management + 0.0.1-SNAPSHOT + jar + Google Service Management API + https://github.com/googleapis/java-service-management + is a foundational platform for creating, managing, securing, and consuming APIs and services across organizations. It is used by Google APIs, Cloud APIs, Cloud Endpoints, and API Gateway. Service Infrastructure provides a wide range of features to service consumers and service producers, including authentication, authorization, auditing, rate limiting, analytics, billing, logging, and monitoring. + + com.google.cloud + google-cloud-service-management-parent + 0.0.1-SNAPSHOT + + + google-cloud-service-management + + + + 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-service-management-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + org.threeten + threetenbp + + + + + junit + junit + test + 4.13.1 + + + + com.google.api.grpc + grpc-google-cloud-service-management-v1 + test + + + + com.google.api + gax-grpc + testlib + test + + + + + + java9 + + [9,) + + + + javax.annotation + javax.annotation-api + + + + + + + + + org.codehaus.mojo + flatten-maven-plugin + + + + \ No newline at end of file diff --git a/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerClient.java b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerClient.java new file mode 100644 index 0000000..2dd4ccd --- /dev/null +++ b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerClient.java @@ -0,0 +1,2148 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.api.servicemanagement.v1; + +import com.google.api.Service; +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.servicemanagement.v1.ConfigSource; +import com.google.api.servicemanagement.v1.CreateServiceConfigRequest; +import com.google.api.servicemanagement.v1.CreateServiceRequest; +import com.google.api.servicemanagement.v1.CreateServiceRolloutRequest; +import com.google.api.servicemanagement.v1.DeleteServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceResponse; +import com.google.api.servicemanagement.v1.EnableServiceRequest; +import com.google.api.servicemanagement.v1.EnableServiceResponse; +import com.google.api.servicemanagement.v1.GenerateConfigReportRequest; +import com.google.api.servicemanagement.v1.GenerateConfigReportResponse; +import com.google.api.servicemanagement.v1.GetServiceConfigRequest; +import com.google.api.servicemanagement.v1.GetServiceRequest; +import com.google.api.servicemanagement.v1.GetServiceRolloutRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsResponse; +import com.google.api.servicemanagement.v1.ListServiceRolloutsRequest; +import com.google.api.servicemanagement.v1.ListServiceRolloutsResponse; +import com.google.api.servicemanagement.v1.ListServicesRequest; +import com.google.api.servicemanagement.v1.ListServicesResponse; +import com.google.api.servicemanagement.v1.ManagedService; +import com.google.api.servicemanagement.v1.OperationMetadata; +import com.google.api.servicemanagement.v1.Rollout; +import com.google.api.servicemanagement.v1.SubmitConfigSourceRequest; +import com.google.api.servicemanagement.v1.SubmitConfigSourceResponse; +import com.google.api.servicemanagement.v1.UndeleteServiceRequest; +import com.google.api.servicemanagement.v1.UndeleteServiceResponse; +import com.google.cloud.api.servicemanagement.v1.stub.ServiceManagerStub; +import com.google.cloud.api.servicemanagement.v1.stub.ServiceManagerStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: [Google Service Management API](/service-management/overview) + * + *

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

{@code
+ * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+ *   String serviceName = "serviceName-1928572192";
+ *   ManagedService response = serviceManagerClient.getService(serviceName);
+ * }
+ * }
+ * + *

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

To customize credentials: + * + *

{@code
+ * ServiceManagerSettings serviceManagerSettings =
+ *     ServiceManagerSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * ServiceManagerClient serviceManagerClient = ServiceManagerClient.create(serviceManagerSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * ServiceManagerSettings serviceManagerSettings =
+ *     ServiceManagerSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * ServiceManagerClient serviceManagerClient = ServiceManagerClient.create(serviceManagerSettings);
+ * }
+ * + *

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

Returns all public services. For authenticated users, also returns all services the calling + * user has "servicemanagement.services.get" permission for. + * + *

**BETA:** If the caller specifies the `consumer_id`, it returns only the + * services enabled on the consumer. The `consumer_id` must have the format of + * "project:{PROJECT-ID}". + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String producerProjectId = "producerProjectId-1297373534";
+   *   String consumerId = "consumerId-166238287";
+   *   for (ManagedService element :
+   *       serviceManagerClient.listServices(producerProjectId, consumerId).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param producerProjectId Include services produced by the specified project. + * @param consumerId Include services consumed by the specified consumer. + *

The Google Service Management implementation accepts the following forms: - + * project:<project_id> + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListServicesPagedResponse listServices(String producerProjectId, String consumerId) { + ListServicesRequest request = + ListServicesRequest.newBuilder() + .setProducerProjectId(producerProjectId) + .setConsumerId(consumerId) + .build(); + return listServices(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists managed services. + * + *

Returns all public services. For authenticated users, also returns all services the calling + * user has "servicemanagement.services.get" permission for. + * + *

**BETA:** If the caller specifies the `consumer_id`, it returns only the + * services enabled on the consumer. The `consumer_id` must have the format of + * "project:{PROJECT-ID}". + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   ListServicesRequest request =
+   *       ListServicesRequest.newBuilder()
+   *           .setProducerProjectId("producerProjectId-1297373534")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setConsumerId("consumerId-166238287")
+   *           .build();
+   *   for (ManagedService element : serviceManagerClient.listServices(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 ListServicesPagedResponse listServices(ListServicesRequest request) { + return listServicesPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists managed services. + * + *

Returns all public services. For authenticated users, also returns all services the calling + * user has "servicemanagement.services.get" permission for. + * + *

**BETA:** If the caller specifies the `consumer_id`, it returns only the + * services enabled on the consumer. The `consumer_id` must have the format of + * "project:{PROJECT-ID}". + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   ListServicesRequest request =
+   *       ListServicesRequest.newBuilder()
+   *           .setProducerProjectId("producerProjectId-1297373534")
+   *           .setPageSize(883849137)
+   *           .setPageToken("pageToken873572522")
+   *           .setConsumerId("consumerId-166238287")
+   *           .build();
+   *   ApiFuture future =
+   *       serviceManagerClient.listServicesPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (ManagedService element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listServicesPagedCallable() { + return stub.listServicesPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists managed services. + * + *

Returns all public services. For authenticated users, also returns all services the calling + * user has "servicemanagement.services.get" permission for. + * + *

**BETA:** If the caller specifies the `consumer_id`, it returns only the + * services enabled on the consumer. The `consumer_id` must have the format of + * "project:{PROJECT-ID}". + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   while (true) {
+   *     ListServicesResponse response = serviceManagerClient.listServicesCallable().call(request);
+   *     for (ManagedService element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable listServicesCallable() { + return stub.listServicesCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a managed service. Authentication is required unless the service is public. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   ManagedService response = serviceManagerClient.getService(serviceName);
+   * }
+   * }
+ * + * @param serviceName Required. The name of the service. See the `ServiceManager` overview for + * naming requirements. For example: `example.googleapis.com`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ManagedService getService(String serviceName) { + GetServiceRequest request = GetServiceRequest.newBuilder().setServiceName(serviceName).build(); + return getService(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a managed service. Authentication is required unless the service is public. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   GetServiceRequest request =
+   *       GetServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
+   *   ManagedService response = serviceManagerClient.getService(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 ManagedService getService(GetServiceRequest request) { + return getServiceCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a managed service. Authentication is required unless the service is public. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   GetServiceRequest request =
+   *       GetServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
+   *   ApiFuture future =
+   *       serviceManagerClient.getServiceCallable().futureCall(request);
+   *   // Do something.
+   *   ManagedService response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getServiceCallable() { + return stub.getServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new managed service. Please note one producer project can own no more than 20 + * services. + * + *

Operation<response: ManagedService> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   ManagedService service = ManagedService.newBuilder().build();
+   *   ManagedService response = serviceManagerClient.createServiceAsync(service).get();
+   * }
+   * }
+ * + * @param service Required. Initial values for the service resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createServiceAsync( + ManagedService service) { + CreateServiceRequest request = CreateServiceRequest.newBuilder().setService(service).build(); + return createServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new managed service. Please note one producer project can own no more than 20 + * services. + * + *

Operation<response: ManagedService> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder().setService(ManagedService.newBuilder().build()).build();
+   *   ManagedService response = serviceManagerClient.createServiceAsync(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 createServiceAsync( + CreateServiceRequest request) { + return createServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new managed service. Please note one producer project can own no more than 20 + * services. + * + *

Operation<response: ManagedService> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder().setService(ManagedService.newBuilder().build()).build();
+   *   OperationFuture future =
+   *       serviceManagerClient.createServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   ManagedService response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createServiceOperationCallable() { + return stub.createServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new managed service. Please note one producer project can own no more than 20 + * services. + * + *

Operation<response: ManagedService> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   CreateServiceRequest request =
+   *       CreateServiceRequest.newBuilder().setService(ManagedService.newBuilder().build()).build();
+   *   ApiFuture future =
+   *       serviceManagerClient.createServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createServiceCallable() { + return stub.createServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a managed service. This method will change the service to the `Soft-Delete` state for + * 30 days. Within this period, service producers may call + * [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore + * the service. After 30 days, the service will be permanently deleted. + * + *

Operation<response: google.protobuf.Empty> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   serviceManagerClient.deleteServiceAsync(serviceName).get();
+   * }
+   * }
+ * + * @param serviceName Required. The name of the service. See the + * [overview](/service-management/overview) for naming requirements. For example: + * `example.googleapis.com`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture deleteServiceAsync(String serviceName) { + DeleteServiceRequest request = + DeleteServiceRequest.newBuilder().setServiceName(serviceName).build(); + return deleteServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a managed service. This method will change the service to the `Soft-Delete` state for + * 30 days. Within this period, service producers may call + * [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore + * the service. After 30 days, the service will be permanently deleted. + * + *

Operation<response: google.protobuf.Empty> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
+   *   serviceManagerClient.deleteServiceAsync(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 deleteServiceAsync( + DeleteServiceRequest request) { + return deleteServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a managed service. This method will change the service to the `Soft-Delete` state for + * 30 days. Within this period, service producers may call + * [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore + * the service. After 30 days, the service will be permanently deleted. + * + *

Operation<response: google.protobuf.Empty> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
+   *   OperationFuture future =
+   *       serviceManagerClient.deleteServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final OperationCallable + deleteServiceOperationCallable() { + return stub.deleteServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes a managed service. This method will change the service to the `Soft-Delete` state for + * 30 days. Within this period, service producers may call + * [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore + * the service. After 30 days, the service will be permanently deleted. + * + *

Operation<response: google.protobuf.Empty> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   DeleteServiceRequest request =
+   *       DeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
+   *   ApiFuture future =
+   *       serviceManagerClient.deleteServiceCallable().futureCall(request);
+   *   // Do something.
+   *   future.get();
+   * }
+   * }
+ */ + public final UnaryCallable deleteServiceCallable() { + return stub.deleteServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Revives a previously deleted managed service. The method restores the service using the + * configuration at the time the service was deleted. The target service must exist and must have + * been deleted within the last 30 days. + * + *

Operation<response: UndeleteServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   UndeleteServiceResponse response =
+   *       serviceManagerClient.undeleteServiceAsync(serviceName).get();
+   * }
+   * }
+ * + * @param serviceName Required. The name of the service. See the + * [overview](/service-management/overview) for naming requirements. For example: + * `example.googleapis.com`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture undeleteServiceAsync( + String serviceName) { + UndeleteServiceRequest request = + UndeleteServiceRequest.newBuilder().setServiceName(serviceName).build(); + return undeleteServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Revives a previously deleted managed service. The method restores the service using the + * configuration at the time the service was deleted. The target service must exist and must have + * been deleted within the last 30 days. + * + *

Operation<response: UndeleteServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   UndeleteServiceRequest request =
+   *       UndeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
+   *   UndeleteServiceResponse response = serviceManagerClient.undeleteServiceAsync(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 undeleteServiceAsync( + UndeleteServiceRequest request) { + return undeleteServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Revives a previously deleted managed service. The method restores the service using the + * configuration at the time the service was deleted. The target service must exist and must have + * been deleted within the last 30 days. + * + *

Operation<response: UndeleteServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   UndeleteServiceRequest request =
+   *       UndeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
+   *   OperationFuture future =
+   *       serviceManagerClient.undeleteServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   UndeleteServiceResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + undeleteServiceOperationCallable() { + return stub.undeleteServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Revives a previously deleted managed service. The method restores the service using the + * configuration at the time the service was deleted. The target service must exist and must have + * been deleted within the last 30 days. + * + *

Operation<response: UndeleteServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   UndeleteServiceRequest request =
+   *       UndeleteServiceRequest.newBuilder().setServiceName("serviceName-1928572192").build();
+   *   ApiFuture future =
+   *       serviceManagerClient.undeleteServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable undeleteServiceCallable() { + return stub.undeleteServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the history of the service configuration for a managed service, from the newest to the + * oldest. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   for (Service element : serviceManagerClient.listServiceConfigs(serviceName).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param serviceName Required. The name of the service. See the + * [overview](/service-management/overview) for naming requirements. For example: + * `example.googleapis.com`. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListServiceConfigsPagedResponse listServiceConfigs(String serviceName) { + ListServiceConfigsRequest request = + ListServiceConfigsRequest.newBuilder().setServiceName(serviceName).build(); + return listServiceConfigs(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the history of the service configuration for a managed service, from the newest to the + * oldest. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   ListServiceConfigsRequest request =
+   *       ListServiceConfigsRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   for (Service element : serviceManagerClient.listServiceConfigs(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 ListServiceConfigsPagedResponse listServiceConfigs( + ListServiceConfigsRequest request) { + return listServiceConfigsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the history of the service configuration for a managed service, from the newest to the + * oldest. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   ListServiceConfigsRequest request =
+   *       ListServiceConfigsRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .build();
+   *   ApiFuture future =
+   *       serviceManagerClient.listServiceConfigsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Service element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listServiceConfigsPagedCallable() { + return stub.listServiceConfigsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the history of the service configuration for a managed service, from the newest to the + * oldest. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   while (true) {
+   *     ListServiceConfigsResponse response =
+   *         serviceManagerClient.listServiceConfigsCallable().call(request);
+   *     for (Service element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listServiceConfigsCallable() { + return stub.listServiceConfigsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a service configuration (version) for a managed service. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   String configId = "configId-580140035";
+   *   GetServiceConfigRequest.ConfigView view = GetServiceConfigRequest.ConfigView.forNumber(0);
+   *   Service response = serviceManagerClient.getServiceConfig(serviceName, configId, view);
+   * }
+   * }
+ * + * @param serviceName Required. The name of the service. See the + * [overview](/service-management/overview) for naming requirements. For example: + * `example.googleapis.com`. + * @param configId Required. The id of the service configuration resource. + *

This field must be specified for the server to return all fields, including + * `SourceInfo`. + * @param view Specifies which parts of the Service Config should be returned in the response. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Service getServiceConfig( + String serviceName, String configId, GetServiceConfigRequest.ConfigView view) { + GetServiceConfigRequest request = + GetServiceConfigRequest.newBuilder() + .setServiceName(serviceName) + .setConfigId(configId) + .setView(view) + .build(); + return getServiceConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a service configuration (version) for a managed service. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   GetServiceConfigRequest request =
+   *       GetServiceConfigRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setConfigId("configId-580140035")
+   *           .build();
+   *   Service response = serviceManagerClient.getServiceConfig(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 Service getServiceConfig(GetServiceConfigRequest request) { + return getServiceConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a service configuration (version) for a managed service. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   GetServiceConfigRequest request =
+   *       GetServiceConfigRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setConfigId("configId-580140035")
+   *           .build();
+   *   ApiFuture future =
+   *       serviceManagerClient.getServiceConfigCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getServiceConfigCallable() { + return stub.getServiceConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new service configuration (version) for a managed service. This method only stores + * the service configuration. To roll out the service configuration to backend systems please call + * [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + * + *

Only the 100 most recent service configurations and ones referenced by existing rollouts are + * kept for each service. The rest will be deleted eventually. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   Service serviceConfig = Service.newBuilder().build();
+   *   Service response = serviceManagerClient.createServiceConfig(serviceName, serviceConfig);
+   * }
+   * }
+ * + * @param serviceName Required. The name of the service. See the + * [overview](/service-management/overview) for naming requirements. For example: + * `example.googleapis.com`. + * @param serviceConfig Required. The service configuration resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Service createServiceConfig(String serviceName, Service serviceConfig) { + CreateServiceConfigRequest request = + CreateServiceConfigRequest.newBuilder() + .setServiceName(serviceName) + .setServiceConfig(serviceConfig) + .build(); + return createServiceConfig(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new service configuration (version) for a managed service. This method only stores + * the service configuration. To roll out the service configuration to backend systems please call + * [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + * + *

Only the 100 most recent service configurations and ones referenced by existing rollouts are + * kept for each service. The rest will be deleted eventually. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   CreateServiceConfigRequest request =
+   *       CreateServiceConfigRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setServiceConfig(Service.newBuilder().build())
+   *           .build();
+   *   Service response = serviceManagerClient.createServiceConfig(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 Service createServiceConfig(CreateServiceConfigRequest request) { + return createServiceConfigCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new service configuration (version) for a managed service. This method only stores + * the service configuration. To roll out the service configuration to backend systems please call + * [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + * + *

Only the 100 most recent service configurations and ones referenced by existing rollouts are + * kept for each service. The rest will be deleted eventually. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   CreateServiceConfigRequest request =
+   *       CreateServiceConfigRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setServiceConfig(Service.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       serviceManagerClient.createServiceConfigCallable().futureCall(request);
+   *   // Do something.
+   *   Service response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable createServiceConfigCallable() { + return stub.createServiceConfigCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new service configuration (version) for a managed service based on user-supplied + * configuration source files (for example: OpenAPI Specification). This method stores the source + * configurations as well as the generated service configuration. To rollout the service + * configuration to other services, please call + * [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + * + *

Only the 100 most recent configuration sources and ones referenced by existing service + * configurtions are kept for each service. The rest will be deleted eventually. + * + *

Operation<response: SubmitConfigSourceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   ConfigSource configSource = ConfigSource.newBuilder().build();
+   *   boolean validateOnly = true;
+   *   SubmitConfigSourceResponse response =
+   *       serviceManagerClient
+   *           .submitConfigSourceAsync(serviceName, configSource, validateOnly)
+   *           .get();
+   * }
+   * }
+ * + * @param serviceName Required. The name of the service. See the + * [overview](/service-management/overview) for naming requirements. For example: + * `example.googleapis.com`. + * @param configSource Required. The source configuration for the service. + * @param validateOnly Optional. If set, this will result in the generation of a + * `google.api.Service` configuration based on the `ConfigSource` provided, but the generated + * config and the sources will NOT be persisted. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture + submitConfigSourceAsync(String serviceName, ConfigSource configSource, boolean validateOnly) { + SubmitConfigSourceRequest request = + SubmitConfigSourceRequest.newBuilder() + .setServiceName(serviceName) + .setConfigSource(configSource) + .setValidateOnly(validateOnly) + .build(); + return submitConfigSourceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new service configuration (version) for a managed service based on user-supplied + * configuration source files (for example: OpenAPI Specification). This method stores the source + * configurations as well as the generated service configuration. To rollout the service + * configuration to other services, please call + * [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + * + *

Only the 100 most recent configuration sources and ones referenced by existing service + * configurtions are kept for each service. The rest will be deleted eventually. + * + *

Operation<response: SubmitConfigSourceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   SubmitConfigSourceRequest request =
+   *       SubmitConfigSourceRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setConfigSource(ConfigSource.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   SubmitConfigSourceResponse response =
+   *       serviceManagerClient.submitConfigSourceAsync(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 + submitConfigSourceAsync(SubmitConfigSourceRequest request) { + return submitConfigSourceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new service configuration (version) for a managed service based on user-supplied + * configuration source files (for example: OpenAPI Specification). This method stores the source + * configurations as well as the generated service configuration. To rollout the service + * configuration to other services, please call + * [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + * + *

Only the 100 most recent configuration sources and ones referenced by existing service + * configurtions are kept for each service. The rest will be deleted eventually. + * + *

Operation<response: SubmitConfigSourceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   SubmitConfigSourceRequest request =
+   *       SubmitConfigSourceRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setConfigSource(ConfigSource.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   OperationFuture future =
+   *       serviceManagerClient.submitConfigSourceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   SubmitConfigSourceResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable< + SubmitConfigSourceRequest, SubmitConfigSourceResponse, OperationMetadata> + submitConfigSourceOperationCallable() { + return stub.submitConfigSourceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new service configuration (version) for a managed service based on user-supplied + * configuration source files (for example: OpenAPI Specification). This method stores the source + * configurations as well as the generated service configuration. To rollout the service + * configuration to other services, please call + * [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + * + *

Only the 100 most recent configuration sources and ones referenced by existing service + * configurtions are kept for each service. The rest will be deleted eventually. + * + *

Operation<response: SubmitConfigSourceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   SubmitConfigSourceRequest request =
+   *       SubmitConfigSourceRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setConfigSource(ConfigSource.newBuilder().build())
+   *           .setValidateOnly(true)
+   *           .build();
+   *   ApiFuture future =
+   *       serviceManagerClient.submitConfigSourceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable submitConfigSourceCallable() { + return stub.submitConfigSourceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the history of the service configuration rollouts for a managed service, from the newest + * to the oldest. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   String filter = "filter-1274492040";
+   *   for (Rollout element :
+   *       serviceManagerClient.listServiceRollouts(serviceName, filter).iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ * + * @param serviceName Required. The name of the service. See the + * [overview](/service-management/overview) for naming requirements. For example: + * `example.googleapis.com`. + * @param filter Required. Use `filter` to return subset of rollouts. The following filters are + * supported: -- To limit the results to only those in + * [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', use + * filter='status=SUCCESS' -- To limit the results to those in + * [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' or 'FAILED', use + * filter='status=CANCELLED OR status=FAILED' + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final ListServiceRolloutsPagedResponse listServiceRollouts( + String serviceName, String filter) { + ListServiceRolloutsRequest request = + ListServiceRolloutsRequest.newBuilder() + .setServiceName(serviceName) + .setFilter(filter) + .build(); + return listServiceRollouts(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the history of the service configuration rollouts for a managed service, from the newest + * to the oldest. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   ListServiceRolloutsRequest request =
+   *       ListServiceRolloutsRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   for (Rollout element : serviceManagerClient.listServiceRollouts(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 ListServiceRolloutsPagedResponse listServiceRollouts( + ListServiceRolloutsRequest request) { + return listServiceRolloutsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the history of the service configuration rollouts for a managed service, from the newest + * to the oldest. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   ListServiceRolloutsRequest request =
+   *       ListServiceRolloutsRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setPageToken("pageToken873572522")
+   *           .setPageSize(883849137)
+   *           .setFilter("filter-1274492040")
+   *           .build();
+   *   ApiFuture future =
+   *       serviceManagerClient.listServiceRolloutsPagedCallable().futureCall(request);
+   *   // Do something.
+   *   for (Rollout element : future.get().iterateAll()) {
+   *     // doThingsWith(element);
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listServiceRolloutsPagedCallable() { + return stub.listServiceRolloutsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the history of the service configuration rollouts for a managed service, from the newest + * to the oldest. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   while (true) {
+   *     ListServiceRolloutsResponse response =
+   *         serviceManagerClient.listServiceRolloutsCallable().call(request);
+   *     for (Rollout element : response.getResponsesList()) {
+   *       // doThingsWith(element);
+   *     }
+   *     String nextPageToken = response.getNextPageToken();
+   *     if (!Strings.isNullOrEmpty(nextPageToken)) {
+   *       request = request.toBuilder().setPageToken(nextPageToken).build();
+   *     } else {
+   *       break;
+   *     }
+   *   }
+   * }
+   * }
+ */ + public final UnaryCallable + listServiceRolloutsCallable() { + return stub.listServiceRolloutsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout]. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   String rolloutId = "rolloutId551248556";
+   *   Rollout response = serviceManagerClient.getServiceRollout(serviceName, rolloutId);
+   * }
+   * }
+ * + * @param serviceName Required. The name of the service. See the + * [overview](/service-management/overview) for naming requirements. For example: + * `example.googleapis.com`. + * @param rolloutId Required. The id of the rollout resource. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Rollout getServiceRollout(String serviceName, String rolloutId) { + GetServiceRolloutRequest request = + GetServiceRolloutRequest.newBuilder() + .setServiceName(serviceName) + .setRolloutId(rolloutId) + .build(); + return getServiceRollout(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout]. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   GetServiceRolloutRequest request =
+   *       GetServiceRolloutRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setRolloutId("rolloutId551248556")
+   *           .build();
+   *   Rollout response = serviceManagerClient.getServiceRollout(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 Rollout getServiceRollout(GetServiceRolloutRequest request) { + return getServiceRolloutCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout]. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   GetServiceRolloutRequest request =
+   *       GetServiceRolloutRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setRolloutId("rolloutId551248556")
+   *           .build();
+   *   ApiFuture future =
+   *       serviceManagerClient.getServiceRolloutCallable().futureCall(request);
+   *   // Do something.
+   *   Rollout response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable getServiceRolloutCallable() { + return stub.getServiceRolloutCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new service configuration rollout. Based on rollout, the Google Service Management + * will roll out the service configurations to different backend services. For example, the + * logging configuration will be pushed to Google Cloud Logging. + * + *

Please note that any previous pending and running Rollouts and associated Operations will be + * automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts. + * + *

Only the 100 most recent (in any state) and the last 10 successful (if not already part of + * the set of 100 most recent) rollouts are kept for each service. The rest will be deleted + * eventually. + * + *

Operation<response: Rollout> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   Rollout rollout = Rollout.newBuilder().build();
+   *   Rollout response = serviceManagerClient.createServiceRolloutAsync(serviceName, rollout).get();
+   * }
+   * }
+ * + * @param serviceName Required. The name of the service. See the + * [overview](/service-management/overview) for naming requirements. For example: + * `example.googleapis.com`. + * @param rollout Required. The rollout resource. The `service_name` field is output only. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture createServiceRolloutAsync( + String serviceName, Rollout rollout) { + CreateServiceRolloutRequest request = + CreateServiceRolloutRequest.newBuilder() + .setServiceName(serviceName) + .setRollout(rollout) + .build(); + return createServiceRolloutAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new service configuration rollout. Based on rollout, the Google Service Management + * will roll out the service configurations to different backend services. For example, the + * logging configuration will be pushed to Google Cloud Logging. + * + *

Please note that any previous pending and running Rollouts and associated Operations will be + * automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts. + * + *

Only the 100 most recent (in any state) and the last 10 successful (if not already part of + * the set of 100 most recent) rollouts are kept for each service. The rest will be deleted + * eventually. + * + *

Operation<response: Rollout> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   CreateServiceRolloutRequest request =
+   *       CreateServiceRolloutRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setRollout(Rollout.newBuilder().build())
+   *           .build();
+   *   Rollout response = serviceManagerClient.createServiceRolloutAsync(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 createServiceRolloutAsync( + CreateServiceRolloutRequest request) { + return createServiceRolloutOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new service configuration rollout. Based on rollout, the Google Service Management + * will roll out the service configurations to different backend services. For example, the + * logging configuration will be pushed to Google Cloud Logging. + * + *

Please note that any previous pending and running Rollouts and associated Operations will be + * automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts. + * + *

Only the 100 most recent (in any state) and the last 10 successful (if not already part of + * the set of 100 most recent) rollouts are kept for each service. The rest will be deleted + * eventually. + * + *

Operation<response: Rollout> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   CreateServiceRolloutRequest request =
+   *       CreateServiceRolloutRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setRollout(Rollout.newBuilder().build())
+   *           .build();
+   *   OperationFuture future =
+   *       serviceManagerClient.createServiceRolloutOperationCallable().futureCall(request);
+   *   // Do something.
+   *   Rollout response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + createServiceRolloutOperationCallable() { + return stub.createServiceRolloutOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new service configuration rollout. Based on rollout, the Google Service Management + * will roll out the service configurations to different backend services. For example, the + * logging configuration will be pushed to Google Cloud Logging. + * + *

Please note that any previous pending and running Rollouts and associated Operations will be + * automatically cancelled so that the latest Rollout will not be blocked by previous Rollouts. + * + *

Only the 100 most recent (in any state) and the last 10 successful (if not already part of + * the set of 100 most recent) rollouts are kept for each service. The rest will be deleted + * eventually. + * + *

Operation<response: Rollout> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   CreateServiceRolloutRequest request =
+   *       CreateServiceRolloutRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setRollout(Rollout.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       serviceManagerClient.createServiceRolloutCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + createServiceRolloutCallable() { + return stub.createServiceRolloutCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates and returns a report (errors, warnings and changes from existing configurations) + * associated with GenerateConfigReportRequest.new_value + * + *

If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will + * contain a single ChangeReport based on the comparison between + * GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If + * GenerateConfigReportRequest.old_value is not specified, this method will compare + * GenerateConfigReportRequest.new_value with the last pushed service configuration. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   Any newConfig = Any.newBuilder().build();
+   *   Any oldConfig = Any.newBuilder().build();
+   *   GenerateConfigReportResponse response =
+   *       serviceManagerClient.generateConfigReport(newConfig, oldConfig);
+   * }
+   * }
+ * + * @param newConfig Required. Service configuration for which we want to generate the report. For + * this version of API, the supported types are + * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef], + * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource], + * and [google.api.Service][google.api.Service] + * @param oldConfig Optional. Service configuration against which the comparison will be done. For + * this version of API, the supported types are + * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef], + * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource], + * and [google.api.Service][google.api.Service] + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final GenerateConfigReportResponse generateConfigReport(Any newConfig, Any oldConfig) { + GenerateConfigReportRequest request = + GenerateConfigReportRequest.newBuilder() + .setNewConfig(newConfig) + .setOldConfig(oldConfig) + .build(); + return generateConfigReport(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates and returns a report (errors, warnings and changes from existing configurations) + * associated with GenerateConfigReportRequest.new_value + * + *

If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will + * contain a single ChangeReport based on the comparison between + * GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If + * GenerateConfigReportRequest.old_value is not specified, this method will compare + * GenerateConfigReportRequest.new_value with the last pushed service configuration. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   GenerateConfigReportRequest request =
+   *       GenerateConfigReportRequest.newBuilder()
+   *           .setNewConfig(Any.newBuilder().build())
+   *           .setOldConfig(Any.newBuilder().build())
+   *           .build();
+   *   GenerateConfigReportResponse response = serviceManagerClient.generateConfigReport(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 GenerateConfigReportResponse generateConfigReport( + GenerateConfigReportRequest request) { + return generateConfigReportCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Generates and returns a report (errors, warnings and changes from existing configurations) + * associated with GenerateConfigReportRequest.new_value + * + *

If GenerateConfigReportRequest.old_value is specified, GenerateConfigReportRequest will + * contain a single ChangeReport based on the comparison between + * GenerateConfigReportRequest.new_value and GenerateConfigReportRequest.old_value. If + * GenerateConfigReportRequest.old_value is not specified, this method will compare + * GenerateConfigReportRequest.new_value with the last pushed service configuration. + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   GenerateConfigReportRequest request =
+   *       GenerateConfigReportRequest.newBuilder()
+   *           .setNewConfig(Any.newBuilder().build())
+   *           .setOldConfig(Any.newBuilder().build())
+   *           .build();
+   *   ApiFuture future =
+   *       serviceManagerClient.generateConfigReportCallable().futureCall(request);
+   *   // Do something.
+   *   GenerateConfigReportResponse response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable + generateConfigReportCallable() { + return stub.generateConfigReportCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be + * used for the project. See [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for + * more information. + * + *

Operation<response: EnableServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   String consumerId = "consumerId-166238287";
+   *   EnableServiceResponse response =
+   *       serviceManagerClient.enableServiceAsync(serviceName, consumerId).get();
+   * }
+   * }
+ * + * @param serviceName Required. Name of the service to enable. Specifying an unknown service name + * will cause the request to fail. + * @param consumerId Required. The identity of consumer resource which service enablement will be + * applied to. + *

The Google Service Management implementation accepts the following forms: - + * "project:<project_id>" + *

Note: this is made compatible with google.api.servicecontrol.v1.Operation.consumer_id. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture enableServiceAsync( + String serviceName, String consumerId) { + EnableServiceRequest request = + EnableServiceRequest.newBuilder() + .setServiceName(serviceName) + .setConsumerId(consumerId) + .build(); + return enableServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be + * used for the project. See [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for + * more information. + * + *

Operation<response: EnableServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   EnableServiceRequest request =
+   *       EnableServiceRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setConsumerId("consumerId-166238287")
+   *           .build();
+   *   EnableServiceResponse response = serviceManagerClient.enableServiceAsync(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 enableServiceAsync( + EnableServiceRequest request) { + return enableServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be + * used for the project. See [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for + * more information. + * + *

Operation<response: EnableServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   EnableServiceRequest request =
+   *       EnableServiceRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setConsumerId("consumerId-166238287")
+   *           .build();
+   *   OperationFuture future =
+   *       serviceManagerClient.enableServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   EnableServiceResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + enableServiceOperationCallable() { + return stub.enableServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be + * used for the project. See [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for + * more information. + * + *

Operation<response: EnableServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   EnableServiceRequest request =
+   *       EnableServiceRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setConsumerId("consumerId-166238287")
+   *           .build();
+   *   ApiFuture future =
+   *       serviceManagerClient.enableServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable enableServiceCallable() { + return stub.enableServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can + * no longer be be used for the project. It prevents accidental usage that may cause unexpected + * billing charges or security leaks. + * + *

Operation<response: DisableServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   String serviceName = "serviceName-1928572192";
+   *   String consumerId = "consumerId-166238287";
+   *   DisableServiceResponse response =
+   *       serviceManagerClient.disableServiceAsync(serviceName, consumerId).get();
+   * }
+   * }
+ * + * @param serviceName Required. Name of the service to disable. Specifying an unknown service name + * will cause the request to fail. + * @param consumerId Required. The identity of consumer resource which service disablement will be + * applied to. + *

The Google Service Management implementation accepts the following forms: - + * "project:<project_id>" + *

Note: this is made compatible with google.api.servicecontrol.v1.Operation.consumer_id. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final OperationFuture disableServiceAsync( + String serviceName, String consumerId) { + DisableServiceRequest request = + DisableServiceRequest.newBuilder() + .setServiceName(serviceName) + .setConsumerId(consumerId) + .build(); + return disableServiceAsync(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can + * no longer be be used for the project. It prevents accidental usage that may cause unexpected + * billing charges or security leaks. + * + *

Operation<response: DisableServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   DisableServiceRequest request =
+   *       DisableServiceRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setConsumerId("consumerId-166238287")
+   *           .build();
+   *   DisableServiceResponse response = serviceManagerClient.disableServiceAsync(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 disableServiceAsync( + DisableServiceRequest request) { + return disableServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can + * no longer be be used for the project. It prevents accidental usage that may cause unexpected + * billing charges or security leaks. + * + *

Operation<response: DisableServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   DisableServiceRequest request =
+   *       DisableServiceRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setConsumerId("consumerId-166238287")
+   *           .build();
+   *   OperationFuture future =
+   *       serviceManagerClient.disableServiceOperationCallable().futureCall(request);
+   *   // Do something.
+   *   DisableServiceResponse response = future.get();
+   * }
+   * }
+ */ + public final OperationCallable + disableServiceOperationCallable() { + return stub.disableServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can + * no longer be be used for the project. It prevents accidental usage that may cause unexpected + * billing charges or security leaks. + * + *

Operation<response: DisableServiceResponse> + * + *

Sample code: + * + *

{@code
+   * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+   *   DisableServiceRequest request =
+   *       DisableServiceRequest.newBuilder()
+   *           .setServiceName("serviceName-1928572192")
+   *           .setConsumerId("consumerId-166238287")
+   *           .build();
+   *   ApiFuture future =
+   *       serviceManagerClient.disableServiceCallable().futureCall(request);
+   *   // Do something.
+   *   Operation response = future.get();
+   * }
+   * }
+ */ + public final UnaryCallable disableServiceCallable() { + return stub.disableServiceCallable(); + } + + @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 ListServicesPagedResponse + extends AbstractPagedListResponse< + ListServicesRequest, + ListServicesResponse, + ManagedService, + ListServicesPage, + ListServicesFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListServicesPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListServicesPagedResponse apply(ListServicesPage input) { + return new ListServicesPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListServicesPagedResponse(ListServicesPage page) { + super(page, ListServicesFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListServicesPage + extends AbstractPage< + ListServicesRequest, ListServicesResponse, ManagedService, ListServicesPage> { + + private ListServicesPage( + PageContext context, + ListServicesResponse response) { + super(context, response); + } + + private static ListServicesPage createEmptyPage() { + return new ListServicesPage(null, null); + } + + @Override + protected ListServicesPage createPage( + PageContext context, + ListServicesResponse response) { + return new ListServicesPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListServicesFixedSizeCollection + extends AbstractFixedSizeCollection< + ListServicesRequest, + ListServicesResponse, + ManagedService, + ListServicesPage, + ListServicesFixedSizeCollection> { + + private ListServicesFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListServicesFixedSizeCollection createEmptyCollection() { + return new ListServicesFixedSizeCollection(null, 0); + } + + @Override + protected ListServicesFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListServicesFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListServiceConfigsPagedResponse + extends AbstractPagedListResponse< + ListServiceConfigsRequest, + ListServiceConfigsResponse, + Service, + ListServiceConfigsPage, + ListServiceConfigsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListServiceConfigsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListServiceConfigsPagedResponse apply(ListServiceConfigsPage input) { + return new ListServiceConfigsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListServiceConfigsPagedResponse(ListServiceConfigsPage page) { + super(page, ListServiceConfigsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListServiceConfigsPage + extends AbstractPage< + ListServiceConfigsRequest, ListServiceConfigsResponse, Service, ListServiceConfigsPage> { + + private ListServiceConfigsPage( + PageContext context, + ListServiceConfigsResponse response) { + super(context, response); + } + + private static ListServiceConfigsPage createEmptyPage() { + return new ListServiceConfigsPage(null, null); + } + + @Override + protected ListServiceConfigsPage createPage( + PageContext context, + ListServiceConfigsResponse response) { + return new ListServiceConfigsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListServiceConfigsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListServiceConfigsRequest, + ListServiceConfigsResponse, + Service, + ListServiceConfigsPage, + ListServiceConfigsFixedSizeCollection> { + + private ListServiceConfigsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListServiceConfigsFixedSizeCollection createEmptyCollection() { + return new ListServiceConfigsFixedSizeCollection(null, 0); + } + + @Override + protected ListServiceConfigsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListServiceConfigsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListServiceRolloutsPagedResponse + extends AbstractPagedListResponse< + ListServiceRolloutsRequest, + ListServiceRolloutsResponse, + Rollout, + ListServiceRolloutsPage, + ListServiceRolloutsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListServiceRolloutsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListServiceRolloutsPagedResponse apply(ListServiceRolloutsPage input) { + return new ListServiceRolloutsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListServiceRolloutsPagedResponse(ListServiceRolloutsPage page) { + super(page, ListServiceRolloutsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListServiceRolloutsPage + extends AbstractPage< + ListServiceRolloutsRequest, + ListServiceRolloutsResponse, + Rollout, + ListServiceRolloutsPage> { + + private ListServiceRolloutsPage( + PageContext context, + ListServiceRolloutsResponse response) { + super(context, response); + } + + private static ListServiceRolloutsPage createEmptyPage() { + return new ListServiceRolloutsPage(null, null); + } + + @Override + protected ListServiceRolloutsPage createPage( + PageContext context, + ListServiceRolloutsResponse response) { + return new ListServiceRolloutsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListServiceRolloutsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListServiceRolloutsRequest, + ListServiceRolloutsResponse, + Rollout, + ListServiceRolloutsPage, + ListServiceRolloutsFixedSizeCollection> { + + private ListServiceRolloutsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListServiceRolloutsFixedSizeCollection createEmptyCollection() { + return new ListServiceRolloutsFixedSizeCollection(null, 0); + } + + @Override + protected ListServiceRolloutsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListServiceRolloutsFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerSettings.java b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerSettings.java new file mode 100644 index 0000000..f1884d3 --- /dev/null +++ b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerSettings.java @@ -0,0 +1,466 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.api.servicemanagement.v1; + +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServiceConfigsPagedResponse; +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServiceRolloutsPagedResponse; +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServicesPagedResponse; + +import com.google.api.Service; +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.servicemanagement.v1.CreateServiceConfigRequest; +import com.google.api.servicemanagement.v1.CreateServiceRequest; +import com.google.api.servicemanagement.v1.CreateServiceRolloutRequest; +import com.google.api.servicemanagement.v1.DeleteServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceResponse; +import com.google.api.servicemanagement.v1.EnableServiceRequest; +import com.google.api.servicemanagement.v1.EnableServiceResponse; +import com.google.api.servicemanagement.v1.GenerateConfigReportRequest; +import com.google.api.servicemanagement.v1.GenerateConfigReportResponse; +import com.google.api.servicemanagement.v1.GetServiceConfigRequest; +import com.google.api.servicemanagement.v1.GetServiceRequest; +import com.google.api.servicemanagement.v1.GetServiceRolloutRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsResponse; +import com.google.api.servicemanagement.v1.ListServiceRolloutsRequest; +import com.google.api.servicemanagement.v1.ListServiceRolloutsResponse; +import com.google.api.servicemanagement.v1.ListServicesRequest; +import com.google.api.servicemanagement.v1.ListServicesResponse; +import com.google.api.servicemanagement.v1.ManagedService; +import com.google.api.servicemanagement.v1.OperationMetadata; +import com.google.api.servicemanagement.v1.Rollout; +import com.google.api.servicemanagement.v1.SubmitConfigSourceRequest; +import com.google.api.servicemanagement.v1.SubmitConfigSourceResponse; +import com.google.api.servicemanagement.v1.UndeleteServiceRequest; +import com.google.api.servicemanagement.v1.UndeleteServiceResponse; +import com.google.cloud.api.servicemanagement.v1.stub.ServiceManagerStubSettings; +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 ServiceManagerClient}. + * + *

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

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

{@code
+ * ServiceManagerSettings.Builder serviceManagerSettingsBuilder =
+ *     ServiceManagerSettings.newBuilder();
+ * serviceManagerSettingsBuilder
+ *     .getServiceSettings()
+ *     .setRetrySettings(
+ *         serviceManagerSettingsBuilder
+ *             .getServiceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ServiceManagerSettings serviceManagerSettings = serviceManagerSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ServiceManagerSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).listServicesSettings(); + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).getServiceSettings(); + } + + /** Returns the object with the settings used for calls to createService. */ + public UnaryCallSettings createServiceSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).createServiceSettings(); + } + + /** Returns the object with the settings used for calls to createService. */ + public OperationCallSettings + createServiceOperationSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).createServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).deleteServiceSettings(); + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).deleteServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to undeleteService. */ + public UnaryCallSettings undeleteServiceSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).undeleteServiceSettings(); + } + + /** Returns the object with the settings used for calls to undeleteService. */ + public OperationCallSettings + undeleteServiceOperationSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).undeleteServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listServiceConfigs. */ + public PagedCallSettings< + ListServiceConfigsRequest, ListServiceConfigsResponse, ListServiceConfigsPagedResponse> + listServiceConfigsSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).listServiceConfigsSettings(); + } + + /** Returns the object with the settings used for calls to getServiceConfig. */ + public UnaryCallSettings getServiceConfigSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).getServiceConfigSettings(); + } + + /** Returns the object with the settings used for calls to createServiceConfig. */ + public UnaryCallSettings createServiceConfigSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).createServiceConfigSettings(); + } + + /** Returns the object with the settings used for calls to submitConfigSource. */ + public UnaryCallSettings submitConfigSourceSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).submitConfigSourceSettings(); + } + + /** Returns the object with the settings used for calls to submitConfigSource. */ + public OperationCallSettings< + SubmitConfigSourceRequest, SubmitConfigSourceResponse, OperationMetadata> + submitConfigSourceOperationSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).submitConfigSourceOperationSettings(); + } + + /** Returns the object with the settings used for calls to listServiceRollouts. */ + public PagedCallSettings< + ListServiceRolloutsRequest, ListServiceRolloutsResponse, ListServiceRolloutsPagedResponse> + listServiceRolloutsSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).listServiceRolloutsSettings(); + } + + /** Returns the object with the settings used for calls to getServiceRollout. */ + public UnaryCallSettings getServiceRolloutSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).getServiceRolloutSettings(); + } + + /** Returns the object with the settings used for calls to createServiceRollout. */ + public UnaryCallSettings createServiceRolloutSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).createServiceRolloutSettings(); + } + + /** Returns the object with the settings used for calls to createServiceRollout. */ + public OperationCallSettings + createServiceRolloutOperationSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).createServiceRolloutOperationSettings(); + } + + /** Returns the object with the settings used for calls to generateConfigReport. */ + public UnaryCallSettings + generateConfigReportSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).generateConfigReportSettings(); + } + + /** Returns the object with the settings used for calls to enableService. */ + public UnaryCallSettings enableServiceSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).enableServiceSettings(); + } + + /** Returns the object with the settings used for calls to enableService. */ + public OperationCallSettings + enableServiceOperationSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).enableServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to disableService. */ + public UnaryCallSettings disableServiceSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).disableServiceSettings(); + } + + /** Returns the object with the settings used for calls to disableService. */ + public OperationCallSettings + disableServiceOperationSettings() { + return ((ServiceManagerStubSettings) getStubSettings()).disableServiceOperationSettings(); + } + + public static final ServiceManagerSettings create(ServiceManagerStubSettings stub) + throws IOException { + return new ServiceManagerSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return ServiceManagerStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return ServiceManagerStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return ServiceManagerStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return ServiceManagerStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return ServiceManagerStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return ServiceManagerStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ServiceManagerStubSettings.defaultApiClientHeaderProviderBuilder(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ServiceManagerSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for ServiceManagerSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(ServiceManagerStubSettings.newBuilder(clientContext)); + } + + protected Builder(ServiceManagerSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(ServiceManagerStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(ServiceManagerStubSettings.newBuilder()); + } + + public ServiceManagerStubSettings.Builder getStubSettingsBuilder() { + return ((ServiceManagerStubSettings.Builder) getStubSettings()); + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods( + getStubSettingsBuilder().unaryMethodSettingsBuilders(), settingsUpdater); + return this; + } + + /** Returns the builder for the settings used for calls to listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return getStubSettingsBuilder().listServicesSettings(); + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getStubSettingsBuilder().getServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createService. */ + public UnaryCallSettings.Builder createServiceSettings() { + return getStubSettingsBuilder().createServiceSettings(); + } + + /** Returns the builder for the settings used for calls to createService. */ + public OperationCallSettings.Builder + createServiceOperationSettings() { + return getStubSettingsBuilder().createServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return getStubSettingsBuilder().deleteServiceSettings(); + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return getStubSettingsBuilder().deleteServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to undeleteService. */ + public UnaryCallSettings.Builder undeleteServiceSettings() { + return getStubSettingsBuilder().undeleteServiceSettings(); + } + + /** Returns the builder for the settings used for calls to undeleteService. */ + public OperationCallSettings.Builder< + UndeleteServiceRequest, UndeleteServiceResponse, OperationMetadata> + undeleteServiceOperationSettings() { + return getStubSettingsBuilder().undeleteServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listServiceConfigs. */ + public PagedCallSettings.Builder< + ListServiceConfigsRequest, ListServiceConfigsResponse, ListServiceConfigsPagedResponse> + listServiceConfigsSettings() { + return getStubSettingsBuilder().listServiceConfigsSettings(); + } + + /** Returns the builder for the settings used for calls to getServiceConfig. */ + public UnaryCallSettings.Builder getServiceConfigSettings() { + return getStubSettingsBuilder().getServiceConfigSettings(); + } + + /** Returns the builder for the settings used for calls to createServiceConfig. */ + public UnaryCallSettings.Builder + createServiceConfigSettings() { + return getStubSettingsBuilder().createServiceConfigSettings(); + } + + /** Returns the builder for the settings used for calls to submitConfigSource. */ + public UnaryCallSettings.Builder + submitConfigSourceSettings() { + return getStubSettingsBuilder().submitConfigSourceSettings(); + } + + /** Returns the builder for the settings used for calls to submitConfigSource. */ + public OperationCallSettings.Builder< + SubmitConfigSourceRequest, SubmitConfigSourceResponse, OperationMetadata> + submitConfigSourceOperationSettings() { + return getStubSettingsBuilder().submitConfigSourceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listServiceRollouts. */ + public PagedCallSettings.Builder< + ListServiceRolloutsRequest, + ListServiceRolloutsResponse, + ListServiceRolloutsPagedResponse> + listServiceRolloutsSettings() { + return getStubSettingsBuilder().listServiceRolloutsSettings(); + } + + /** Returns the builder for the settings used for calls to getServiceRollout. */ + public UnaryCallSettings.Builder + getServiceRolloutSettings() { + return getStubSettingsBuilder().getServiceRolloutSettings(); + } + + /** Returns the builder for the settings used for calls to createServiceRollout. */ + public UnaryCallSettings.Builder + createServiceRolloutSettings() { + return getStubSettingsBuilder().createServiceRolloutSettings(); + } + + /** Returns the builder for the settings used for calls to createServiceRollout. */ + public OperationCallSettings.Builder + createServiceRolloutOperationSettings() { + return getStubSettingsBuilder().createServiceRolloutOperationSettings(); + } + + /** Returns the builder for the settings used for calls to generateConfigReport. */ + public UnaryCallSettings.Builder + generateConfigReportSettings() { + return getStubSettingsBuilder().generateConfigReportSettings(); + } + + /** Returns the builder for the settings used for calls to enableService. */ + public UnaryCallSettings.Builder enableServiceSettings() { + return getStubSettingsBuilder().enableServiceSettings(); + } + + /** Returns the builder for the settings used for calls to enableService. */ + public OperationCallSettings.Builder< + EnableServiceRequest, EnableServiceResponse, OperationMetadata> + enableServiceOperationSettings() { + return getStubSettingsBuilder().enableServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to disableService. */ + public UnaryCallSettings.Builder disableServiceSettings() { + return getStubSettingsBuilder().disableServiceSettings(); + } + + /** Returns the builder for the settings used for calls to disableService. */ + public OperationCallSettings.Builder< + DisableServiceRequest, DisableServiceResponse, OperationMetadata> + disableServiceOperationSettings() { + return getStubSettingsBuilder().disableServiceOperationSettings(); + } + + @Override + public ServiceManagerSettings build() throws IOException { + return new ServiceManagerSettings(this); + } + } +} diff --git a/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/gapic_metadata.json b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/gapic_metadata.json new file mode 100644 index 0000000..d67b65b --- /dev/null +++ b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/gapic_metadata.json @@ -0,0 +1,63 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "java", + "protoPackage": "google.api.servicemanagement.v1", + "libraryPackage": "com.google.cloud.api.servicemanagement.v1", + "services": { + "ServiceManager": { + "clients": { + "grpc": { + "libraryClient": "ServiceManagerClient", + "rpcs": { + "CreateService": { + "methods": ["createServiceAsync", "createServiceAsync", "createServiceOperationCallable", "createServiceCallable"] + }, + "CreateServiceConfig": { + "methods": ["createServiceConfig", "createServiceConfig", "createServiceConfigCallable"] + }, + "CreateServiceRollout": { + "methods": ["createServiceRolloutAsync", "createServiceRolloutAsync", "createServiceRolloutOperationCallable", "createServiceRolloutCallable"] + }, + "DeleteService": { + "methods": ["deleteServiceAsync", "deleteServiceAsync", "deleteServiceOperationCallable", "deleteServiceCallable"] + }, + "DisableService": { + "methods": ["disableServiceAsync", "disableServiceAsync", "disableServiceOperationCallable", "disableServiceCallable"] + }, + "EnableService": { + "methods": ["enableServiceAsync", "enableServiceAsync", "enableServiceOperationCallable", "enableServiceCallable"] + }, + "GenerateConfigReport": { + "methods": ["generateConfigReport", "generateConfigReport", "generateConfigReportCallable"] + }, + "GetService": { + "methods": ["getService", "getService", "getServiceCallable"] + }, + "GetServiceConfig": { + "methods": ["getServiceConfig", "getServiceConfig", "getServiceConfigCallable"] + }, + "GetServiceRollout": { + "methods": ["getServiceRollout", "getServiceRollout", "getServiceRolloutCallable"] + }, + "ListServiceConfigs": { + "methods": ["listServiceConfigs", "listServiceConfigs", "listServiceConfigsPagedCallable", "listServiceConfigsCallable"] + }, + "ListServiceRollouts": { + "methods": ["listServiceRollouts", "listServiceRollouts", "listServiceRolloutsPagedCallable", "listServiceRolloutsCallable"] + }, + "ListServices": { + "methods": ["listServices", "listServices", "listServicesPagedCallable", "listServicesCallable"] + }, + "SubmitConfigSource": { + "methods": ["submitConfigSourceAsync", "submitConfigSourceAsync", "submitConfigSourceOperationCallable", "submitConfigSourceCallable"] + }, + "UndeleteService": { + "methods": ["undeleteServiceAsync", "undeleteServiceAsync", "undeleteServiceOperationCallable", "undeleteServiceCallable"] + } + } + } + } + } + } +} \ No newline at end of file diff --git a/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/package-info.java b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/package-info.java new file mode 100644 index 0000000..024370d --- /dev/null +++ b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/package-info.java @@ -0,0 +1,36 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +/** + * The interfaces provided are listed below, along with usage samples. + * + *

======================= ServiceManagerClient ======================= + * + *

Service Description: [Google Service Management API](/service-management/overview) + * + *

Sample for ServiceManagerClient: + * + *

{@code
+ * try (ServiceManagerClient serviceManagerClient = ServiceManagerClient.create()) {
+ *   String serviceName = "serviceName-1928572192";
+ *   ManagedService response = serviceManagerClient.getService(serviceName);
+ * }
+ * }
+ */ +@Generated("by gapic-generator-java") +package com.google.cloud.api.servicemanagement.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/GrpcServiceManagerCallableFactory.java b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/GrpcServiceManagerCallableFactory.java new file mode 100644 index 0000000..e9358ae --- /dev/null +++ b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/GrpcServiceManagerCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.api.servicemanagement.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 ServiceManager service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcServiceManagerCallableFactory 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-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/GrpcServiceManagerStub.java b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/GrpcServiceManagerStub.java new file mode 100644 index 0000000..28aca01 --- /dev/null +++ b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/GrpcServiceManagerStub.java @@ -0,0 +1,783 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.api.servicemanagement.v1.stub; + +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServiceConfigsPagedResponse; +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServiceRolloutsPagedResponse; +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServicesPagedResponse; + +import com.google.api.Service; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.servicemanagement.v1.CreateServiceConfigRequest; +import com.google.api.servicemanagement.v1.CreateServiceRequest; +import com.google.api.servicemanagement.v1.CreateServiceRolloutRequest; +import com.google.api.servicemanagement.v1.DeleteServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceResponse; +import com.google.api.servicemanagement.v1.EnableServiceRequest; +import com.google.api.servicemanagement.v1.EnableServiceResponse; +import com.google.api.servicemanagement.v1.GenerateConfigReportRequest; +import com.google.api.servicemanagement.v1.GenerateConfigReportResponse; +import com.google.api.servicemanagement.v1.GetServiceConfigRequest; +import com.google.api.servicemanagement.v1.GetServiceRequest; +import com.google.api.servicemanagement.v1.GetServiceRolloutRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsResponse; +import com.google.api.servicemanagement.v1.ListServiceRolloutsRequest; +import com.google.api.servicemanagement.v1.ListServiceRolloutsResponse; +import com.google.api.servicemanagement.v1.ListServicesRequest; +import com.google.api.servicemanagement.v1.ListServicesResponse; +import com.google.api.servicemanagement.v1.ManagedService; +import com.google.api.servicemanagement.v1.OperationMetadata; +import com.google.api.servicemanagement.v1.Rollout; +import com.google.api.servicemanagement.v1.SubmitConfigSourceRequest; +import com.google.api.servicemanagement.v1.SubmitConfigSourceResponse; +import com.google.api.servicemanagement.v1.UndeleteServiceRequest; +import com.google.api.servicemanagement.v1.UndeleteServiceResponse; +import com.google.common.collect.ImmutableMap; +import com.google.longrunning.Operation; +import com.google.longrunning.stub.GrpcOperationsStub; +import com.google.protobuf.Empty; +import io.grpc.MethodDescriptor; +import io.grpc.protobuf.ProtoUtils; +import java.io.IOException; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * gRPC stub implementation for the ServiceManager service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcServiceManagerStub extends ServiceManagerStub { + private static final MethodDescriptor + listServicesMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.api.servicemanagement.v1.ServiceManager/ListServices") + .setRequestMarshaller(ProtoUtils.marshaller(ListServicesRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListServicesResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.api.servicemanagement.v1.ServiceManager/GetService") + .setRequestMarshaller(ProtoUtils.marshaller(GetServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ManagedService.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.api.servicemanagement.v1.ServiceManager/CreateService") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.api.servicemanagement.v1.ServiceManager/DeleteService") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + undeleteServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.api.servicemanagement.v1.ServiceManager/UndeleteService") + .setRequestMarshaller( + ProtoUtils.marshaller(UndeleteServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listServiceConfigsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.api.servicemanagement.v1.ServiceManager/ListServiceConfigs") + .setRequestMarshaller( + ProtoUtils.marshaller(ListServiceConfigsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListServiceConfigsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getServiceConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.api.servicemanagement.v1.ServiceManager/GetServiceConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(GetServiceConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Service.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createServiceConfigMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.api.servicemanagement.v1.ServiceManager/CreateServiceConfig") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateServiceConfigRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Service.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + submitConfigSourceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.api.servicemanagement.v1.ServiceManager/SubmitConfigSource") + .setRequestMarshaller( + ProtoUtils.marshaller(SubmitConfigSourceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listServiceRolloutsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.api.servicemanagement.v1.ServiceManager/ListServiceRollouts") + .setRequestMarshaller( + ProtoUtils.marshaller(ListServiceRolloutsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListServiceRolloutsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getServiceRolloutMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.api.servicemanagement.v1.ServiceManager/GetServiceRollout") + .setRequestMarshaller( + ProtoUtils.marshaller(GetServiceRolloutRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Rollout.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createServiceRolloutMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.api.servicemanagement.v1.ServiceManager/CreateServiceRollout") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateServiceRolloutRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + generateConfigReportMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.api.servicemanagement.v1.ServiceManager/GenerateConfigReport") + .setRequestMarshaller( + ProtoUtils.marshaller(GenerateConfigReportRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(GenerateConfigReportResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + enableServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.api.servicemanagement.v1.ServiceManager/EnableService") + .setRequestMarshaller( + ProtoUtils.marshaller(EnableServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + disableServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.api.servicemanagement.v1.ServiceManager/DisableService") + .setRequestMarshaller( + ProtoUtils.marshaller(DisableServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private final UnaryCallable listServicesCallable; + private final UnaryCallable + listServicesPagedCallable; + private final UnaryCallable getServiceCallable; + private final UnaryCallable createServiceCallable; + private final OperationCallable + createServiceOperationCallable; + private final UnaryCallable deleteServiceCallable; + private final OperationCallable + deleteServiceOperationCallable; + private final UnaryCallable undeleteServiceCallable; + private final OperationCallable< + UndeleteServiceRequest, UndeleteServiceResponse, OperationMetadata> + undeleteServiceOperationCallable; + private final UnaryCallable + listServiceConfigsCallable; + private final UnaryCallable + listServiceConfigsPagedCallable; + private final UnaryCallable getServiceConfigCallable; + private final UnaryCallable createServiceConfigCallable; + private final UnaryCallable submitConfigSourceCallable; + private final OperationCallable< + SubmitConfigSourceRequest, SubmitConfigSourceResponse, OperationMetadata> + submitConfigSourceOperationCallable; + private final UnaryCallable + listServiceRolloutsCallable; + private final UnaryCallable + listServiceRolloutsPagedCallable; + private final UnaryCallable getServiceRolloutCallable; + private final UnaryCallable createServiceRolloutCallable; + private final OperationCallable + createServiceRolloutOperationCallable; + private final UnaryCallable + generateConfigReportCallable; + private final UnaryCallable enableServiceCallable; + private final OperationCallable + enableServiceOperationCallable; + private final UnaryCallable disableServiceCallable; + private final OperationCallable + disableServiceOperationCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcServiceManagerStub create(ServiceManagerStubSettings settings) + throws IOException { + return new GrpcServiceManagerStub(settings, ClientContext.create(settings)); + } + + public static final GrpcServiceManagerStub create(ClientContext clientContext) + throws IOException { + return new GrpcServiceManagerStub( + ServiceManagerStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcServiceManagerStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcServiceManagerStub( + ServiceManagerStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcServiceManagerStub, 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 GrpcServiceManagerStub(ServiceManagerStubSettings settings, ClientContext clientContext) + throws IOException { + this(settings, clientContext, new GrpcServiceManagerCallableFactory()); + } + + /** + * Constructs an instance of GrpcServiceManagerStub, 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 GrpcServiceManagerStub( + ServiceManagerStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listServicesTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listServicesMethodDescriptor) + .build(); + GrpcCallSettings getServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getServiceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetServiceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createServiceMethodDescriptor) + .build(); + GrpcCallSettings deleteServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteServiceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteServiceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings undeleteServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(undeleteServiceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UndeleteServiceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listServiceConfigsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listServiceConfigsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListServiceConfigsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getServiceConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getServiceConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetServiceConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("config_id", String.valueOf(request.getConfigId())); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createServiceConfigTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createServiceConfigMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateServiceConfigRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings submitConfigSourceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(submitConfigSourceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SubmitConfigSourceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listServiceRolloutsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listServiceRolloutsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListServiceRolloutsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getServiceRolloutTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getServiceRolloutMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetServiceRolloutRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("rollout_id", String.valueOf(request.getRolloutId())); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createServiceRolloutTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createServiceRolloutMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateServiceRolloutRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + generateConfigReportTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(generateConfigReportMethodDescriptor) + .build(); + GrpcCallSettings enableServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(enableServiceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(EnableServiceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings disableServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(disableServiceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DisableServiceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("service_name", String.valueOf(request.getServiceName())); + return params.build(); + } + }) + .build(); + + this.listServicesCallable = + callableFactory.createUnaryCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.listServicesPagedCallable = + callableFactory.createPagedCallable( + listServicesTransportSettings, settings.listServicesSettings(), clientContext); + this.getServiceCallable = + callableFactory.createUnaryCallable( + getServiceTransportSettings, settings.getServiceSettings(), clientContext); + this.createServiceCallable = + callableFactory.createUnaryCallable( + createServiceTransportSettings, settings.createServiceSettings(), clientContext); + this.createServiceOperationCallable = + callableFactory.createOperationCallable( + createServiceTransportSettings, + settings.createServiceOperationSettings(), + clientContext, + operationsStub); + this.deleteServiceCallable = + callableFactory.createUnaryCallable( + deleteServiceTransportSettings, settings.deleteServiceSettings(), clientContext); + this.deleteServiceOperationCallable = + callableFactory.createOperationCallable( + deleteServiceTransportSettings, + settings.deleteServiceOperationSettings(), + clientContext, + operationsStub); + this.undeleteServiceCallable = + callableFactory.createUnaryCallable( + undeleteServiceTransportSettings, settings.undeleteServiceSettings(), clientContext); + this.undeleteServiceOperationCallable = + callableFactory.createOperationCallable( + undeleteServiceTransportSettings, + settings.undeleteServiceOperationSettings(), + clientContext, + operationsStub); + this.listServiceConfigsCallable = + callableFactory.createUnaryCallable( + listServiceConfigsTransportSettings, + settings.listServiceConfigsSettings(), + clientContext); + this.listServiceConfigsPagedCallable = + callableFactory.createPagedCallable( + listServiceConfigsTransportSettings, + settings.listServiceConfigsSettings(), + clientContext); + this.getServiceConfigCallable = + callableFactory.createUnaryCallable( + getServiceConfigTransportSettings, settings.getServiceConfigSettings(), clientContext); + this.createServiceConfigCallable = + callableFactory.createUnaryCallable( + createServiceConfigTransportSettings, + settings.createServiceConfigSettings(), + clientContext); + this.submitConfigSourceCallable = + callableFactory.createUnaryCallable( + submitConfigSourceTransportSettings, + settings.submitConfigSourceSettings(), + clientContext); + this.submitConfigSourceOperationCallable = + callableFactory.createOperationCallable( + submitConfigSourceTransportSettings, + settings.submitConfigSourceOperationSettings(), + clientContext, + operationsStub); + this.listServiceRolloutsCallable = + callableFactory.createUnaryCallable( + listServiceRolloutsTransportSettings, + settings.listServiceRolloutsSettings(), + clientContext); + this.listServiceRolloutsPagedCallable = + callableFactory.createPagedCallable( + listServiceRolloutsTransportSettings, + settings.listServiceRolloutsSettings(), + clientContext); + this.getServiceRolloutCallable = + callableFactory.createUnaryCallable( + getServiceRolloutTransportSettings, + settings.getServiceRolloutSettings(), + clientContext); + this.createServiceRolloutCallable = + callableFactory.createUnaryCallable( + createServiceRolloutTransportSettings, + settings.createServiceRolloutSettings(), + clientContext); + this.createServiceRolloutOperationCallable = + callableFactory.createOperationCallable( + createServiceRolloutTransportSettings, + settings.createServiceRolloutOperationSettings(), + clientContext, + operationsStub); + this.generateConfigReportCallable = + callableFactory.createUnaryCallable( + generateConfigReportTransportSettings, + settings.generateConfigReportSettings(), + clientContext); + this.enableServiceCallable = + callableFactory.createUnaryCallable( + enableServiceTransportSettings, settings.enableServiceSettings(), clientContext); + this.enableServiceOperationCallable = + callableFactory.createOperationCallable( + enableServiceTransportSettings, + settings.enableServiceOperationSettings(), + clientContext, + operationsStub); + this.disableServiceCallable = + callableFactory.createUnaryCallable( + disableServiceTransportSettings, settings.disableServiceSettings(), clientContext); + this.disableServiceOperationCallable = + callableFactory.createOperationCallable( + disableServiceTransportSettings, + settings.disableServiceOperationSettings(), + clientContext, + operationsStub); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + @Override + public UnaryCallable listServicesCallable() { + return listServicesCallable; + } + + @Override + public UnaryCallable listServicesPagedCallable() { + return listServicesPagedCallable; + } + + @Override + public UnaryCallable getServiceCallable() { + return getServiceCallable; + } + + @Override + public UnaryCallable createServiceCallable() { + return createServiceCallable; + } + + @Override + public OperationCallable + createServiceOperationCallable() { + return createServiceOperationCallable; + } + + @Override + public UnaryCallable deleteServiceCallable() { + return deleteServiceCallable; + } + + @Override + public OperationCallable + deleteServiceOperationCallable() { + return deleteServiceOperationCallable; + } + + @Override + public UnaryCallable undeleteServiceCallable() { + return undeleteServiceCallable; + } + + @Override + public OperationCallable + undeleteServiceOperationCallable() { + return undeleteServiceOperationCallable; + } + + @Override + public UnaryCallable + listServiceConfigsCallable() { + return listServiceConfigsCallable; + } + + @Override + public UnaryCallable + listServiceConfigsPagedCallable() { + return listServiceConfigsPagedCallable; + } + + @Override + public UnaryCallable getServiceConfigCallable() { + return getServiceConfigCallable; + } + + @Override + public UnaryCallable createServiceConfigCallable() { + return createServiceConfigCallable; + } + + @Override + public UnaryCallable submitConfigSourceCallable() { + return submitConfigSourceCallable; + } + + @Override + public OperationCallable + submitConfigSourceOperationCallable() { + return submitConfigSourceOperationCallable; + } + + @Override + public UnaryCallable + listServiceRolloutsCallable() { + return listServiceRolloutsCallable; + } + + @Override + public UnaryCallable + listServiceRolloutsPagedCallable() { + return listServiceRolloutsPagedCallable; + } + + @Override + public UnaryCallable getServiceRolloutCallable() { + return getServiceRolloutCallable; + } + + @Override + public UnaryCallable createServiceRolloutCallable() { + return createServiceRolloutCallable; + } + + @Override + public OperationCallable + createServiceRolloutOperationCallable() { + return createServiceRolloutOperationCallable; + } + + @Override + public UnaryCallable + generateConfigReportCallable() { + return generateConfigReportCallable; + } + + @Override + public UnaryCallable enableServiceCallable() { + return enableServiceCallable; + } + + @Override + public OperationCallable + enableServiceOperationCallable() { + return enableServiceOperationCallable; + } + + @Override + public UnaryCallable disableServiceCallable() { + return disableServiceCallable; + } + + @Override + public OperationCallable + disableServiceOperationCallable() { + return disableServiceOperationCallable; + } + + @Override + public final void close() { + shutdown(); + } + + @Override + public void shutdown() { + backgroundResources.shutdown(); + } + + @Override + public boolean isShutdown() { + return backgroundResources.isShutdown(); + } + + @Override + public boolean isTerminated() { + return backgroundResources.isTerminated(); + } + + @Override + public void shutdownNow() { + backgroundResources.shutdownNow(); + } + + @Override + public boolean awaitTermination(long duration, TimeUnit unit) throws InterruptedException { + return backgroundResources.awaitTermination(duration, unit); + } +} diff --git a/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/ServiceManagerStub.java b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/ServiceManagerStub.java new file mode 100644 index 0000000..7cf591b --- /dev/null +++ b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/ServiceManagerStub.java @@ -0,0 +1,187 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.api.servicemanagement.v1.stub; + +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServiceConfigsPagedResponse; +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServiceRolloutsPagedResponse; +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServicesPagedResponse; + +import com.google.api.Service; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.servicemanagement.v1.CreateServiceConfigRequest; +import com.google.api.servicemanagement.v1.CreateServiceRequest; +import com.google.api.servicemanagement.v1.CreateServiceRolloutRequest; +import com.google.api.servicemanagement.v1.DeleteServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceResponse; +import com.google.api.servicemanagement.v1.EnableServiceRequest; +import com.google.api.servicemanagement.v1.EnableServiceResponse; +import com.google.api.servicemanagement.v1.GenerateConfigReportRequest; +import com.google.api.servicemanagement.v1.GenerateConfigReportResponse; +import com.google.api.servicemanagement.v1.GetServiceConfigRequest; +import com.google.api.servicemanagement.v1.GetServiceRequest; +import com.google.api.servicemanagement.v1.GetServiceRolloutRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsResponse; +import com.google.api.servicemanagement.v1.ListServiceRolloutsRequest; +import com.google.api.servicemanagement.v1.ListServiceRolloutsResponse; +import com.google.api.servicemanagement.v1.ListServicesRequest; +import com.google.api.servicemanagement.v1.ListServicesResponse; +import com.google.api.servicemanagement.v1.ManagedService; +import com.google.api.servicemanagement.v1.OperationMetadata; +import com.google.api.servicemanagement.v1.Rollout; +import com.google.api.servicemanagement.v1.SubmitConfigSourceRequest; +import com.google.api.servicemanagement.v1.SubmitConfigSourceResponse; +import com.google.api.servicemanagement.v1.UndeleteServiceRequest; +import com.google.api.servicemanagement.v1.UndeleteServiceResponse; +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 ServiceManager service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class ServiceManagerStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable listServicesPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesPagedCallable()"); + } + + public UnaryCallable listServicesCallable() { + throw new UnsupportedOperationException("Not implemented: listServicesCallable()"); + } + + public UnaryCallable getServiceCallable() { + throw new UnsupportedOperationException("Not implemented: getServiceCallable()"); + } + + public OperationCallable + createServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceOperationCallable()"); + } + + public UnaryCallable createServiceCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceCallable()"); + } + + public OperationCallable + deleteServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceOperationCallable()"); + } + + public UnaryCallable deleteServiceCallable() { + throw new UnsupportedOperationException("Not implemented: deleteServiceCallable()"); + } + + public OperationCallable + undeleteServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: undeleteServiceOperationCallable()"); + } + + public UnaryCallable undeleteServiceCallable() { + throw new UnsupportedOperationException("Not implemented: undeleteServiceCallable()"); + } + + public UnaryCallable + listServiceConfigsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listServiceConfigsPagedCallable()"); + } + + public UnaryCallable + listServiceConfigsCallable() { + throw new UnsupportedOperationException("Not implemented: listServiceConfigsCallable()"); + } + + public UnaryCallable getServiceConfigCallable() { + throw new UnsupportedOperationException("Not implemented: getServiceConfigCallable()"); + } + + public UnaryCallable createServiceConfigCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceConfigCallable()"); + } + + public OperationCallable + submitConfigSourceOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: submitConfigSourceOperationCallable()"); + } + + public UnaryCallable submitConfigSourceCallable() { + throw new UnsupportedOperationException("Not implemented: submitConfigSourceCallable()"); + } + + public UnaryCallable + listServiceRolloutsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listServiceRolloutsPagedCallable()"); + } + + public UnaryCallable + listServiceRolloutsCallable() { + throw new UnsupportedOperationException("Not implemented: listServiceRolloutsCallable()"); + } + + public UnaryCallable getServiceRolloutCallable() { + throw new UnsupportedOperationException("Not implemented: getServiceRolloutCallable()"); + } + + public OperationCallable + createServiceRolloutOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createServiceRolloutOperationCallable()"); + } + + public UnaryCallable createServiceRolloutCallable() { + throw new UnsupportedOperationException("Not implemented: createServiceRolloutCallable()"); + } + + public UnaryCallable + generateConfigReportCallable() { + throw new UnsupportedOperationException("Not implemented: generateConfigReportCallable()"); + } + + public OperationCallable + enableServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: enableServiceOperationCallable()"); + } + + public UnaryCallable enableServiceCallable() { + throw new UnsupportedOperationException("Not implemented: enableServiceCallable()"); + } + + public OperationCallable + disableServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: disableServiceOperationCallable()"); + } + + public UnaryCallable disableServiceCallable() { + throw new UnsupportedOperationException("Not implemented: disableServiceCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/ServiceManagerStubSettings.java b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/ServiceManagerStubSettings.java new file mode 100644 index 0000000..b00c4fc --- /dev/null +++ b/google-cloud-service-management/src/main/java/com/google/cloud/api/servicemanagement/v1/stub/ServiceManagerStubSettings.java @@ -0,0 +1,1176 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.api.servicemanagement.v1.stub; + +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServiceConfigsPagedResponse; +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServiceRolloutsPagedResponse; +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServicesPagedResponse; + +import com.google.api.Service; +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.api.servicemanagement.v1.CreateServiceConfigRequest; +import com.google.api.servicemanagement.v1.CreateServiceRequest; +import com.google.api.servicemanagement.v1.CreateServiceRolloutRequest; +import com.google.api.servicemanagement.v1.DeleteServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceResponse; +import com.google.api.servicemanagement.v1.EnableServiceRequest; +import com.google.api.servicemanagement.v1.EnableServiceResponse; +import com.google.api.servicemanagement.v1.GenerateConfigReportRequest; +import com.google.api.servicemanagement.v1.GenerateConfigReportResponse; +import com.google.api.servicemanagement.v1.GetServiceConfigRequest; +import com.google.api.servicemanagement.v1.GetServiceRequest; +import com.google.api.servicemanagement.v1.GetServiceRolloutRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsResponse; +import com.google.api.servicemanagement.v1.ListServiceRolloutsRequest; +import com.google.api.servicemanagement.v1.ListServiceRolloutsResponse; +import com.google.api.servicemanagement.v1.ListServicesRequest; +import com.google.api.servicemanagement.v1.ListServicesResponse; +import com.google.api.servicemanagement.v1.ManagedService; +import com.google.api.servicemanagement.v1.OperationMetadata; +import com.google.api.servicemanagement.v1.Rollout; +import com.google.api.servicemanagement.v1.SubmitConfigSourceRequest; +import com.google.api.servicemanagement.v1.SubmitConfigSourceResponse; +import com.google.api.servicemanagement.v1.UndeleteServiceRequest; +import com.google.api.servicemanagement.v1.UndeleteServiceResponse; +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 ServiceManagerStub}. + * + *

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

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

{@code
+ * ServiceManagerStubSettings.Builder serviceManagerSettingsBuilder =
+ *     ServiceManagerStubSettings.newBuilder();
+ * serviceManagerSettingsBuilder
+ *     .getServiceSettings()
+ *     .setRetrySettings(
+ *         serviceManagerSettingsBuilder
+ *             .getServiceSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * ServiceManagerStubSettings serviceManagerSettings = serviceManagerSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class ServiceManagerStubSettings 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") + .add("https://www.googleapis.com/auth/cloud-platform.read-only") + .add("https://www.googleapis.com/auth/service.management") + .add("https://www.googleapis.com/auth/service.management.readonly") + .build(); + + private final PagedCallSettings< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings getServiceSettings; + private final UnaryCallSettings createServiceSettings; + private final OperationCallSettings + createServiceOperationSettings; + private final UnaryCallSettings deleteServiceSettings; + private final OperationCallSettings + deleteServiceOperationSettings; + private final UnaryCallSettings undeleteServiceSettings; + private final OperationCallSettings< + UndeleteServiceRequest, UndeleteServiceResponse, OperationMetadata> + undeleteServiceOperationSettings; + private final PagedCallSettings< + ListServiceConfigsRequest, ListServiceConfigsResponse, ListServiceConfigsPagedResponse> + listServiceConfigsSettings; + private final UnaryCallSettings getServiceConfigSettings; + private final UnaryCallSettings createServiceConfigSettings; + private final UnaryCallSettings submitConfigSourceSettings; + private final OperationCallSettings< + SubmitConfigSourceRequest, SubmitConfigSourceResponse, OperationMetadata> + submitConfigSourceOperationSettings; + private final PagedCallSettings< + ListServiceRolloutsRequest, ListServiceRolloutsResponse, ListServiceRolloutsPagedResponse> + listServiceRolloutsSettings; + private final UnaryCallSettings getServiceRolloutSettings; + private final UnaryCallSettings + createServiceRolloutSettings; + private final OperationCallSettings + createServiceRolloutOperationSettings; + private final UnaryCallSettings + generateConfigReportSettings; + private final UnaryCallSettings enableServiceSettings; + private final OperationCallSettings< + EnableServiceRequest, EnableServiceResponse, OperationMetadata> + enableServiceOperationSettings; + private final UnaryCallSettings disableServiceSettings; + private final OperationCallSettings< + DisableServiceRequest, DisableServiceResponse, OperationMetadata> + disableServiceOperationSettings; + + private static final PagedListDescriptor< + ListServicesRequest, ListServicesResponse, ManagedService> + LIST_SERVICES_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListServicesRequest injectToken(ListServicesRequest payload, String token) { + return ListServicesRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListServicesRequest injectPageSize(ListServicesRequest payload, int pageSize) { + return ListServicesRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListServicesRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListServicesResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListServicesResponse payload) { + return payload.getServicesList() == null + ? ImmutableList.of() + : payload.getServicesList(); + } + }; + + private static final PagedListDescriptor< + ListServiceConfigsRequest, ListServiceConfigsResponse, Service> + LIST_SERVICE_CONFIGS_PAGE_STR_DESC = + new PagedListDescriptor< + ListServiceConfigsRequest, ListServiceConfigsResponse, Service>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListServiceConfigsRequest injectToken( + ListServiceConfigsRequest payload, String token) { + return ListServiceConfigsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListServiceConfigsRequest injectPageSize( + ListServiceConfigsRequest payload, int pageSize) { + return ListServiceConfigsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListServiceConfigsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListServiceConfigsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListServiceConfigsResponse payload) { + return payload.getServiceConfigsList() == null + ? ImmutableList.of() + : payload.getServiceConfigsList(); + } + }; + + private static final PagedListDescriptor< + ListServiceRolloutsRequest, ListServiceRolloutsResponse, Rollout> + LIST_SERVICE_ROLLOUTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListServiceRolloutsRequest, ListServiceRolloutsResponse, Rollout>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListServiceRolloutsRequest injectToken( + ListServiceRolloutsRequest payload, String token) { + return ListServiceRolloutsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListServiceRolloutsRequest injectPageSize( + ListServiceRolloutsRequest payload, int pageSize) { + return ListServiceRolloutsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListServiceRolloutsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListServiceRolloutsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListServiceRolloutsResponse payload) { + return payload.getRolloutsList() == null + ? ImmutableList.of() + : payload.getRolloutsList(); + } + }; + + private static final PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + LIST_SERVICES_PAGE_STR_FACT = + new PagedListResponseFactory< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListServicesRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SERVICES_PAGE_STR_DESC, request, context); + return ListServicesPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListServiceConfigsRequest, ListServiceConfigsResponse, ListServiceConfigsPagedResponse> + LIST_SERVICE_CONFIGS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListServiceConfigsRequest, + ListServiceConfigsResponse, + ListServiceConfigsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListServiceConfigsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_SERVICE_CONFIGS_PAGE_STR_DESC, request, context); + return ListServiceConfigsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListServiceRolloutsRequest, ListServiceRolloutsResponse, ListServiceRolloutsPagedResponse> + LIST_SERVICE_ROLLOUTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListServiceRolloutsRequest, + ListServiceRolloutsResponse, + ListServiceRolloutsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListServiceRolloutsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_SERVICE_ROLLOUTS_PAGE_STR_DESC, request, context); + return ListServiceRolloutsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listServices. */ + public PagedCallSettings + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the object with the settings used for calls to getService. */ + public UnaryCallSettings getServiceSettings() { + return getServiceSettings; + } + + /** Returns the object with the settings used for calls to createService. */ + public UnaryCallSettings createServiceSettings() { + return createServiceSettings; + } + + /** Returns the object with the settings used for calls to createService. */ + public OperationCallSettings + createServiceOperationSettings() { + return createServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public UnaryCallSettings deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the object with the settings used for calls to deleteService. */ + public OperationCallSettings + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to undeleteService. */ + public UnaryCallSettings undeleteServiceSettings() { + return undeleteServiceSettings; + } + + /** Returns the object with the settings used for calls to undeleteService. */ + public OperationCallSettings + undeleteServiceOperationSettings() { + return undeleteServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to listServiceConfigs. */ + public PagedCallSettings< + ListServiceConfigsRequest, ListServiceConfigsResponse, ListServiceConfigsPagedResponse> + listServiceConfigsSettings() { + return listServiceConfigsSettings; + } + + /** Returns the object with the settings used for calls to getServiceConfig. */ + public UnaryCallSettings getServiceConfigSettings() { + return getServiceConfigSettings; + } + + /** Returns the object with the settings used for calls to createServiceConfig. */ + public UnaryCallSettings createServiceConfigSettings() { + return createServiceConfigSettings; + } + + /** Returns the object with the settings used for calls to submitConfigSource. */ + public UnaryCallSettings submitConfigSourceSettings() { + return submitConfigSourceSettings; + } + + /** Returns the object with the settings used for calls to submitConfigSource. */ + public OperationCallSettings< + SubmitConfigSourceRequest, SubmitConfigSourceResponse, OperationMetadata> + submitConfigSourceOperationSettings() { + return submitConfigSourceOperationSettings; + } + + /** Returns the object with the settings used for calls to listServiceRollouts. */ + public PagedCallSettings< + ListServiceRolloutsRequest, ListServiceRolloutsResponse, ListServiceRolloutsPagedResponse> + listServiceRolloutsSettings() { + return listServiceRolloutsSettings; + } + + /** Returns the object with the settings used for calls to getServiceRollout. */ + public UnaryCallSettings getServiceRolloutSettings() { + return getServiceRolloutSettings; + } + + /** Returns the object with the settings used for calls to createServiceRollout. */ + public UnaryCallSettings createServiceRolloutSettings() { + return createServiceRolloutSettings; + } + + /** Returns the object with the settings used for calls to createServiceRollout. */ + public OperationCallSettings + createServiceRolloutOperationSettings() { + return createServiceRolloutOperationSettings; + } + + /** Returns the object with the settings used for calls to generateConfigReport. */ + public UnaryCallSettings + generateConfigReportSettings() { + return generateConfigReportSettings; + } + + /** Returns the object with the settings used for calls to enableService. */ + public UnaryCallSettings enableServiceSettings() { + return enableServiceSettings; + } + + /** Returns the object with the settings used for calls to enableService. */ + public OperationCallSettings + enableServiceOperationSettings() { + return enableServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to disableService. */ + public UnaryCallSettings disableServiceSettings() { + return disableServiceSettings; + } + + /** Returns the object with the settings used for calls to disableService. */ + public OperationCallSettings + disableServiceOperationSettings() { + return disableServiceOperationSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public ServiceManagerStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcServiceManagerStub.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 "servicemanagement.googleapis.com:443"; + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return DEFAULT_SERVICE_SCOPES; + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return GoogleCredentialsProvider.newBuilder().setScopesToApply(DEFAULT_SERVICE_SCOPES); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return InstantiatingGrpcChannelProvider.newBuilder() + .setMaxInboundMessageSize(Integer.MAX_VALUE); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return defaultGrpcTransportProviderBuilder().build(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return ApiClientHeaderProvider.newBuilder() + .setGeneratedLibToken( + "gapic", GaxProperties.getLibraryVersion(ServiceManagerStubSettings.class)) + .setTransportToken( + GaxGrpcProperties.getGrpcTokenName(), GaxGrpcProperties.getGrpcVersion()); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder() { + return Builder.createDefault(); + } + + /** Returns a new builder for this class. */ + public static Builder newBuilder(ClientContext clientContext) { + return new Builder(clientContext); + } + + /** Returns a builder containing all the values of this settings class. */ + public Builder toBuilder() { + return new Builder(this); + } + + protected ServiceManagerStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listServicesSettings = settingsBuilder.listServicesSettings().build(); + getServiceSettings = settingsBuilder.getServiceSettings().build(); + createServiceSettings = settingsBuilder.createServiceSettings().build(); + createServiceOperationSettings = settingsBuilder.createServiceOperationSettings().build(); + deleteServiceSettings = settingsBuilder.deleteServiceSettings().build(); + deleteServiceOperationSettings = settingsBuilder.deleteServiceOperationSettings().build(); + undeleteServiceSettings = settingsBuilder.undeleteServiceSettings().build(); + undeleteServiceOperationSettings = settingsBuilder.undeleteServiceOperationSettings().build(); + listServiceConfigsSettings = settingsBuilder.listServiceConfigsSettings().build(); + getServiceConfigSettings = settingsBuilder.getServiceConfigSettings().build(); + createServiceConfigSettings = settingsBuilder.createServiceConfigSettings().build(); + submitConfigSourceSettings = settingsBuilder.submitConfigSourceSettings().build(); + submitConfigSourceOperationSettings = + settingsBuilder.submitConfigSourceOperationSettings().build(); + listServiceRolloutsSettings = settingsBuilder.listServiceRolloutsSettings().build(); + getServiceRolloutSettings = settingsBuilder.getServiceRolloutSettings().build(); + createServiceRolloutSettings = settingsBuilder.createServiceRolloutSettings().build(); + createServiceRolloutOperationSettings = + settingsBuilder.createServiceRolloutOperationSettings().build(); + generateConfigReportSettings = settingsBuilder.generateConfigReportSettings().build(); + enableServiceSettings = settingsBuilder.enableServiceSettings().build(); + enableServiceOperationSettings = settingsBuilder.enableServiceOperationSettings().build(); + disableServiceSettings = settingsBuilder.disableServiceSettings().build(); + disableServiceOperationSettings = settingsBuilder.disableServiceOperationSettings().build(); + } + + /** Builder for ServiceManagerStubSettings. */ + public static class Builder extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings; + private final UnaryCallSettings.Builder getServiceSettings; + private final UnaryCallSettings.Builder createServiceSettings; + private final OperationCallSettings.Builder< + CreateServiceRequest, ManagedService, OperationMetadata> + createServiceOperationSettings; + private final UnaryCallSettings.Builder deleteServiceSettings; + private final OperationCallSettings.Builder + deleteServiceOperationSettings; + private final UnaryCallSettings.Builder + undeleteServiceSettings; + private final OperationCallSettings.Builder< + UndeleteServiceRequest, UndeleteServiceResponse, OperationMetadata> + undeleteServiceOperationSettings; + private final PagedCallSettings.Builder< + ListServiceConfigsRequest, ListServiceConfigsResponse, ListServiceConfigsPagedResponse> + listServiceConfigsSettings; + private final UnaryCallSettings.Builder + getServiceConfigSettings; + private final UnaryCallSettings.Builder + createServiceConfigSettings; + private final UnaryCallSettings.Builder + submitConfigSourceSettings; + private final OperationCallSettings.Builder< + SubmitConfigSourceRequest, SubmitConfigSourceResponse, OperationMetadata> + submitConfigSourceOperationSettings; + private final PagedCallSettings.Builder< + ListServiceRolloutsRequest, + ListServiceRolloutsResponse, + ListServiceRolloutsPagedResponse> + listServiceRolloutsSettings; + private final UnaryCallSettings.Builder + getServiceRolloutSettings; + private final UnaryCallSettings.Builder + createServiceRolloutSettings; + private final OperationCallSettings.Builder< + CreateServiceRolloutRequest, Rollout, OperationMetadata> + createServiceRolloutOperationSettings; + private final UnaryCallSettings.Builder< + GenerateConfigReportRequest, GenerateConfigReportResponse> + generateConfigReportSettings; + private final UnaryCallSettings.Builder enableServiceSettings; + private final OperationCallSettings.Builder< + EnableServiceRequest, EnableServiceResponse, OperationMetadata> + enableServiceOperationSettings; + private final UnaryCallSettings.Builder + disableServiceSettings; + private final OperationCallSettings.Builder< + DisableServiceRequest, DisableServiceResponse, OperationMetadata> + disableServiceOperationSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "no_retry_0_codes", ImmutableSet.copyOf(Lists.newArrayList())); + RETRYABLE_CODE_DEFINITIONS = definitions.build(); + } + + private static final ImmutableMap RETRY_PARAM_DEFINITIONS; + + static { + ImmutableMap.Builder definitions = ImmutableMap.builder(); + RetrySettings settings = null; + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(10000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(10000L)) + .setTotalTimeout(Duration.ofMillis(10000L)) + .build(); + definitions.put("no_retry_0_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listServicesSettings = PagedCallSettings.newBuilder(LIST_SERVICES_PAGE_STR_FACT); + getServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceOperationSettings = OperationCallSettings.newBuilder(); + deleteServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteServiceOperationSettings = OperationCallSettings.newBuilder(); + undeleteServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + undeleteServiceOperationSettings = OperationCallSettings.newBuilder(); + listServiceConfigsSettings = PagedCallSettings.newBuilder(LIST_SERVICE_CONFIGS_PAGE_STR_FACT); + getServiceConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceConfigSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + submitConfigSourceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + submitConfigSourceOperationSettings = OperationCallSettings.newBuilder(); + listServiceRolloutsSettings = + PagedCallSettings.newBuilder(LIST_SERVICE_ROLLOUTS_PAGE_STR_FACT); + getServiceRolloutSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceRolloutSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createServiceRolloutOperationSettings = OperationCallSettings.newBuilder(); + generateConfigReportSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + enableServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + enableServiceOperationSettings = OperationCallSettings.newBuilder(); + disableServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + disableServiceOperationSettings = OperationCallSettings.newBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServicesSettings, + getServiceSettings, + createServiceSettings, + deleteServiceSettings, + undeleteServiceSettings, + listServiceConfigsSettings, + getServiceConfigSettings, + createServiceConfigSettings, + submitConfigSourceSettings, + listServiceRolloutsSettings, + getServiceRolloutSettings, + createServiceRolloutSettings, + generateConfigReportSettings, + enableServiceSettings, + disableServiceSettings); + initDefaults(this); + } + + protected Builder(ServiceManagerStubSettings settings) { + super(settings); + + listServicesSettings = settings.listServicesSettings.toBuilder(); + getServiceSettings = settings.getServiceSettings.toBuilder(); + createServiceSettings = settings.createServiceSettings.toBuilder(); + createServiceOperationSettings = settings.createServiceOperationSettings.toBuilder(); + deleteServiceSettings = settings.deleteServiceSettings.toBuilder(); + deleteServiceOperationSettings = settings.deleteServiceOperationSettings.toBuilder(); + undeleteServiceSettings = settings.undeleteServiceSettings.toBuilder(); + undeleteServiceOperationSettings = settings.undeleteServiceOperationSettings.toBuilder(); + listServiceConfigsSettings = settings.listServiceConfigsSettings.toBuilder(); + getServiceConfigSettings = settings.getServiceConfigSettings.toBuilder(); + createServiceConfigSettings = settings.createServiceConfigSettings.toBuilder(); + submitConfigSourceSettings = settings.submitConfigSourceSettings.toBuilder(); + submitConfigSourceOperationSettings = + settings.submitConfigSourceOperationSettings.toBuilder(); + listServiceRolloutsSettings = settings.listServiceRolloutsSettings.toBuilder(); + getServiceRolloutSettings = settings.getServiceRolloutSettings.toBuilder(); + createServiceRolloutSettings = settings.createServiceRolloutSettings.toBuilder(); + createServiceRolloutOperationSettings = + settings.createServiceRolloutOperationSettings.toBuilder(); + generateConfigReportSettings = settings.generateConfigReportSettings.toBuilder(); + enableServiceSettings = settings.enableServiceSettings.toBuilder(); + enableServiceOperationSettings = settings.enableServiceOperationSettings.toBuilder(); + disableServiceSettings = settings.disableServiceSettings.toBuilder(); + disableServiceOperationSettings = settings.disableServiceOperationSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listServicesSettings, + getServiceSettings, + createServiceSettings, + deleteServiceSettings, + undeleteServiceSettings, + listServiceConfigsSettings, + getServiceConfigSettings, + createServiceConfigSettings, + submitConfigSourceSettings, + listServiceRolloutsSettings, + getServiceRolloutSettings, + createServiceRolloutSettings, + generateConfigReportSettings, + enableServiceSettings, + disableServiceSettings); + } + + private static Builder createDefault() { + Builder builder = new Builder(((ClientContext) null)); + + builder.setTransportChannelProvider(defaultTransportChannelProvider()); + builder.setCredentialsProvider(defaultCredentialsProviderBuilder().build()); + builder.setInternalHeaderProvider(defaultApiClientHeaderProviderBuilder().build()); + builder.setEndpoint(getDefaultEndpoint()); + + return initDefaults(builder); + } + + private static Builder initDefaults(Builder builder) { + builder + .listServicesSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .deleteServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .undeleteServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listServiceConfigsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getServiceConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createServiceConfigSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .submitConfigSourceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .listServiceRolloutsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .getServiceRolloutSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createServiceRolloutSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .generateConfigReportSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .enableServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .disableServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")); + + builder + .createServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(ManagedService.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 + .deleteServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + builder + .undeleteServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(UndeleteServiceResponse.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 + .submitConfigSourceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + SubmitConfigSourceResponse.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 + .createServiceRolloutOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Rollout.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 + .enableServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(EnableServiceResponse.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 + .disableServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_0_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(DisableServiceResponse.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listServices. */ + public PagedCallSettings.Builder< + ListServicesRequest, ListServicesResponse, ListServicesPagedResponse> + listServicesSettings() { + return listServicesSettings; + } + + /** Returns the builder for the settings used for calls to getService. */ + public UnaryCallSettings.Builder getServiceSettings() { + return getServiceSettings; + } + + /** Returns the builder for the settings used for calls to createService. */ + public UnaryCallSettings.Builder createServiceSettings() { + return createServiceSettings; + } + + /** Returns the builder for the settings used for calls to createService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createServiceOperationSettings() { + return createServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + public UnaryCallSettings.Builder deleteServiceSettings() { + return deleteServiceSettings; + } + + /** Returns the builder for the settings used for calls to deleteService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + deleteServiceOperationSettings() { + return deleteServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to undeleteService. */ + public UnaryCallSettings.Builder undeleteServiceSettings() { + return undeleteServiceSettings; + } + + /** Returns the builder for the settings used for calls to undeleteService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + UndeleteServiceRequest, UndeleteServiceResponse, OperationMetadata> + undeleteServiceOperationSettings() { + return undeleteServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listServiceConfigs. */ + public PagedCallSettings.Builder< + ListServiceConfigsRequest, ListServiceConfigsResponse, ListServiceConfigsPagedResponse> + listServiceConfigsSettings() { + return listServiceConfigsSettings; + } + + /** Returns the builder for the settings used for calls to getServiceConfig. */ + public UnaryCallSettings.Builder getServiceConfigSettings() { + return getServiceConfigSettings; + } + + /** Returns the builder for the settings used for calls to createServiceConfig. */ + public UnaryCallSettings.Builder + createServiceConfigSettings() { + return createServiceConfigSettings; + } + + /** Returns the builder for the settings used for calls to submitConfigSource. */ + public UnaryCallSettings.Builder + submitConfigSourceSettings() { + return submitConfigSourceSettings; + } + + /** Returns the builder for the settings used for calls to submitConfigSource. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + SubmitConfigSourceRequest, SubmitConfigSourceResponse, OperationMetadata> + submitConfigSourceOperationSettings() { + return submitConfigSourceOperationSettings; + } + + /** Returns the builder for the settings used for calls to listServiceRollouts. */ + public PagedCallSettings.Builder< + ListServiceRolloutsRequest, + ListServiceRolloutsResponse, + ListServiceRolloutsPagedResponse> + listServiceRolloutsSettings() { + return listServiceRolloutsSettings; + } + + /** Returns the builder for the settings used for calls to getServiceRollout. */ + public UnaryCallSettings.Builder + getServiceRolloutSettings() { + return getServiceRolloutSettings; + } + + /** Returns the builder for the settings used for calls to createServiceRollout. */ + public UnaryCallSettings.Builder + createServiceRolloutSettings() { + return createServiceRolloutSettings; + } + + /** Returns the builder for the settings used for calls to createServiceRollout. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createServiceRolloutOperationSettings() { + return createServiceRolloutOperationSettings; + } + + /** Returns the builder for the settings used for calls to generateConfigReport. */ + public UnaryCallSettings.Builder + generateConfigReportSettings() { + return generateConfigReportSettings; + } + + /** Returns the builder for the settings used for calls to enableService. */ + public UnaryCallSettings.Builder enableServiceSettings() { + return enableServiceSettings; + } + + /** Returns the builder for the settings used for calls to enableService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + EnableServiceRequest, EnableServiceResponse, OperationMetadata> + enableServiceOperationSettings() { + return enableServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to disableService. */ + public UnaryCallSettings.Builder disableServiceSettings() { + return disableServiceSettings; + } + + /** Returns the builder for the settings used for calls to disableService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + DisableServiceRequest, DisableServiceResponse, OperationMetadata> + disableServiceOperationSettings() { + return disableServiceOperationSettings; + } + + @Override + public ServiceManagerStubSettings build() throws IOException { + return new ServiceManagerStubSettings(this); + } + } +} diff --git a/google-cloud-service-management/src/test/java/com/google/cloud/api/servicemanagement/v1/MockServiceManager.java b/google-cloud-service-management/src/test/java/com/google/cloud/api/servicemanagement/v1/MockServiceManager.java new file mode 100644 index 0000000..81e29e8 --- /dev/null +++ b/google-cloud-service-management/src/test/java/com/google/cloud/api/servicemanagement/v1/MockServiceManager.java @@ -0,0 +1,59 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.api.servicemanagement.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 MockServiceManager implements MockGrpcService { + private final MockServiceManagerImpl serviceImpl; + + public MockServiceManager() { + serviceImpl = new MockServiceManagerImpl(); + } + + @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-service-management/src/test/java/com/google/cloud/api/servicemanagement/v1/MockServiceManagerImpl.java b/google-cloud-service-management/src/test/java/com/google/cloud/api/servicemanagement/v1/MockServiceManagerImpl.java new file mode 100644 index 0000000..e47bfe3 --- /dev/null +++ b/google-cloud-service-management/src/test/java/com/google/cloud/api/servicemanagement/v1/MockServiceManagerImpl.java @@ -0,0 +1,401 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.api.servicemanagement.v1; + +import com.google.api.Service; +import com.google.api.core.BetaApi; +import com.google.api.servicemanagement.v1.CreateServiceConfigRequest; +import com.google.api.servicemanagement.v1.CreateServiceRequest; +import com.google.api.servicemanagement.v1.CreateServiceRolloutRequest; +import com.google.api.servicemanagement.v1.DeleteServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceRequest; +import com.google.api.servicemanagement.v1.EnableServiceRequest; +import com.google.api.servicemanagement.v1.GenerateConfigReportRequest; +import com.google.api.servicemanagement.v1.GenerateConfigReportResponse; +import com.google.api.servicemanagement.v1.GetServiceConfigRequest; +import com.google.api.servicemanagement.v1.GetServiceRequest; +import com.google.api.servicemanagement.v1.GetServiceRolloutRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsResponse; +import com.google.api.servicemanagement.v1.ListServiceRolloutsRequest; +import com.google.api.servicemanagement.v1.ListServiceRolloutsResponse; +import com.google.api.servicemanagement.v1.ListServicesRequest; +import com.google.api.servicemanagement.v1.ListServicesResponse; +import com.google.api.servicemanagement.v1.ManagedService; +import com.google.api.servicemanagement.v1.Rollout; +import com.google.api.servicemanagement.v1.ServiceManagerGrpc.ServiceManagerImplBase; +import com.google.api.servicemanagement.v1.SubmitConfigSourceRequest; +import com.google.api.servicemanagement.v1.UndeleteServiceRequest; +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 MockServiceManagerImpl extends ServiceManagerImplBase { + private List requests; + private Queue responses; + + public MockServiceManagerImpl() { + 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 listServices( + ListServicesRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListServicesResponse) { + requests.add(request); + responseObserver.onNext(((ListServicesResponse) 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 ListServices, expected %s or %s", + response.getClass().getName(), + ListServicesResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getService( + GetServiceRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ManagedService) { + requests.add(request); + responseObserver.onNext(((ManagedService) 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 GetService, expected %s or %s", + response.getClass().getName(), + ManagedService.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createService( + CreateServiceRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateService, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void deleteService( + DeleteServiceRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DeleteService, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void undeleteService( + UndeleteServiceRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method UndeleteService, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listServiceConfigs( + ListServiceConfigsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListServiceConfigsResponse) { + requests.add(request); + responseObserver.onNext(((ListServiceConfigsResponse) 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 ListServiceConfigs, expected %s or %s", + response.getClass().getName(), + ListServiceConfigsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getServiceConfig( + GetServiceConfigRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Service) { + requests.add(request); + responseObserver.onNext(((Service) 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 GetServiceConfig, expected %s or %s", + response.getClass().getName(), + Service.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createServiceConfig( + CreateServiceConfigRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Service) { + requests.add(request); + responseObserver.onNext(((Service) 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 CreateServiceConfig, expected %s or %s", + response.getClass().getName(), + Service.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void submitConfigSource( + SubmitConfigSourceRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method SubmitConfigSource, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void listServiceRollouts( + ListServiceRolloutsRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListServiceRolloutsResponse) { + requests.add(request); + responseObserver.onNext(((ListServiceRolloutsResponse) 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 ListServiceRollouts, expected %s or %s", + response.getClass().getName(), + ListServiceRolloutsResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void getServiceRollout( + GetServiceRolloutRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Rollout) { + requests.add(request); + responseObserver.onNext(((Rollout) 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 GetServiceRollout, expected %s or %s", + response.getClass().getName(), + Rollout.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void createServiceRollout( + CreateServiceRolloutRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method CreateServiceRollout, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void generateConfigReport( + GenerateConfigReportRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof GenerateConfigReportResponse) { + requests.add(request); + responseObserver.onNext(((GenerateConfigReportResponse) 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 GenerateConfigReport, expected %s or %s", + response.getClass().getName(), + GenerateConfigReportResponse.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void enableService( + EnableServiceRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method EnableService, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } + + @Override + public void disableService( + DisableServiceRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError( + new IllegalArgumentException( + String.format( + "Unrecognized response type %s for method DisableService, expected %s or %s", + response.getClass().getName(), + Operation.class.getName(), + Exception.class.getName()))); + } + } +} diff --git a/google-cloud-service-management/src/test/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerClientTest.java b/google-cloud-service-management/src/test/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerClientTest.java new file mode 100644 index 0000000..8aab485 --- /dev/null +++ b/google-cloud-service-management/src/test/java/com/google/cloud/api/servicemanagement/v1/ServiceManagerClientTest.java @@ -0,0 +1,874 @@ +/* + * Copyright 2021 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.api.servicemanagement.v1; + +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServiceConfigsPagedResponse; +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServiceRolloutsPagedResponse; +import static com.google.cloud.api.servicemanagement.v1.ServiceManagerClient.ListServicesPagedResponse; + +import com.google.api.Authentication; +import com.google.api.Backend; +import com.google.api.Billing; +import com.google.api.Context; +import com.google.api.Control; +import com.google.api.Documentation; +import com.google.api.Endpoint; +import com.google.api.Http; +import com.google.api.LogDescriptor; +import com.google.api.Logging; +import com.google.api.MetricDescriptor; +import com.google.api.MonitoredResourceDescriptor; +import com.google.api.Monitoring; +import com.google.api.Quota; +import com.google.api.Service; +import com.google.api.SourceInfo; +import com.google.api.SystemParameters; +import com.google.api.Usage; +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.api.servicemanagement.v1.ChangeReport; +import com.google.api.servicemanagement.v1.ConfigSource; +import com.google.api.servicemanagement.v1.CreateServiceConfigRequest; +import com.google.api.servicemanagement.v1.CreateServiceRequest; +import com.google.api.servicemanagement.v1.CreateServiceRolloutRequest; +import com.google.api.servicemanagement.v1.DeleteServiceRequest; +import com.google.api.servicemanagement.v1.Diagnostic; +import com.google.api.servicemanagement.v1.DisableServiceRequest; +import com.google.api.servicemanagement.v1.DisableServiceResponse; +import com.google.api.servicemanagement.v1.EnableServiceRequest; +import com.google.api.servicemanagement.v1.EnableServiceResponse; +import com.google.api.servicemanagement.v1.GenerateConfigReportRequest; +import com.google.api.servicemanagement.v1.GenerateConfigReportResponse; +import com.google.api.servicemanagement.v1.GetServiceConfigRequest; +import com.google.api.servicemanagement.v1.GetServiceRequest; +import com.google.api.servicemanagement.v1.GetServiceRolloutRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsRequest; +import com.google.api.servicemanagement.v1.ListServiceConfigsResponse; +import com.google.api.servicemanagement.v1.ListServiceRolloutsRequest; +import com.google.api.servicemanagement.v1.ListServiceRolloutsResponse; +import com.google.api.servicemanagement.v1.ListServicesRequest; +import com.google.api.servicemanagement.v1.ListServicesResponse; +import com.google.api.servicemanagement.v1.ManagedService; +import com.google.api.servicemanagement.v1.Rollout; +import com.google.api.servicemanagement.v1.SubmitConfigSourceRequest; +import com.google.api.servicemanagement.v1.SubmitConfigSourceResponse; +import com.google.api.servicemanagement.v1.UndeleteServiceRequest; +import com.google.api.servicemanagement.v1.UndeleteServiceResponse; +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.Api; +import com.google.protobuf.Empty; +import com.google.protobuf.Enum; +import com.google.protobuf.Timestamp; +import com.google.protobuf.Type; +import com.google.protobuf.UInt32Value; +import io.grpc.StatusRuntimeException; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; +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 ServiceManagerClientTest { + private static MockServiceManager mockServiceManager; + private static MockServiceHelper mockServiceHelper; + private ServiceManagerClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockServiceManager = new MockServiceManager(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockServiceManager)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + ServiceManagerSettings settings = + ServiceManagerSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = ServiceManagerClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listServicesTest() throws Exception { + ManagedService responsesElement = ManagedService.newBuilder().build(); + ListServicesResponse expectedResponse = + ListServicesResponse.newBuilder() + .setNextPageToken("") + .addAllServices(Arrays.asList(responsesElement)) + .build(); + mockServiceManager.addResponse(expectedResponse); + + String producerProjectId = "producerProjectId-1297373534"; + String consumerId = "consumerId-166238287"; + + ListServicesPagedResponse pagedListResponse = + client.listServices(producerProjectId, consumerId); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServicesList().get(0), resources.get(0)); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServicesRequest actualRequest = ((ListServicesRequest) actualRequests.get(0)); + + Assert.assertEquals(producerProjectId, actualRequest.getProducerProjectId()); + Assert.assertEquals(consumerId, actualRequest.getConsumerId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServicesExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String producerProjectId = "producerProjectId-1297373534"; + String consumerId = "consumerId-166238287"; + client.listServices(producerProjectId, consumerId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceTest() throws Exception { + ManagedService expectedResponse = + ManagedService.newBuilder() + .setServiceName("serviceName-1928572192") + .setProducerProjectId("producerProjectId-1297373534") + .build(); + mockServiceManager.addResponse(expectedResponse); + + String serviceName = "serviceName-1928572192"; + + ManagedService actualResponse = client.getService(serviceName); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceRequest actualRequest = ((GetServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + client.getService(serviceName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServiceTest() throws Exception { + ManagedService expectedResponse = + ManagedService.newBuilder() + .setServiceName("serviceName-1928572192") + .setProducerProjectId("producerProjectId-1297373534") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockServiceManager.addResponse(resultOperation); + + ManagedService service = ManagedService.newBuilder().build(); + + ManagedService actualResponse = client.createServiceAsync(service).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServiceRequest actualRequest = ((CreateServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(service, actualRequest.getService()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + ManagedService service = ManagedService.newBuilder().build(); + client.createServiceAsync(service).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 deleteServiceTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("deleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockServiceManager.addResponse(resultOperation); + + String serviceName = "serviceName-1928572192"; + + client.deleteServiceAsync(serviceName).get(); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteServiceRequest actualRequest = ((DeleteServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + client.deleteServiceAsync(serviceName).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 undeleteServiceTest() throws Exception { + UndeleteServiceResponse expectedResponse = + UndeleteServiceResponse.newBuilder() + .setService(ManagedService.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("undeleteServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockServiceManager.addResponse(resultOperation); + + String serviceName = "serviceName-1928572192"; + + UndeleteServiceResponse actualResponse = client.undeleteServiceAsync(serviceName).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UndeleteServiceRequest actualRequest = ((UndeleteServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void undeleteServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + client.undeleteServiceAsync(serviceName).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 listServiceConfigsTest() throws Exception { + Service responsesElement = Service.newBuilder().build(); + ListServiceConfigsResponse expectedResponse = + ListServiceConfigsResponse.newBuilder() + .setNextPageToken("") + .addAllServiceConfigs(Arrays.asList(responsesElement)) + .build(); + mockServiceManager.addResponse(expectedResponse); + + String serviceName = "serviceName-1928572192"; + + ListServiceConfigsPagedResponse pagedListResponse = client.listServiceConfigs(serviceName); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getServiceConfigsList().get(0), resources.get(0)); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServiceConfigsRequest actualRequest = ((ListServiceConfigsRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServiceConfigsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + client.listServiceConfigs(serviceName); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceConfigTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName("name3373707") + .setTitle("title110371416") + .setProducerProjectId("producerProjectId-1297373534") + .setId("id3355") + .addAllApis(new ArrayList()) + .addAllTypes(new ArrayList()) + .addAllEnums(new ArrayList()) + .setDocumentation(Documentation.newBuilder().build()) + .setBackend(Backend.newBuilder().build()) + .setHttp(Http.newBuilder().build()) + .setQuota(Quota.newBuilder().build()) + .setAuthentication(Authentication.newBuilder().build()) + .setContext(Context.newBuilder().build()) + .setUsage(Usage.newBuilder().build()) + .addAllEndpoints(new ArrayList()) + .setControl(Control.newBuilder().build()) + .addAllLogs(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllMonitoredResources(new ArrayList()) + .setBilling(Billing.newBuilder().build()) + .setLogging(Logging.newBuilder().build()) + .setMonitoring(Monitoring.newBuilder().build()) + .setSystemParameters(SystemParameters.newBuilder().build()) + .setSourceInfo(SourceInfo.newBuilder().build()) + .setConfigVersion(UInt32Value.newBuilder().build()) + .build(); + mockServiceManager.addResponse(expectedResponse); + + String serviceName = "serviceName-1928572192"; + String configId = "configId-580140035"; + GetServiceConfigRequest.ConfigView view = GetServiceConfigRequest.ConfigView.forNumber(0); + + Service actualResponse = client.getServiceConfig(serviceName, configId, view); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceConfigRequest actualRequest = ((GetServiceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertEquals(configId, actualRequest.getConfigId()); + Assert.assertEquals(view, actualRequest.getView()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + String configId = "configId-580140035"; + GetServiceConfigRequest.ConfigView view = GetServiceConfigRequest.ConfigView.forNumber(0); + client.getServiceConfig(serviceName, configId, view); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServiceConfigTest() throws Exception { + Service expectedResponse = + Service.newBuilder() + .setName("name3373707") + .setTitle("title110371416") + .setProducerProjectId("producerProjectId-1297373534") + .setId("id3355") + .addAllApis(new ArrayList()) + .addAllTypes(new ArrayList()) + .addAllEnums(new ArrayList()) + .setDocumentation(Documentation.newBuilder().build()) + .setBackend(Backend.newBuilder().build()) + .setHttp(Http.newBuilder().build()) + .setQuota(Quota.newBuilder().build()) + .setAuthentication(Authentication.newBuilder().build()) + .setContext(Context.newBuilder().build()) + .setUsage(Usage.newBuilder().build()) + .addAllEndpoints(new ArrayList()) + .setControl(Control.newBuilder().build()) + .addAllLogs(new ArrayList()) + .addAllMetrics(new ArrayList()) + .addAllMonitoredResources(new ArrayList()) + .setBilling(Billing.newBuilder().build()) + .setLogging(Logging.newBuilder().build()) + .setMonitoring(Monitoring.newBuilder().build()) + .setSystemParameters(SystemParameters.newBuilder().build()) + .setSourceInfo(SourceInfo.newBuilder().build()) + .setConfigVersion(UInt32Value.newBuilder().build()) + .build(); + mockServiceManager.addResponse(expectedResponse); + + String serviceName = "serviceName-1928572192"; + Service serviceConfig = Service.newBuilder().build(); + + Service actualResponse = client.createServiceConfig(serviceName, serviceConfig); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServiceConfigRequest actualRequest = ((CreateServiceConfigRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertEquals(serviceConfig, actualRequest.getServiceConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServiceConfigExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + Service serviceConfig = Service.newBuilder().build(); + client.createServiceConfig(serviceName, serviceConfig); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void submitConfigSourceTest() throws Exception { + SubmitConfigSourceResponse expectedResponse = + SubmitConfigSourceResponse.newBuilder() + .setServiceConfig(Service.newBuilder().build()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("submitConfigSourceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockServiceManager.addResponse(resultOperation); + + String serviceName = "serviceName-1928572192"; + ConfigSource configSource = ConfigSource.newBuilder().build(); + boolean validateOnly = true; + + SubmitConfigSourceResponse actualResponse = + client.submitConfigSourceAsync(serviceName, configSource, validateOnly).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SubmitConfigSourceRequest actualRequest = ((SubmitConfigSourceRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertEquals(configSource, actualRequest.getConfigSource()); + Assert.assertEquals(validateOnly, actualRequest.getValidateOnly()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void submitConfigSourceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + ConfigSource configSource = ConfigSource.newBuilder().build(); + boolean validateOnly = true; + client.submitConfigSourceAsync(serviceName, configSource, validateOnly).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 listServiceRolloutsTest() throws Exception { + Rollout responsesElement = Rollout.newBuilder().build(); + ListServiceRolloutsResponse expectedResponse = + ListServiceRolloutsResponse.newBuilder() + .setNextPageToken("") + .addAllRollouts(Arrays.asList(responsesElement)) + .build(); + mockServiceManager.addResponse(expectedResponse); + + String serviceName = "serviceName-1928572192"; + String filter = "filter-1274492040"; + + ListServiceRolloutsPagedResponse pagedListResponse = + client.listServiceRollouts(serviceName, filter); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getRolloutsList().get(0), resources.get(0)); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListServiceRolloutsRequest actualRequest = ((ListServiceRolloutsRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertEquals(filter, actualRequest.getFilter()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listServiceRolloutsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + String filter = "filter-1274492040"; + client.listServiceRollouts(serviceName, filter); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getServiceRolloutTest() throws Exception { + Rollout expectedResponse = + Rollout.newBuilder() + .setRolloutId("rolloutId551248556") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreatedBy("createdBy598371679") + .setServiceName("serviceName-1928572192") + .build(); + mockServiceManager.addResponse(expectedResponse); + + String serviceName = "serviceName-1928572192"; + String rolloutId = "rolloutId551248556"; + + Rollout actualResponse = client.getServiceRollout(serviceName, rolloutId); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetServiceRolloutRequest actualRequest = ((GetServiceRolloutRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertEquals(rolloutId, actualRequest.getRolloutId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getServiceRolloutExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + String rolloutId = "rolloutId551248556"; + client.getServiceRollout(serviceName, rolloutId); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createServiceRolloutTest() throws Exception { + Rollout expectedResponse = + Rollout.newBuilder() + .setRolloutId("rolloutId551248556") + .setCreateTime(Timestamp.newBuilder().build()) + .setCreatedBy("createdBy598371679") + .setServiceName("serviceName-1928572192") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createServiceRolloutTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockServiceManager.addResponse(resultOperation); + + String serviceName = "serviceName-1928572192"; + Rollout rollout = Rollout.newBuilder().build(); + + Rollout actualResponse = client.createServiceRolloutAsync(serviceName, rollout).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateServiceRolloutRequest actualRequest = + ((CreateServiceRolloutRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertEquals(rollout, actualRequest.getRollout()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createServiceRolloutExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + Rollout rollout = Rollout.newBuilder().build(); + client.createServiceRolloutAsync(serviceName, rollout).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 generateConfigReportTest() throws Exception { + GenerateConfigReportResponse expectedResponse = + GenerateConfigReportResponse.newBuilder() + .setServiceName("serviceName-1928572192") + .setId("id3355") + .addAllChangeReports(new ArrayList()) + .addAllDiagnostics(new ArrayList()) + .build(); + mockServiceManager.addResponse(expectedResponse); + + Any newConfig = Any.newBuilder().build(); + Any oldConfig = Any.newBuilder().build(); + + GenerateConfigReportResponse actualResponse = client.generateConfigReport(newConfig, oldConfig); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GenerateConfigReportRequest actualRequest = + ((GenerateConfigReportRequest) actualRequests.get(0)); + + Assert.assertEquals(newConfig, actualRequest.getNewConfig()); + Assert.assertEquals(oldConfig, actualRequest.getOldConfig()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void generateConfigReportExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + Any newConfig = Any.newBuilder().build(); + Any oldConfig = Any.newBuilder().build(); + client.generateConfigReport(newConfig, oldConfig); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void enableServiceTest() throws Exception { + EnableServiceResponse expectedResponse = EnableServiceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("enableServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockServiceManager.addResponse(resultOperation); + + String serviceName = "serviceName-1928572192"; + String consumerId = "consumerId-166238287"; + + EnableServiceResponse actualResponse = client.enableServiceAsync(serviceName, consumerId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + EnableServiceRequest actualRequest = ((EnableServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertEquals(consumerId, actualRequest.getConsumerId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void enableServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + String consumerId = "consumerId-166238287"; + client.enableServiceAsync(serviceName, consumerId).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 disableServiceTest() throws Exception { + DisableServiceResponse expectedResponse = DisableServiceResponse.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("disableServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockServiceManager.addResponse(resultOperation); + + String serviceName = "serviceName-1928572192"; + String consumerId = "consumerId-166238287"; + + DisableServiceResponse actualResponse = + client.disableServiceAsync(serviceName, consumerId).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockServiceManager.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DisableServiceRequest actualRequest = ((DisableServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(serviceName, actualRequest.getServiceName()); + Assert.assertEquals(consumerId, actualRequest.getConsumerId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void disableServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockServiceManager.addException(exception); + + try { + String serviceName = "serviceName-1928572192"; + String consumerId = "consumerId-166238287"; + client.disableServiceAsync(serviceName, consumerId).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-service-management-v1/pom.xml b/grpc-google-cloud-service-management-v1/pom.xml new file mode 100644 index 0000000..e296f94 --- /dev/null +++ b/grpc-google-cloud-service-management-v1/pom.xml @@ -0,0 +1,65 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-service-management-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-service-management-v1 + GRPC library for google-cloud-service-management + + com.google.cloud + google-cloud-service-management-parent + 0.0.1-SNAPSHOT + + + + io.grpc + grpc-api + + + io.grpc + grpc-stub + + + io.grpc + grpc-protobuf + + + com.google.protobuf + protobuf-java + + + com.google.api.grpc + proto-google-cloud-service-management-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-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ServiceManagerGrpc.java b/grpc-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ServiceManagerGrpc.java new file mode 100644 index 0000000..09b3f9f --- /dev/null +++ b/grpc-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ServiceManagerGrpc.java @@ -0,0 +1,2247 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.api.servicemanagement.v1; + +import static io.grpc.MethodDescriptor.generateFullMethodName; +import static io.grpc.stub.ClientCalls.asyncUnaryCall; +import static io.grpc.stub.ClientCalls.blockingUnaryCall; +import static io.grpc.stub.ClientCalls.futureUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnaryCall; +import static io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall; + +/** + * + * + *
+ * [Google Service Management API](/service-management/overview)
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/api/servicemanagement/v1/servicemanager.proto") +public final class ServiceManagerGrpc { + + private ServiceManagerGrpc() {} + + public static final String SERVICE_NAME = "google.api.servicemanagement.v1.ServiceManager"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.ListServicesRequest, + com.google.api.servicemanagement.v1.ListServicesResponse> + getListServicesMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListServices", + requestType = com.google.api.servicemanagement.v1.ListServicesRequest.class, + responseType = com.google.api.servicemanagement.v1.ListServicesResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.ListServicesRequest, + com.google.api.servicemanagement.v1.ListServicesResponse> + getListServicesMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.ListServicesRequest, + com.google.api.servicemanagement.v1.ListServicesResponse> + getListServicesMethod; + if ((getListServicesMethod = ServiceManagerGrpc.getListServicesMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getListServicesMethod = ServiceManagerGrpc.getListServicesMethod) == null) { + ServiceManagerGrpc.getListServicesMethod = + getListServicesMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServices")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.ListServicesRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.ListServicesResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("ListServices")) + .build(); + } + } + } + return getListServicesMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GetServiceRequest, + com.google.api.servicemanagement.v1.ManagedService> + getGetServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetService", + requestType = com.google.api.servicemanagement.v1.GetServiceRequest.class, + responseType = com.google.api.servicemanagement.v1.ManagedService.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GetServiceRequest, + com.google.api.servicemanagement.v1.ManagedService> + getGetServiceMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GetServiceRequest, + com.google.api.servicemanagement.v1.ManagedService> + getGetServiceMethod; + if ((getGetServiceMethod = ServiceManagerGrpc.getGetServiceMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getGetServiceMethod = ServiceManagerGrpc.getGetServiceMethod) == null) { + ServiceManagerGrpc.getGetServiceMethod = + getGetServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.GetServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.ManagedService + .getDefaultInstance())) + .setSchemaDescriptor(new ServiceManagerMethodDescriptorSupplier("GetService")) + .build(); + } + } + } + return getGetServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.CreateServiceRequest, + com.google.longrunning.Operation> + getCreateServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateService", + requestType = com.google.api.servicemanagement.v1.CreateServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.CreateServiceRequest, + com.google.longrunning.Operation> + getCreateServiceMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.CreateServiceRequest, + com.google.longrunning.Operation> + getCreateServiceMethod; + if ((getCreateServiceMethod = ServiceManagerGrpc.getCreateServiceMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getCreateServiceMethod = ServiceManagerGrpc.getCreateServiceMethod) == null) { + ServiceManagerGrpc.getCreateServiceMethod = + getCreateServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.CreateServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("CreateService")) + .build(); + } + } + } + return getCreateServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.DeleteServiceRequest, + com.google.longrunning.Operation> + getDeleteServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteService", + requestType = com.google.api.servicemanagement.v1.DeleteServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.DeleteServiceRequest, + com.google.longrunning.Operation> + getDeleteServiceMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.DeleteServiceRequest, + com.google.longrunning.Operation> + getDeleteServiceMethod; + if ((getDeleteServiceMethod = ServiceManagerGrpc.getDeleteServiceMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getDeleteServiceMethod = ServiceManagerGrpc.getDeleteServiceMethod) == null) { + ServiceManagerGrpc.getDeleteServiceMethod = + getDeleteServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.DeleteServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("DeleteService")) + .build(); + } + } + } + return getDeleteServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.UndeleteServiceRequest, + com.google.longrunning.Operation> + getUndeleteServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UndeleteService", + requestType = com.google.api.servicemanagement.v1.UndeleteServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.UndeleteServiceRequest, + com.google.longrunning.Operation> + getUndeleteServiceMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.UndeleteServiceRequest, + com.google.longrunning.Operation> + getUndeleteServiceMethod; + if ((getUndeleteServiceMethod = ServiceManagerGrpc.getUndeleteServiceMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getUndeleteServiceMethod = ServiceManagerGrpc.getUndeleteServiceMethod) == null) { + ServiceManagerGrpc.getUndeleteServiceMethod = + getUndeleteServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UndeleteService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.UndeleteServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("UndeleteService")) + .build(); + } + } + } + return getUndeleteServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.ListServiceConfigsRequest, + com.google.api.servicemanagement.v1.ListServiceConfigsResponse> + getListServiceConfigsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListServiceConfigs", + requestType = com.google.api.servicemanagement.v1.ListServiceConfigsRequest.class, + responseType = com.google.api.servicemanagement.v1.ListServiceConfigsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.ListServiceConfigsRequest, + com.google.api.servicemanagement.v1.ListServiceConfigsResponse> + getListServiceConfigsMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.ListServiceConfigsRequest, + com.google.api.servicemanagement.v1.ListServiceConfigsResponse> + getListServiceConfigsMethod; + if ((getListServiceConfigsMethod = ServiceManagerGrpc.getListServiceConfigsMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getListServiceConfigsMethod = ServiceManagerGrpc.getListServiceConfigsMethod) + == null) { + ServiceManagerGrpc.getListServiceConfigsMethod = + getListServiceConfigsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListServiceConfigs")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.ListServiceConfigsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.ListServiceConfigsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("ListServiceConfigs")) + .build(); + } + } + } + return getListServiceConfigsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GetServiceConfigRequest, com.google.api.Service> + getGetServiceConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetServiceConfig", + requestType = com.google.api.servicemanagement.v1.GetServiceConfigRequest.class, + responseType = com.google.api.Service.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GetServiceConfigRequest, com.google.api.Service> + getGetServiceConfigMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GetServiceConfigRequest, com.google.api.Service> + getGetServiceConfigMethod; + if ((getGetServiceConfigMethod = ServiceManagerGrpc.getGetServiceConfigMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getGetServiceConfigMethod = ServiceManagerGrpc.getGetServiceConfigMethod) == null) { + ServiceManagerGrpc.getGetServiceConfigMethod = + getGetServiceConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetServiceConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.GetServiceConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.Service.getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("GetServiceConfig")) + .build(); + } + } + } + return getGetServiceConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.CreateServiceConfigRequest, com.google.api.Service> + getCreateServiceConfigMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateServiceConfig", + requestType = com.google.api.servicemanagement.v1.CreateServiceConfigRequest.class, + responseType = com.google.api.Service.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.CreateServiceConfigRequest, com.google.api.Service> + getCreateServiceConfigMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.CreateServiceConfigRequest, com.google.api.Service> + getCreateServiceConfigMethod; + if ((getCreateServiceConfigMethod = ServiceManagerGrpc.getCreateServiceConfigMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getCreateServiceConfigMethod = ServiceManagerGrpc.getCreateServiceConfigMethod) + == null) { + ServiceManagerGrpc.getCreateServiceConfigMethod = + getCreateServiceConfigMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateServiceConfig")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.CreateServiceConfigRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.Service.getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("CreateServiceConfig")) + .build(); + } + } + } + return getCreateServiceConfigMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest, + com.google.longrunning.Operation> + getSubmitConfigSourceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SubmitConfigSource", + requestType = com.google.api.servicemanagement.v1.SubmitConfigSourceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest, + com.google.longrunning.Operation> + getSubmitConfigSourceMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest, + com.google.longrunning.Operation> + getSubmitConfigSourceMethod; + if ((getSubmitConfigSourceMethod = ServiceManagerGrpc.getSubmitConfigSourceMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getSubmitConfigSourceMethod = ServiceManagerGrpc.getSubmitConfigSourceMethod) + == null) { + ServiceManagerGrpc.getSubmitConfigSourceMethod = + getSubmitConfigSourceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SubmitConfigSource")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("SubmitConfigSource")) + .build(); + } + } + } + return getSubmitConfigSourceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest, + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse> + getListServiceRolloutsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListServiceRollouts", + requestType = com.google.api.servicemanagement.v1.ListServiceRolloutsRequest.class, + responseType = com.google.api.servicemanagement.v1.ListServiceRolloutsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest, + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse> + getListServiceRolloutsMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest, + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse> + getListServiceRolloutsMethod; + if ((getListServiceRolloutsMethod = ServiceManagerGrpc.getListServiceRolloutsMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getListServiceRolloutsMethod = ServiceManagerGrpc.getListServiceRolloutsMethod) + == null) { + ServiceManagerGrpc.getListServiceRolloutsMethod = + getListServiceRolloutsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListServiceRollouts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("ListServiceRollouts")) + .build(); + } + } + } + return getListServiceRolloutsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GetServiceRolloutRequest, + com.google.api.servicemanagement.v1.Rollout> + getGetServiceRolloutMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetServiceRollout", + requestType = com.google.api.servicemanagement.v1.GetServiceRolloutRequest.class, + responseType = com.google.api.servicemanagement.v1.Rollout.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GetServiceRolloutRequest, + com.google.api.servicemanagement.v1.Rollout> + getGetServiceRolloutMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GetServiceRolloutRequest, + com.google.api.servicemanagement.v1.Rollout> + getGetServiceRolloutMethod; + if ((getGetServiceRolloutMethod = ServiceManagerGrpc.getGetServiceRolloutMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getGetServiceRolloutMethod = ServiceManagerGrpc.getGetServiceRolloutMethod) == null) { + ServiceManagerGrpc.getGetServiceRolloutMethod = + getGetServiceRolloutMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetServiceRollout")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.GetServiceRolloutRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.Rollout.getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("GetServiceRollout")) + .build(); + } + } + } + return getGetServiceRolloutMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest, + com.google.longrunning.Operation> + getCreateServiceRolloutMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateServiceRollout", + requestType = com.google.api.servicemanagement.v1.CreateServiceRolloutRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest, + com.google.longrunning.Operation> + getCreateServiceRolloutMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest, + com.google.longrunning.Operation> + getCreateServiceRolloutMethod; + if ((getCreateServiceRolloutMethod = ServiceManagerGrpc.getCreateServiceRolloutMethod) + == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getCreateServiceRolloutMethod = ServiceManagerGrpc.getCreateServiceRolloutMethod) + == null) { + ServiceManagerGrpc.getCreateServiceRolloutMethod = + getCreateServiceRolloutMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateServiceRollout")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("CreateServiceRollout")) + .build(); + } + } + } + return getCreateServiceRolloutMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GenerateConfigReportRequest, + com.google.api.servicemanagement.v1.GenerateConfigReportResponse> + getGenerateConfigReportMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GenerateConfigReport", + requestType = com.google.api.servicemanagement.v1.GenerateConfigReportRequest.class, + responseType = com.google.api.servicemanagement.v1.GenerateConfigReportResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GenerateConfigReportRequest, + com.google.api.servicemanagement.v1.GenerateConfigReportResponse> + getGenerateConfigReportMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.GenerateConfigReportRequest, + com.google.api.servicemanagement.v1.GenerateConfigReportResponse> + getGenerateConfigReportMethod; + if ((getGenerateConfigReportMethod = ServiceManagerGrpc.getGenerateConfigReportMethod) + == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getGenerateConfigReportMethod = ServiceManagerGrpc.getGenerateConfigReportMethod) + == null) { + ServiceManagerGrpc.getGenerateConfigReportMethod = + getGenerateConfigReportMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GenerateConfigReport")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.GenerateConfigReportRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.GenerateConfigReportResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("GenerateConfigReport")) + .build(); + } + } + } + return getGenerateConfigReportMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.EnableServiceRequest, + com.google.longrunning.Operation> + getEnableServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "EnableService", + requestType = com.google.api.servicemanagement.v1.EnableServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.EnableServiceRequest, + com.google.longrunning.Operation> + getEnableServiceMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.EnableServiceRequest, + com.google.longrunning.Operation> + getEnableServiceMethod; + if ((getEnableServiceMethod = ServiceManagerGrpc.getEnableServiceMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getEnableServiceMethod = ServiceManagerGrpc.getEnableServiceMethod) == null) { + ServiceManagerGrpc.getEnableServiceMethod = + getEnableServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "EnableService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.EnableServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("EnableService")) + .build(); + } + } + } + return getEnableServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.DisableServiceRequest, + com.google.longrunning.Operation> + getDisableServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DisableService", + requestType = com.google.api.servicemanagement.v1.DisableServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.DisableServiceRequest, + com.google.longrunning.Operation> + getDisableServiceMethod() { + io.grpc.MethodDescriptor< + com.google.api.servicemanagement.v1.DisableServiceRequest, + com.google.longrunning.Operation> + getDisableServiceMethod; + if ((getDisableServiceMethod = ServiceManagerGrpc.getDisableServiceMethod) == null) { + synchronized (ServiceManagerGrpc.class) { + if ((getDisableServiceMethod = ServiceManagerGrpc.getDisableServiceMethod) == null) { + ServiceManagerGrpc.getDisableServiceMethod = + getDisableServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DisableService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.api.servicemanagement.v1.DisableServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new ServiceManagerMethodDescriptorSupplier("DisableService")) + .build(); + } + } + } + return getDisableServiceMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static ServiceManagerStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ServiceManagerStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceManagerStub(channel, callOptions); + } + }; + return ServiceManagerStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static ServiceManagerBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ServiceManagerBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceManagerBlockingStub(channel, callOptions); + } + }; + return ServiceManagerBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static ServiceManagerFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public ServiceManagerFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceManagerFutureStub(channel, callOptions); + } + }; + return ServiceManagerFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * [Google Service Management API](/service-management/overview)
+   * 
+ */ + public abstract static class ServiceManagerImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * Lists managed services.
+     * Returns all public services. For authenticated users, also returns all
+     * services the calling user has "servicemanagement.services.get" permission
+     * for.
+     * **BETA:** If the caller specifies the `consumer_id`, it returns only the
+     * services enabled on the consumer. The `consumer_id` must have the format
+     * of "project:{PROJECT-ID}".
+     * 
+ */ + public void listServices( + com.google.api.servicemanagement.v1.ListServicesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListServicesMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a managed service. Authentication is required unless the service is
+     * public.
+     * 
+ */ + public void getService( + com.google.api.servicemanagement.v1.GetServiceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new managed service.
+     * Please note one producer project can own no more than 20 services.
+     * Operation<response: ManagedService>
+     * 
+ */ + public void createService( + com.google.api.servicemanagement.v1.CreateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes a managed service. This method will change the service to the
+     * `Soft-Delete` state for 30 days. Within this period, service producers may
+     * call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service.
+     * After 30 days, the service will be permanently deleted.
+     * Operation<response: google.protobuf.Empty>
+     * 
+ */ + public void deleteService( + com.google.api.servicemanagement.v1.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Revives a previously deleted managed service. The method restores the
+     * service using the configuration at the time the service was deleted.
+     * The target service must exist and must have been deleted within the
+     * last 30 days.
+     * Operation<response: UndeleteServiceResponse>
+     * 
+ */ + public void undeleteService( + com.google.api.servicemanagement.v1.UndeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUndeleteServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the history of the service configuration for a managed service,
+     * from the newest to the oldest.
+     * 
+ */ + public void listServiceConfigs( + com.google.api.servicemanagement.v1.ListServiceConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListServiceConfigsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a service configuration (version) for a managed service.
+     * 
+ */ + public void getServiceConfig( + com.google.api.servicemanagement.v1.GetServiceConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetServiceConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new service configuration (version) for a managed service.
+     * This method only stores the service configuration. To roll out the service
+     * configuration to backend systems please call
+     * [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
+     * Only the 100 most recent service configurations and ones referenced by
+     * existing rollouts are kept for each service. The rest will be deleted
+     * eventually.
+     * 
+ */ + public void createServiceConfig( + com.google.api.servicemanagement.v1.CreateServiceConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateServiceConfigMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new service configuration (version) for a managed service based
+     * on
+     * user-supplied configuration source files (for example: OpenAPI
+     * Specification). This method stores the source configurations as well as the
+     * generated service configuration. To rollout the service configuration to
+     * other services,
+     * please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
+     * Only the 100 most recent configuration sources and ones referenced by
+     * existing service configurtions are kept for each service. The rest will be
+     * deleted eventually.
+     * Operation<response: SubmitConfigSourceResponse>
+     * 
+ */ + public void submitConfigSource( + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getSubmitConfigSourceMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the history of the service configuration rollouts for a managed
+     * service, from the newest to the oldest.
+     * 
+ */ + public void listServiceRollouts( + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListServiceRolloutsMethod(), responseObserver); + } + + /** + * + * + *
+     * Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout].
+     * 
+ */ + public void getServiceRollout( + com.google.api.servicemanagement.v1.GetServiceRolloutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetServiceRolloutMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new service configuration rollout. Based on rollout, the
+     * Google Service Management will roll out the service configurations to
+     * different backend services. For example, the logging configuration will be
+     * pushed to Google Cloud Logging.
+     * Please note that any previous pending and running Rollouts and associated
+     * Operations will be automatically cancelled so that the latest Rollout will
+     * not be blocked by previous Rollouts.
+     * Only the 100 most recent (in any state) and the last 10 successful (if not
+     * already part of the set of 100 most recent) rollouts are kept for each
+     * service. The rest will be deleted eventually.
+     * Operation<response: Rollout>
+     * 
+ */ + public void createServiceRollout( + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateServiceRolloutMethod(), responseObserver); + } + + /** + * + * + *
+     * Generates and returns a report (errors, warnings and changes from
+     * existing configurations) associated with
+     * GenerateConfigReportRequest.new_value
+     * If GenerateConfigReportRequest.old_value is specified,
+     * GenerateConfigReportRequest will contain a single ChangeReport based on the
+     * comparison between GenerateConfigReportRequest.new_value and
+     * GenerateConfigReportRequest.old_value.
+     * If GenerateConfigReportRequest.old_value is not specified, this method
+     * will compare GenerateConfigReportRequest.new_value with the last pushed
+     * service configuration.
+     * 
+ */ + public void generateConfigReport( + com.google.api.servicemanagement.v1.GenerateConfigReportRequest request, + io.grpc.stub.StreamObserver< + com.google.api.servicemanagement.v1.GenerateConfigReportResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getGenerateConfigReportMethod(), responseObserver); + } + + /** + * + * + *
+     * Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used
+     * for the project. See
+     * [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for
+     * more information.
+     * Operation<response: EnableServiceResponse>
+     * 
+ */ + @java.lang.Deprecated + public void enableService( + com.google.api.servicemanagement.v1.EnableServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getEnableServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be
+     * be used for the project. It prevents accidental usage that may cause
+     * unexpected billing charges or security leaks.
+     * Operation<response: DisableServiceResponse>
+     * 
+ */ + @java.lang.Deprecated + public void disableService( + com.google.api.servicemanagement.v1.DisableServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDisableServiceMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListServicesMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.ListServicesRequest, + com.google.api.servicemanagement.v1.ListServicesResponse>( + this, METHODID_LIST_SERVICES))) + .addMethod( + getGetServiceMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.GetServiceRequest, + com.google.api.servicemanagement.v1.ManagedService>( + this, METHODID_GET_SERVICE))) + .addMethod( + getCreateServiceMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.CreateServiceRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_SERVICE))) + .addMethod( + getDeleteServiceMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.DeleteServiceRequest, + com.google.longrunning.Operation>(this, METHODID_DELETE_SERVICE))) + .addMethod( + getUndeleteServiceMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.UndeleteServiceRequest, + com.google.longrunning.Operation>(this, METHODID_UNDELETE_SERVICE))) + .addMethod( + getListServiceConfigsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.ListServiceConfigsRequest, + com.google.api.servicemanagement.v1.ListServiceConfigsResponse>( + this, METHODID_LIST_SERVICE_CONFIGS))) + .addMethod( + getGetServiceConfigMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.GetServiceConfigRequest, + com.google.api.Service>(this, METHODID_GET_SERVICE_CONFIG))) + .addMethod( + getCreateServiceConfigMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.CreateServiceConfigRequest, + com.google.api.Service>(this, METHODID_CREATE_SERVICE_CONFIG))) + .addMethod( + getSubmitConfigSourceMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest, + com.google.longrunning.Operation>(this, METHODID_SUBMIT_CONFIG_SOURCE))) + .addMethod( + getListServiceRolloutsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest, + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse>( + this, METHODID_LIST_SERVICE_ROLLOUTS))) + .addMethod( + getGetServiceRolloutMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.GetServiceRolloutRequest, + com.google.api.servicemanagement.v1.Rollout>( + this, METHODID_GET_SERVICE_ROLLOUT))) + .addMethod( + getCreateServiceRolloutMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_SERVICE_ROLLOUT))) + .addMethod( + getGenerateConfigReportMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.GenerateConfigReportRequest, + com.google.api.servicemanagement.v1.GenerateConfigReportResponse>( + this, METHODID_GENERATE_CONFIG_REPORT))) + .addMethod( + getEnableServiceMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.EnableServiceRequest, + com.google.longrunning.Operation>(this, METHODID_ENABLE_SERVICE))) + .addMethod( + getDisableServiceMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.api.servicemanagement.v1.DisableServiceRequest, + com.google.longrunning.Operation>(this, METHODID_DISABLE_SERVICE))) + .build(); + } + } + + /** + * + * + *
+   * [Google Service Management API](/service-management/overview)
+   * 
+ */ + public static final class ServiceManagerStub + extends io.grpc.stub.AbstractAsyncStub { + private ServiceManagerStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ServiceManagerStub build(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceManagerStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists managed services.
+     * Returns all public services. For authenticated users, also returns all
+     * services the calling user has "servicemanagement.services.get" permission
+     * for.
+     * **BETA:** If the caller specifies the `consumer_id`, it returns only the
+     * services enabled on the consumer. The `consumer_id` must have the format
+     * of "project:{PROJECT-ID}".
+     * 
+ */ + public void listServices( + com.google.api.servicemanagement.v1.ListServicesRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a managed service. Authentication is required unless the service is
+     * public.
+     * 
+ */ + public void getService( + com.google.api.servicemanagement.v1.GetServiceRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Creates a new managed service.
+     * Please note one producer project can own no more than 20 services.
+     * Operation<response: ManagedService>
+     * 
+ */ + public void createService( + com.google.api.servicemanagement.v1.CreateServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes a managed service. This method will change the service to the
+     * `Soft-Delete` state for 30 days. Within this period, service producers may
+     * call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service.
+     * After 30 days, the service will be permanently deleted.
+     * Operation<response: google.protobuf.Empty>
+     * 
+ */ + public void deleteService( + com.google.api.servicemanagement.v1.DeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Revives a previously deleted managed service. The method restores the
+     * service using the configuration at the time the service was deleted.
+     * The target service must exist and must have been deleted within the
+     * last 30 days.
+     * Operation<response: UndeleteServiceResponse>
+     * 
+ */ + public void undeleteService( + com.google.api.servicemanagement.v1.UndeleteServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUndeleteServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the history of the service configuration for a managed service,
+     * from the newest to the oldest.
+     * 
+ */ + public void listServiceConfigs( + com.google.api.servicemanagement.v1.ListServiceConfigsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListServiceConfigsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a service configuration (version) for a managed service.
+     * 
+ */ + public void getServiceConfig( + com.google.api.servicemanagement.v1.GetServiceConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetServiceConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new service configuration (version) for a managed service.
+     * This method only stores the service configuration. To roll out the service
+     * configuration to backend systems please call
+     * [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
+     * Only the 100 most recent service configurations and ones referenced by
+     * existing rollouts are kept for each service. The rest will be deleted
+     * eventually.
+     * 
+ */ + public void createServiceConfig( + com.google.api.servicemanagement.v1.CreateServiceConfigRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateServiceConfigMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new service configuration (version) for a managed service based
+     * on
+     * user-supplied configuration source files (for example: OpenAPI
+     * Specification). This method stores the source configurations as well as the
+     * generated service configuration. To rollout the service configuration to
+     * other services,
+     * please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
+     * Only the 100 most recent configuration sources and ones referenced by
+     * existing service configurtions are kept for each service. The rest will be
+     * deleted eventually.
+     * Operation<response: SubmitConfigSourceResponse>
+     * 
+ */ + public void submitConfigSource( + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSubmitConfigSourceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the history of the service configuration rollouts for a managed
+     * service, from the newest to the oldest.
+     * 
+ */ + public void listServiceRollouts( + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListServiceRolloutsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout].
+     * 
+ */ + public void getServiceRollout( + com.google.api.servicemanagement.v1.GetServiceRolloutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetServiceRolloutMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new service configuration rollout. Based on rollout, the
+     * Google Service Management will roll out the service configurations to
+     * different backend services. For example, the logging configuration will be
+     * pushed to Google Cloud Logging.
+     * Please note that any previous pending and running Rollouts and associated
+     * Operations will be automatically cancelled so that the latest Rollout will
+     * not be blocked by previous Rollouts.
+     * Only the 100 most recent (in any state) and the last 10 successful (if not
+     * already part of the set of 100 most recent) rollouts are kept for each
+     * service. The rest will be deleted eventually.
+     * Operation<response: Rollout>
+     * 
+ */ + public void createServiceRollout( + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateServiceRolloutMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Generates and returns a report (errors, warnings and changes from
+     * existing configurations) associated with
+     * GenerateConfigReportRequest.new_value
+     * If GenerateConfigReportRequest.old_value is specified,
+     * GenerateConfigReportRequest will contain a single ChangeReport based on the
+     * comparison between GenerateConfigReportRequest.new_value and
+     * GenerateConfigReportRequest.old_value.
+     * If GenerateConfigReportRequest.old_value is not specified, this method
+     * will compare GenerateConfigReportRequest.new_value with the last pushed
+     * service configuration.
+     * 
+ */ + public void generateConfigReport( + com.google.api.servicemanagement.v1.GenerateConfigReportRequest request, + io.grpc.stub.StreamObserver< + com.google.api.servicemanagement.v1.GenerateConfigReportResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGenerateConfigReportMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used
+     * for the project. See
+     * [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for
+     * more information.
+     * Operation<response: EnableServiceResponse>
+     * 
+ */ + @java.lang.Deprecated + public void enableService( + com.google.api.servicemanagement.v1.EnableServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getEnableServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be
+     * be used for the project. It prevents accidental usage that may cause
+     * unexpected billing charges or security leaks.
+     * Operation<response: DisableServiceResponse>
+     * 
+ */ + @java.lang.Deprecated + public void disableService( + com.google.api.servicemanagement.v1.DisableServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDisableServiceMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * [Google Service Management API](/service-management/overview)
+   * 
+ */ + public static final class ServiceManagerBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private ServiceManagerBlockingStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ServiceManagerBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceManagerBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists managed services.
+     * Returns all public services. For authenticated users, also returns all
+     * services the calling user has "servicemanagement.services.get" permission
+     * for.
+     * **BETA:** If the caller specifies the `consumer_id`, it returns only the
+     * services enabled on the consumer. The `consumer_id` must have the format
+     * of "project:{PROJECT-ID}".
+     * 
+ */ + public com.google.api.servicemanagement.v1.ListServicesResponse listServices( + com.google.api.servicemanagement.v1.ListServicesRequest request) { + return blockingUnaryCall(getChannel(), getListServicesMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a managed service. Authentication is required unless the service is
+     * public.
+     * 
+ */ + public com.google.api.servicemanagement.v1.ManagedService getService( + com.google.api.servicemanagement.v1.GetServiceRequest request) { + return blockingUnaryCall(getChannel(), getGetServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new managed service.
+     * Please note one producer project can own no more than 20 services.
+     * Operation<response: ManagedService>
+     * 
+ */ + public com.google.longrunning.Operation createService( + com.google.api.servicemanagement.v1.CreateServiceRequest request) { + return blockingUnaryCall(getChannel(), getCreateServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes a managed service. This method will change the service to the
+     * `Soft-Delete` state for 30 days. Within this period, service producers may
+     * call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service.
+     * After 30 days, the service will be permanently deleted.
+     * Operation<response: google.protobuf.Empty>
+     * 
+ */ + public com.google.longrunning.Operation deleteService( + com.google.api.servicemanagement.v1.DeleteServiceRequest request) { + return blockingUnaryCall(getChannel(), getDeleteServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Revives a previously deleted managed service. The method restores the
+     * service using the configuration at the time the service was deleted.
+     * The target service must exist and must have been deleted within the
+     * last 30 days.
+     * Operation<response: UndeleteServiceResponse>
+     * 
+ */ + public com.google.longrunning.Operation undeleteService( + com.google.api.servicemanagement.v1.UndeleteServiceRequest request) { + return blockingUnaryCall(getChannel(), getUndeleteServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the history of the service configuration for a managed service,
+     * from the newest to the oldest.
+     * 
+ */ + public com.google.api.servicemanagement.v1.ListServiceConfigsResponse listServiceConfigs( + com.google.api.servicemanagement.v1.ListServiceConfigsRequest request) { + return blockingUnaryCall( + getChannel(), getListServiceConfigsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a service configuration (version) for a managed service.
+     * 
+ */ + public com.google.api.Service getServiceConfig( + com.google.api.servicemanagement.v1.GetServiceConfigRequest request) { + return blockingUnaryCall( + getChannel(), getGetServiceConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new service configuration (version) for a managed service.
+     * This method only stores the service configuration. To roll out the service
+     * configuration to backend systems please call
+     * [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
+     * Only the 100 most recent service configurations and ones referenced by
+     * existing rollouts are kept for each service. The rest will be deleted
+     * eventually.
+     * 
+ */ + public com.google.api.Service createServiceConfig( + com.google.api.servicemanagement.v1.CreateServiceConfigRequest request) { + return blockingUnaryCall( + getChannel(), getCreateServiceConfigMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new service configuration (version) for a managed service based
+     * on
+     * user-supplied configuration source files (for example: OpenAPI
+     * Specification). This method stores the source configurations as well as the
+     * generated service configuration. To rollout the service configuration to
+     * other services,
+     * please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
+     * Only the 100 most recent configuration sources and ones referenced by
+     * existing service configurtions are kept for each service. The rest will be
+     * deleted eventually.
+     * Operation<response: SubmitConfigSourceResponse>
+     * 
+ */ + public com.google.longrunning.Operation submitConfigSource( + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest request) { + return blockingUnaryCall( + getChannel(), getSubmitConfigSourceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the history of the service configuration rollouts for a managed
+     * service, from the newest to the oldest.
+     * 
+ */ + public com.google.api.servicemanagement.v1.ListServiceRolloutsResponse listServiceRollouts( + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest request) { + return blockingUnaryCall( + getChannel(), getListServiceRolloutsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout].
+     * 
+ */ + public com.google.api.servicemanagement.v1.Rollout getServiceRollout( + com.google.api.servicemanagement.v1.GetServiceRolloutRequest request) { + return blockingUnaryCall( + getChannel(), getGetServiceRolloutMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new service configuration rollout. Based on rollout, the
+     * Google Service Management will roll out the service configurations to
+     * different backend services. For example, the logging configuration will be
+     * pushed to Google Cloud Logging.
+     * Please note that any previous pending and running Rollouts and associated
+     * Operations will be automatically cancelled so that the latest Rollout will
+     * not be blocked by previous Rollouts.
+     * Only the 100 most recent (in any state) and the last 10 successful (if not
+     * already part of the set of 100 most recent) rollouts are kept for each
+     * service. The rest will be deleted eventually.
+     * Operation<response: Rollout>
+     * 
+ */ + public com.google.longrunning.Operation createServiceRollout( + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest request) { + return blockingUnaryCall( + getChannel(), getCreateServiceRolloutMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Generates and returns a report (errors, warnings and changes from
+     * existing configurations) associated with
+     * GenerateConfigReportRequest.new_value
+     * If GenerateConfigReportRequest.old_value is specified,
+     * GenerateConfigReportRequest will contain a single ChangeReport based on the
+     * comparison between GenerateConfigReportRequest.new_value and
+     * GenerateConfigReportRequest.old_value.
+     * If GenerateConfigReportRequest.old_value is not specified, this method
+     * will compare GenerateConfigReportRequest.new_value with the last pushed
+     * service configuration.
+     * 
+ */ + public com.google.api.servicemanagement.v1.GenerateConfigReportResponse generateConfigReport( + com.google.api.servicemanagement.v1.GenerateConfigReportRequest request) { + return blockingUnaryCall( + getChannel(), getGenerateConfigReportMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used
+     * for the project. See
+     * [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for
+     * more information.
+     * Operation<response: EnableServiceResponse>
+     * 
+ */ + @java.lang.Deprecated + public com.google.longrunning.Operation enableService( + com.google.api.servicemanagement.v1.EnableServiceRequest request) { + return blockingUnaryCall(getChannel(), getEnableServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be
+     * be used for the project. It prevents accidental usage that may cause
+     * unexpected billing charges or security leaks.
+     * Operation<response: DisableServiceResponse>
+     * 
+ */ + @java.lang.Deprecated + public com.google.longrunning.Operation disableService( + com.google.api.servicemanagement.v1.DisableServiceRequest request) { + return blockingUnaryCall(getChannel(), getDisableServiceMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * [Google Service Management API](/service-management/overview)
+   * 
+ */ + public static final class ServiceManagerFutureStub + extends io.grpc.stub.AbstractFutureStub { + private ServiceManagerFutureStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected ServiceManagerFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new ServiceManagerFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * Lists managed services.
+     * Returns all public services. For authenticated users, also returns all
+     * services the calling user has "servicemanagement.services.get" permission
+     * for.
+     * **BETA:** If the caller specifies the `consumer_id`, it returns only the
+     * services enabled on the consumer. The `consumer_id` must have the format
+     * of "project:{PROJECT-ID}".
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.api.servicemanagement.v1.ListServicesResponse> + listServices(com.google.api.servicemanagement.v1.ListServicesRequest request) { + return futureUnaryCall( + getChannel().newCall(getListServicesMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a managed service. Authentication is required unless the service is
+     * public.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.api.servicemanagement.v1.ManagedService> + getService(com.google.api.servicemanagement.v1.GetServiceRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new managed service.
+     * Please note one producer project can own no more than 20 services.
+     * Operation<response: ManagedService>
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createService(com.google.api.servicemanagement.v1.CreateServiceRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes a managed service. This method will change the service to the
+     * `Soft-Delete` state for 30 days. Within this period, service producers may
+     * call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service.
+     * After 30 days, the service will be permanently deleted.
+     * Operation<response: google.protobuf.Empty>
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteService(com.google.api.servicemanagement.v1.DeleteServiceRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Revives a previously deleted managed service. The method restores the
+     * service using the configuration at the time the service was deleted.
+     * The target service must exist and must have been deleted within the
+     * last 30 days.
+     * Operation<response: UndeleteServiceResponse>
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + undeleteService(com.google.api.servicemanagement.v1.UndeleteServiceRequest request) { + return futureUnaryCall( + getChannel().newCall(getUndeleteServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the history of the service configuration for a managed service,
+     * from the newest to the oldest.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.api.servicemanagement.v1.ListServiceConfigsResponse> + listServiceConfigs(com.google.api.servicemanagement.v1.ListServiceConfigsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListServiceConfigsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a service configuration (version) for a managed service.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getServiceConfig(com.google.api.servicemanagement.v1.GetServiceConfigRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetServiceConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new service configuration (version) for a managed service.
+     * This method only stores the service configuration. To roll out the service
+     * configuration to backend systems please call
+     * [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
+     * Only the 100 most recent service configurations and ones referenced by
+     * existing rollouts are kept for each service. The rest will be deleted
+     * eventually.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createServiceConfig( + com.google.api.servicemanagement.v1.CreateServiceConfigRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateServiceConfigMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new service configuration (version) for a managed service based
+     * on
+     * user-supplied configuration source files (for example: OpenAPI
+     * Specification). This method stores the source configurations as well as the
+     * generated service configuration. To rollout the service configuration to
+     * other services,
+     * please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout].
+     * Only the 100 most recent configuration sources and ones referenced by
+     * existing service configurtions are kept for each service. The rest will be
+     * deleted eventually.
+     * Operation<response: SubmitConfigSourceResponse>
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + submitConfigSource(com.google.api.servicemanagement.v1.SubmitConfigSourceRequest request) { + return futureUnaryCall( + getChannel().newCall(getSubmitConfigSourceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the history of the service configuration rollouts for a managed
+     * service, from the newest to the oldest.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse> + listServiceRollouts( + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListServiceRolloutsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.api.servicemanagement.v1.Rollout> + getServiceRollout(com.google.api.servicemanagement.v1.GetServiceRolloutRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetServiceRolloutMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a new service configuration rollout. Based on rollout, the
+     * Google Service Management will roll out the service configurations to
+     * different backend services. For example, the logging configuration will be
+     * pushed to Google Cloud Logging.
+     * Please note that any previous pending and running Rollouts and associated
+     * Operations will be automatically cancelled so that the latest Rollout will
+     * not be blocked by previous Rollouts.
+     * Only the 100 most recent (in any state) and the last 10 successful (if not
+     * already part of the set of 100 most recent) rollouts are kept for each
+     * service. The rest will be deleted eventually.
+     * Operation<response: Rollout>
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createServiceRollout( + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateServiceRolloutMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Generates and returns a report (errors, warnings and changes from
+     * existing configurations) associated with
+     * GenerateConfigReportRequest.new_value
+     * If GenerateConfigReportRequest.old_value is specified,
+     * GenerateConfigReportRequest will contain a single ChangeReport based on the
+     * comparison between GenerateConfigReportRequest.new_value and
+     * GenerateConfigReportRequest.old_value.
+     * If GenerateConfigReportRequest.old_value is not specified, this method
+     * will compare GenerateConfigReportRequest.new_value with the last pushed
+     * service configuration.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.api.servicemanagement.v1.GenerateConfigReportResponse> + generateConfigReport( + com.google.api.servicemanagement.v1.GenerateConfigReportRequest request) { + return futureUnaryCall( + getChannel().newCall(getGenerateConfigReportMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used
+     * for the project. See
+     * [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for
+     * more information.
+     * Operation<response: EnableServiceResponse>
+     * 
+ */ + @java.lang.Deprecated + public com.google.common.util.concurrent.ListenableFuture + enableService(com.google.api.servicemanagement.v1.EnableServiceRequest request) { + return futureUnaryCall( + getChannel().newCall(getEnableServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be
+     * be used for the project. It prevents accidental usage that may cause
+     * unexpected billing charges or security leaks.
+     * Operation<response: DisableServiceResponse>
+     * 
+ */ + @java.lang.Deprecated + public com.google.common.util.concurrent.ListenableFuture + disableService(com.google.api.servicemanagement.v1.DisableServiceRequest request) { + return futureUnaryCall( + getChannel().newCall(getDisableServiceMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_SERVICES = 0; + private static final int METHODID_GET_SERVICE = 1; + private static final int METHODID_CREATE_SERVICE = 2; + private static final int METHODID_DELETE_SERVICE = 3; + private static final int METHODID_UNDELETE_SERVICE = 4; + private static final int METHODID_LIST_SERVICE_CONFIGS = 5; + private static final int METHODID_GET_SERVICE_CONFIG = 6; + private static final int METHODID_CREATE_SERVICE_CONFIG = 7; + private static final int METHODID_SUBMIT_CONFIG_SOURCE = 8; + private static final int METHODID_LIST_SERVICE_ROLLOUTS = 9; + private static final int METHODID_GET_SERVICE_ROLLOUT = 10; + private static final int METHODID_CREATE_SERVICE_ROLLOUT = 11; + private static final int METHODID_GENERATE_CONFIG_REPORT = 12; + private static final int METHODID_ENABLE_SERVICE = 13; + private static final int METHODID_DISABLE_SERVICE = 14; + + 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 ServiceManagerImplBase serviceImpl; + private final int methodId; + + MethodHandlers(ServiceManagerImplBase 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_SERVICES: + serviceImpl.listServices( + (com.google.api.servicemanagement.v1.ListServicesRequest) request, + (io.grpc.stub.StreamObserver< + com.google.api.servicemanagement.v1.ListServicesResponse>) + responseObserver); + break; + case METHODID_GET_SERVICE: + serviceImpl.getService( + (com.google.api.servicemanagement.v1.GetServiceRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_SERVICE: + serviceImpl.createService( + (com.google.api.servicemanagement.v1.CreateServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_SERVICE: + serviceImpl.deleteService( + (com.google.api.servicemanagement.v1.DeleteServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UNDELETE_SERVICE: + serviceImpl.undeleteService( + (com.google.api.servicemanagement.v1.UndeleteServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SERVICE_CONFIGS: + serviceImpl.listServiceConfigs( + (com.google.api.servicemanagement.v1.ListServiceConfigsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.api.servicemanagement.v1.ListServiceConfigsResponse>) + responseObserver); + break; + case METHODID_GET_SERVICE_CONFIG: + serviceImpl.getServiceConfig( + (com.google.api.servicemanagement.v1.GetServiceConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CREATE_SERVICE_CONFIG: + serviceImpl.createServiceConfig( + (com.google.api.servicemanagement.v1.CreateServiceConfigRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SUBMIT_CONFIG_SOURCE: + serviceImpl.submitConfigSource( + (com.google.api.servicemanagement.v1.SubmitConfigSourceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_SERVICE_ROLLOUTS: + serviceImpl.listServiceRollouts( + (com.google.api.servicemanagement.v1.ListServiceRolloutsRequest) request, + (io.grpc.stub.StreamObserver< + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse>) + responseObserver); + break; + case METHODID_GET_SERVICE_ROLLOUT: + serviceImpl.getServiceRollout( + (com.google.api.servicemanagement.v1.GetServiceRolloutRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_SERVICE_ROLLOUT: + serviceImpl.createServiceRollout( + (com.google.api.servicemanagement.v1.CreateServiceRolloutRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_GENERATE_CONFIG_REPORT: + serviceImpl.generateConfigReport( + (com.google.api.servicemanagement.v1.GenerateConfigReportRequest) request, + (io.grpc.stub.StreamObserver< + com.google.api.servicemanagement.v1.GenerateConfigReportResponse>) + responseObserver); + break; + case METHODID_ENABLE_SERVICE: + serviceImpl.enableService( + (com.google.api.servicemanagement.v1.EnableServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DISABLE_SERVICE: + serviceImpl.disableService( + (com.google.api.servicemanagement.v1.DisableServiceRequest) 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 ServiceManagerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + ServiceManagerBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("ServiceManager"); + } + } + + private static final class ServiceManagerFileDescriptorSupplier + extends ServiceManagerBaseDescriptorSupplier { + ServiceManagerFileDescriptorSupplier() {} + } + + private static final class ServiceManagerMethodDescriptorSupplier + extends ServiceManagerBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + ServiceManagerMethodDescriptorSupplier(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 (ServiceManagerGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new ServiceManagerFileDescriptorSupplier()) + .addMethod(getListServicesMethod()) + .addMethod(getGetServiceMethod()) + .addMethod(getCreateServiceMethod()) + .addMethod(getDeleteServiceMethod()) + .addMethod(getUndeleteServiceMethod()) + .addMethod(getListServiceConfigsMethod()) + .addMethod(getGetServiceConfigMethod()) + .addMethod(getCreateServiceConfigMethod()) + .addMethod(getSubmitConfigSourceMethod()) + .addMethod(getListServiceRolloutsMethod()) + .addMethod(getGetServiceRolloutMethod()) + .addMethod(getCreateServiceRolloutMethod()) + .addMethod(getGenerateConfigReportMethod()) + .addMethod(getEnableServiceMethod()) + .addMethod(getDisableServiceMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java.header b/java.header new file mode 100644 index 0000000..3a9b503 --- /dev/null +++ b/java.header @@ -0,0 +1,15 @@ +^/\*$ +^ \* Copyright \d\d\d\d,? Google (Inc\.|LLC)( All [rR]ights [rR]eserved\.)?$ +^ \*$ +^ \* Licensed under the Apache License, Version 2\.0 \(the "License"\);$ +^ \* you may not use this file except in compliance with the License\.$ +^ \* You may obtain a copy of the License at$ +^ \*$ +^ \*[ ]+https?://www.apache.org/licenses/LICENSE-2\.0$ +^ \*$ +^ \* Unless required by applicable law or agreed to in writing, software$ +^ \* distributed under the License is distributed on an "AS IS" BASIS,$ +^ \* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied\.$ +^ \* See the License for the specific language governing permissions and$ +^ \* limitations under the License\.$ +^ \*/$ diff --git a/license-checks.xml b/license-checks.xml new file mode 100644 index 0000000..6597fce --- /dev/null +++ b/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 0000000..781e4c9 --- /dev/null +++ b/pom.xml @@ -0,0 +1,189 @@ + + + 4.0.0 + com.google.cloud + google-cloud-service-management-parent + pom + 0.0.1-SNAPSHOT + Google Service Management API Parent + https://github.com/googleapis/java-service-management + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 0.10.0 + + + + + chingor + Jeff Ching + chingor@google.com + Google + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-service-management.git + scm:git:git@github.com:googleapis/java-service-management.git + https://github.com/googleapis/java-service-management + HEAD + + + https://github.com/googleapis/java-service-management/issues + GitHub Issues + + + + sonatype-nexus-snapshots + https://oss.sonatype.org/content/repositories/snapshots + + + sonatype-nexus-staging + https://oss.sonatype.org/service/local/staging/deploy/maven2/ + + + + + Apache-2.0 + https://www.apache.org/licenses/LICENSE-2.0.txt + + + + + UTF-8 + UTF-8 + github + google-cloud-service-management-parent + + + + + + com.google.cloud + google-cloud-service-management + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-service-management-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-service-management-v1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 0.18.0 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-service-management + proto-google-cloud-service-management-v1 + grpc-google-cloud-service-management-v1 + google-cloud-service-management-bom + + + + + + org.apache.maven.plugins + maven-project-info-reports-plugin + 3.1.1 + + + + index + dependency-info + team + ci-management + issue-management + licenses + scm + dependency-management + distribution-management + summary + modules + + + + + true + ${site.installationModule} + jar + + + + org.apache.maven.plugins + maven-javadoc-plugin + 3.2.0 + + + html + + aggregate + javadoc + + + + + none + protected + true + ${project.build.directory}/javadoc + + + Test helpers packages + com.google.cloud.testing + + + SPI packages + com.google.cloud.spi* + + + + + https://grpc.io/grpc-java/javadoc/ + https://developers.google.com/protocol-buffers/docs/reference/java/ + https://googleapis.dev/java/google-auth-library/latest/ + https://googleapis.dev/java/gax/latest/ + https://googleapis.github.io/api-common-java/${google.api-common.version}/apidocs/ + + + + + + \ No newline at end of file diff --git a/proto-google-cloud-service-management-v1/pom.xml b/proto-google-cloud-service-management-v1/pom.xml new file mode 100644 index 0000000..b2db518 --- /dev/null +++ b/proto-google-cloud-service-management-v1/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-service-management-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-service-management-v1 + Proto library for google-cloud-service-management + + com.google.cloud + google-cloud-service-management-parent + 0.0.1-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-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ChangeReport.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ChangeReport.java new file mode 100644 index 0000000..fca84df --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ChangeReport.java @@ -0,0 +1,1045 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Change report associated with a particular service configuration.
+ * It contains a list of ConfigChanges based on the comparison between
+ * two service configurations.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ChangeReport} + */ +public final class ChangeReport extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ChangeReport) + ChangeReportOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChangeReport.newBuilder() to construct. + private ChangeReport(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChangeReport() { + configChanges_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeReport(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ChangeReport( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + configChanges_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + configChanges_.add( + input.readMessage(com.google.api.ConfigChange.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + configChanges_ = java.util.Collections.unmodifiableList(configChanges_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ChangeReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ChangeReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ChangeReport.class, + com.google.api.servicemanagement.v1.ChangeReport.Builder.class); + } + + public static final int CONFIG_CHANGES_FIELD_NUMBER = 1; + private java.util.List configChanges_; + /** + * + * + *
+   * List of changes between two service configurations.
+   * The changes will be alphabetically sorted based on the identifier
+   * of each change.
+   * A ConfigChange identifier is a dot separated path to the configuration.
+   * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+   * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + @java.lang.Override + public java.util.List getConfigChangesList() { + return configChanges_; + } + /** + * + * + *
+   * List of changes between two service configurations.
+   * The changes will be alphabetically sorted based on the identifier
+   * of each change.
+   * A ConfigChange identifier is a dot separated path to the configuration.
+   * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+   * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + @java.lang.Override + public java.util.List + getConfigChangesOrBuilderList() { + return configChanges_; + } + /** + * + * + *
+   * List of changes between two service configurations.
+   * The changes will be alphabetically sorted based on the identifier
+   * of each change.
+   * A ConfigChange identifier is a dot separated path to the configuration.
+   * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+   * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + @java.lang.Override + public int getConfigChangesCount() { + return configChanges_.size(); + } + /** + * + * + *
+   * List of changes between two service configurations.
+   * The changes will be alphabetically sorted based on the identifier
+   * of each change.
+   * A ConfigChange identifier is a dot separated path to the configuration.
+   * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+   * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + @java.lang.Override + public com.google.api.ConfigChange getConfigChanges(int index) { + return configChanges_.get(index); + } + /** + * + * + *
+   * List of changes between two service configurations.
+   * The changes will be alphabetically sorted based on the identifier
+   * of each change.
+   * A ConfigChange identifier is a dot separated path to the configuration.
+   * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+   * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + @java.lang.Override + public com.google.api.ConfigChangeOrBuilder getConfigChangesOrBuilder(int index) { + return configChanges_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < configChanges_.size(); i++) { + output.writeMessage(1, configChanges_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < configChanges_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, configChanges_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.ChangeReport)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.ChangeReport other = + (com.google.api.servicemanagement.v1.ChangeReport) obj; + + if (!getConfigChangesList().equals(other.getConfigChangesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getConfigChangesCount() > 0) { + hash = (37 * hash) + CONFIG_CHANGES_FIELD_NUMBER; + hash = (53 * hash) + getConfigChangesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ChangeReport parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.api.servicemanagement.v1.ChangeReport prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Change report associated with a particular service configuration.
+   * It contains a list of ConfigChanges based on the comparison between
+   * two service configurations.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ChangeReport} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ChangeReport) + com.google.api.servicemanagement.v1.ChangeReportOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ChangeReport_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ChangeReport_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ChangeReport.class, + com.google.api.servicemanagement.v1.ChangeReport.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.ChangeReport.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getConfigChangesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (configChangesBuilder_ == null) { + configChanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + configChangesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ChangeReport_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ChangeReport getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.ChangeReport.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ChangeReport build() { + com.google.api.servicemanagement.v1.ChangeReport result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ChangeReport buildPartial() { + com.google.api.servicemanagement.v1.ChangeReport result = + new com.google.api.servicemanagement.v1.ChangeReport(this); + int from_bitField0_ = bitField0_; + if (configChangesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + configChanges_ = java.util.Collections.unmodifiableList(configChanges_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.configChanges_ = configChanges_; + } else { + result.configChanges_ = configChangesBuilder_.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.api.servicemanagement.v1.ChangeReport) { + return mergeFrom((com.google.api.servicemanagement.v1.ChangeReport) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.ChangeReport other) { + if (other == com.google.api.servicemanagement.v1.ChangeReport.getDefaultInstance()) + return this; + if (configChangesBuilder_ == null) { + if (!other.configChanges_.isEmpty()) { + if (configChanges_.isEmpty()) { + configChanges_ = other.configChanges_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureConfigChangesIsMutable(); + configChanges_.addAll(other.configChanges_); + } + onChanged(); + } + } else { + if (!other.configChanges_.isEmpty()) { + if (configChangesBuilder_.isEmpty()) { + configChangesBuilder_.dispose(); + configChangesBuilder_ = null; + configChanges_ = other.configChanges_; + bitField0_ = (bitField0_ & ~0x00000001); + configChangesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getConfigChangesFieldBuilder() + : null; + } else { + configChangesBuilder_.addAllMessages(other.configChanges_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.ChangeReport parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.servicemanagement.v1.ChangeReport) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List configChanges_ = + java.util.Collections.emptyList(); + + private void ensureConfigChangesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + configChanges_ = new java.util.ArrayList(configChanges_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.ConfigChange, + com.google.api.ConfigChange.Builder, + com.google.api.ConfigChangeOrBuilder> + configChangesBuilder_; + + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public java.util.List getConfigChangesList() { + if (configChangesBuilder_ == null) { + return java.util.Collections.unmodifiableList(configChanges_); + } else { + return configChangesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public int getConfigChangesCount() { + if (configChangesBuilder_ == null) { + return configChanges_.size(); + } else { + return configChangesBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public com.google.api.ConfigChange getConfigChanges(int index) { + if (configChangesBuilder_ == null) { + return configChanges_.get(index); + } else { + return configChangesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public Builder setConfigChanges(int index, com.google.api.ConfigChange value) { + if (configChangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigChangesIsMutable(); + configChanges_.set(index, value); + onChanged(); + } else { + configChangesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public Builder setConfigChanges( + int index, com.google.api.ConfigChange.Builder builderForValue) { + if (configChangesBuilder_ == null) { + ensureConfigChangesIsMutable(); + configChanges_.set(index, builderForValue.build()); + onChanged(); + } else { + configChangesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public Builder addConfigChanges(com.google.api.ConfigChange value) { + if (configChangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigChangesIsMutable(); + configChanges_.add(value); + onChanged(); + } else { + configChangesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public Builder addConfigChanges(int index, com.google.api.ConfigChange value) { + if (configChangesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureConfigChangesIsMutable(); + configChanges_.add(index, value); + onChanged(); + } else { + configChangesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public Builder addConfigChanges(com.google.api.ConfigChange.Builder builderForValue) { + if (configChangesBuilder_ == null) { + ensureConfigChangesIsMutable(); + configChanges_.add(builderForValue.build()); + onChanged(); + } else { + configChangesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public Builder addConfigChanges( + int index, com.google.api.ConfigChange.Builder builderForValue) { + if (configChangesBuilder_ == null) { + ensureConfigChangesIsMutable(); + configChanges_.add(index, builderForValue.build()); + onChanged(); + } else { + configChangesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public Builder addAllConfigChanges( + java.lang.Iterable values) { + if (configChangesBuilder_ == null) { + ensureConfigChangesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, configChanges_); + onChanged(); + } else { + configChangesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public Builder clearConfigChanges() { + if (configChangesBuilder_ == null) { + configChanges_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + configChangesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public Builder removeConfigChanges(int index) { + if (configChangesBuilder_ == null) { + ensureConfigChangesIsMutable(); + configChanges_.remove(index); + onChanged(); + } else { + configChangesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public com.google.api.ConfigChange.Builder getConfigChangesBuilder(int index) { + return getConfigChangesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public com.google.api.ConfigChangeOrBuilder getConfigChangesOrBuilder(int index) { + if (configChangesBuilder_ == null) { + return configChanges_.get(index); + } else { + return configChangesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public java.util.List + getConfigChangesOrBuilderList() { + if (configChangesBuilder_ != null) { + return configChangesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(configChanges_); + } + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public com.google.api.ConfigChange.Builder addConfigChangesBuilder() { + return getConfigChangesFieldBuilder() + .addBuilder(com.google.api.ConfigChange.getDefaultInstance()); + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public com.google.api.ConfigChange.Builder addConfigChangesBuilder(int index) { + return getConfigChangesFieldBuilder() + .addBuilder(index, com.google.api.ConfigChange.getDefaultInstance()); + } + /** + * + * + *
+     * List of changes between two service configurations.
+     * The changes will be alphabetically sorted based on the identifier
+     * of each change.
+     * A ConfigChange identifier is a dot separated path to the configuration.
+     * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+     * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + public java.util.List getConfigChangesBuilderList() { + return getConfigChangesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.ConfigChange, + com.google.api.ConfigChange.Builder, + com.google.api.ConfigChangeOrBuilder> + getConfigChangesFieldBuilder() { + if (configChangesBuilder_ == null) { + configChangesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.ConfigChange, + com.google.api.ConfigChange.Builder, + com.google.api.ConfigChangeOrBuilder>( + configChanges_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + configChanges_ = null; + } + return configChangesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.ChangeReport) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ChangeReport) + private static final com.google.api.servicemanagement.v1.ChangeReport DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ChangeReport(); + } + + public static com.google.api.servicemanagement.v1.ChangeReport getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChangeReport parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ChangeReport(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ChangeReport getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ChangeReportOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ChangeReportOrBuilder.java new file mode 100644 index 0000000..c459397 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ChangeReportOrBuilder.java @@ -0,0 +1,96 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +public interface ChangeReportOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.ChangeReport) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of changes between two service configurations.
+   * The changes will be alphabetically sorted based on the identifier
+   * of each change.
+   * A ConfigChange identifier is a dot separated path to the configuration.
+   * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+   * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + java.util.List getConfigChangesList(); + /** + * + * + *
+   * List of changes between two service configurations.
+   * The changes will be alphabetically sorted based on the identifier
+   * of each change.
+   * A ConfigChange identifier is a dot separated path to the configuration.
+   * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+   * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + com.google.api.ConfigChange getConfigChanges(int index); + /** + * + * + *
+   * List of changes between two service configurations.
+   * The changes will be alphabetically sorted based on the identifier
+   * of each change.
+   * A ConfigChange identifier is a dot separated path to the configuration.
+   * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+   * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + int getConfigChangesCount(); + /** + * + * + *
+   * List of changes between two service configurations.
+   * The changes will be alphabetically sorted based on the identifier
+   * of each change.
+   * A ConfigChange identifier is a dot separated path to the configuration.
+   * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+   * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + java.util.List getConfigChangesOrBuilderList(); + /** + * + * + *
+   * List of changes between two service configurations.
+   * The changes will be alphabetically sorted based on the identifier
+   * of each change.
+   * A ConfigChange identifier is a dot separated path to the configuration.
+   * Example: visibility.rules[selector='LibraryService.CreateBook'].restriction
+   * 
+ * + * repeated .google.api.ConfigChange config_changes = 1; + */ + com.google.api.ConfigChangeOrBuilder getConfigChangesOrBuilder(int index); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigFile.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigFile.java new file mode 100644 index 0000000..007b821 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigFile.java @@ -0,0 +1,1117 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Generic specification of a source configuration file
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ConfigFile} + */ +public final class ConfigFile extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ConfigFile) + ConfigFileOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfigFile.newBuilder() to construct. + private ConfigFile(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigFile() { + filePath_ = ""; + fileContents_ = com.google.protobuf.ByteString.EMPTY; + fileType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConfigFile(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConfigFile( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + filePath_ = s; + break; + } + case 26: + { + fileContents_ = input.readBytes(); + break; + } + case 32: + { + int rawValue = input.readEnum(); + + fileType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ConfigFile.class, + com.google.api.servicemanagement.v1.ConfigFile.Builder.class); + } + + /** Protobuf enum {@code google.api.servicemanagement.v1.ConfigFile.FileType} */ + public enum FileType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unknown file type.
+     * 
+ * + * FILE_TYPE_UNSPECIFIED = 0; + */ + FILE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * YAML-specification of service.
+     * 
+ * + * SERVICE_CONFIG_YAML = 1; + */ + SERVICE_CONFIG_YAML(1), + /** + * + * + *
+     * OpenAPI specification, serialized in JSON.
+     * 
+ * + * OPEN_API_JSON = 2; + */ + OPEN_API_JSON(2), + /** + * + * + *
+     * OpenAPI specification, serialized in YAML.
+     * 
+ * + * OPEN_API_YAML = 3; + */ + OPEN_API_YAML(3), + /** + * + * + *
+     * FileDescriptorSet, generated by protoc.
+     * To generate, use protoc with imports and source info included.
+     * For an example test.proto file, the following command would put the value
+     * in a new file named out.pb.
+     * $protoc --include_imports --include_source_info test.proto -o out.pb
+     * 
+ * + * FILE_DESCRIPTOR_SET_PROTO = 4; + */ + FILE_DESCRIPTOR_SET_PROTO(4), + /** + * + * + *
+     * Uncompiled Proto file. Used for storage and display purposes only,
+     * currently server-side compilation is not supported. Should match the
+     * inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A
+     * file of this type can only be included if at least one file of type
+     * FILE_DESCRIPTOR_SET_PROTO is included.
+     * 
+ * + * PROTO_FILE = 6; + */ + PROTO_FILE(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unknown file type.
+     * 
+ * + * FILE_TYPE_UNSPECIFIED = 0; + */ + public static final int FILE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * YAML-specification of service.
+     * 
+ * + * SERVICE_CONFIG_YAML = 1; + */ + public static final int SERVICE_CONFIG_YAML_VALUE = 1; + /** + * + * + *
+     * OpenAPI specification, serialized in JSON.
+     * 
+ * + * OPEN_API_JSON = 2; + */ + public static final int OPEN_API_JSON_VALUE = 2; + /** + * + * + *
+     * OpenAPI specification, serialized in YAML.
+     * 
+ * + * OPEN_API_YAML = 3; + */ + public static final int OPEN_API_YAML_VALUE = 3; + /** + * + * + *
+     * FileDescriptorSet, generated by protoc.
+     * To generate, use protoc with imports and source info included.
+     * For an example test.proto file, the following command would put the value
+     * in a new file named out.pb.
+     * $protoc --include_imports --include_source_info test.proto -o out.pb
+     * 
+ * + * FILE_DESCRIPTOR_SET_PROTO = 4; + */ + public static final int FILE_DESCRIPTOR_SET_PROTO_VALUE = 4; + /** + * + * + *
+     * Uncompiled Proto file. Used for storage and display purposes only,
+     * currently server-side compilation is not supported. Should match the
+     * inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A
+     * file of this type can only be included if at least one file of type
+     * FILE_DESCRIPTOR_SET_PROTO is included.
+     * 
+ * + * PROTO_FILE = 6; + */ + public static final int PROTO_FILE_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static FileType 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 FileType forNumber(int value) { + switch (value) { + case 0: + return FILE_TYPE_UNSPECIFIED; + case 1: + return SERVICE_CONFIG_YAML; + case 2: + return OPEN_API_JSON; + case 3: + return OPEN_API_YAML; + case 4: + return FILE_DESCRIPTOR_SET_PROTO; + case 6: + return PROTO_FILE; + 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 FileType findValueByNumber(int number) { + return FileType.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.api.servicemanagement.v1.ConfigFile.getDescriptor().getEnumTypes().get(0); + } + + private static final FileType[] VALUES = values(); + + public static FileType 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 FileType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.servicemanagement.v1.ConfigFile.FileType) + } + + public static final int FILE_PATH_FIELD_NUMBER = 1; + private volatile java.lang.Object filePath_; + /** + * + * + *
+   * The file name of the configuration file (full or relative path).
+   * 
+ * + * string file_path = 1; + * + * @return The filePath. + */ + @java.lang.Override + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filePath_ = s; + return s; + } + } + /** + * + * + *
+   * The file name of the configuration file (full or relative path).
+   * 
+ * + * string file_path = 1; + * + * @return The bytes for filePath. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILE_CONTENTS_FIELD_NUMBER = 3; + private com.google.protobuf.ByteString fileContents_; + /** + * + * + *
+   * The bytes that constitute the file.
+   * 
+ * + * bytes file_contents = 3; + * + * @return The fileContents. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFileContents() { + return fileContents_; + } + + public static final int FILE_TYPE_FIELD_NUMBER = 4; + private int fileType_; + /** + * + * + *
+   * The type of configuration file this represents.
+   * 
+ * + * .google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4; + * + * @return The enum numeric value on the wire for fileType. + */ + @java.lang.Override + public int getFileTypeValue() { + return fileType_; + } + /** + * + * + *
+   * The type of configuration file this represents.
+   * 
+ * + * .google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4; + * + * @return The fileType. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigFile.FileType getFileType() { + @SuppressWarnings("deprecation") + com.google.api.servicemanagement.v1.ConfigFile.FileType result = + com.google.api.servicemanagement.v1.ConfigFile.FileType.valueOf(fileType_); + return result == null + ? com.google.api.servicemanagement.v1.ConfigFile.FileType.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getFilePathBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, filePath_); + } + if (!fileContents_.isEmpty()) { + output.writeBytes(3, fileContents_); + } + if (fileType_ + != com.google.api.servicemanagement.v1.ConfigFile.FileType.FILE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, fileType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFilePathBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, filePath_); + } + if (!fileContents_.isEmpty()) { + size += com.google.protobuf.CodedOutputStream.computeBytesSize(3, fileContents_); + } + if (fileType_ + != com.google.api.servicemanagement.v1.ConfigFile.FileType.FILE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, fileType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.ConfigFile)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.ConfigFile other = + (com.google.api.servicemanagement.v1.ConfigFile) obj; + + if (!getFilePath().equals(other.getFilePath())) return false; + if (!getFileContents().equals(other.getFileContents())) return false; + if (fileType_ != other.fileType_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FILE_PATH_FIELD_NUMBER; + hash = (53 * hash) + getFilePath().hashCode(); + hash = (37 * hash) + FILE_CONTENTS_FIELD_NUMBER; + hash = (53 * hash) + getFileContents().hashCode(); + hash = (37 * hash) + FILE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + fileType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ConfigFile parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.api.servicemanagement.v1.ConfigFile prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Generic specification of a source configuration file
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ConfigFile} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ConfigFile) + com.google.api.servicemanagement.v1.ConfigFileOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigFile_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigFile_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ConfigFile.class, + com.google.api.servicemanagement.v1.ConfigFile.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.ConfigFile.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + filePath_ = ""; + + fileContents_ = com.google.protobuf.ByteString.EMPTY; + + fileType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigFile_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigFile getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.ConfigFile.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigFile build() { + com.google.api.servicemanagement.v1.ConfigFile result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigFile buildPartial() { + com.google.api.servicemanagement.v1.ConfigFile result = + new com.google.api.servicemanagement.v1.ConfigFile(this); + result.filePath_ = filePath_; + result.fileContents_ = fileContents_; + result.fileType_ = fileType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.ConfigFile) { + return mergeFrom((com.google.api.servicemanagement.v1.ConfigFile) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.ConfigFile other) { + if (other == com.google.api.servicemanagement.v1.ConfigFile.getDefaultInstance()) return this; + if (!other.getFilePath().isEmpty()) { + filePath_ = other.filePath_; + onChanged(); + } + if (other.getFileContents() != com.google.protobuf.ByteString.EMPTY) { + setFileContents(other.getFileContents()); + } + if (other.fileType_ != 0) { + setFileTypeValue(other.getFileTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.ConfigFile parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.servicemanagement.v1.ConfigFile) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object filePath_ = ""; + /** + * + * + *
+     * The file name of the configuration file (full or relative path).
+     * 
+ * + * string file_path = 1; + * + * @return The filePath. + */ + public java.lang.String getFilePath() { + java.lang.Object ref = filePath_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filePath_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The file name of the configuration file (full or relative path).
+     * 
+ * + * string file_path = 1; + * + * @return The bytes for filePath. + */ + public com.google.protobuf.ByteString getFilePathBytes() { + java.lang.Object ref = filePath_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filePath_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The file name of the configuration file (full or relative path).
+     * 
+ * + * string file_path = 1; + * + * @param value The filePath to set. + * @return This builder for chaining. + */ + public Builder setFilePath(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filePath_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The file name of the configuration file (full or relative path).
+     * 
+ * + * string file_path = 1; + * + * @return This builder for chaining. + */ + public Builder clearFilePath() { + + filePath_ = getDefaultInstance().getFilePath(); + onChanged(); + return this; + } + /** + * + * + *
+     * The file name of the configuration file (full or relative path).
+     * 
+ * + * string file_path = 1; + * + * @param value The bytes for filePath to set. + * @return This builder for chaining. + */ + public Builder setFilePathBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filePath_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.ByteString fileContents_ = com.google.protobuf.ByteString.EMPTY; + /** + * + * + *
+     * The bytes that constitute the file.
+     * 
+ * + * bytes file_contents = 3; + * + * @return The fileContents. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFileContents() { + return fileContents_; + } + /** + * + * + *
+     * The bytes that constitute the file.
+     * 
+ * + * bytes file_contents = 3; + * + * @param value The fileContents to set. + * @return This builder for chaining. + */ + public Builder setFileContents(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + + fileContents_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The bytes that constitute the file.
+     * 
+ * + * bytes file_contents = 3; + * + * @return This builder for chaining. + */ + public Builder clearFileContents() { + + fileContents_ = getDefaultInstance().getFileContents(); + onChanged(); + return this; + } + + private int fileType_ = 0; + /** + * + * + *
+     * The type of configuration file this represents.
+     * 
+ * + * .google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4; + * + * @return The enum numeric value on the wire for fileType. + */ + @java.lang.Override + public int getFileTypeValue() { + return fileType_; + } + /** + * + * + *
+     * The type of configuration file this represents.
+     * 
+ * + * .google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4; + * + * @param value The enum numeric value on the wire for fileType to set. + * @return This builder for chaining. + */ + public Builder setFileTypeValue(int value) { + + fileType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The type of configuration file this represents.
+     * 
+ * + * .google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4; + * + * @return The fileType. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigFile.FileType getFileType() { + @SuppressWarnings("deprecation") + com.google.api.servicemanagement.v1.ConfigFile.FileType result = + com.google.api.servicemanagement.v1.ConfigFile.FileType.valueOf(fileType_); + return result == null + ? com.google.api.servicemanagement.v1.ConfigFile.FileType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The type of configuration file this represents.
+     * 
+ * + * .google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4; + * + * @param value The fileType to set. + * @return This builder for chaining. + */ + public Builder setFileType(com.google.api.servicemanagement.v1.ConfigFile.FileType value) { + if (value == null) { + throw new NullPointerException(); + } + + fileType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The type of configuration file this represents.
+     * 
+ * + * .google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4; + * + * @return This builder for chaining. + */ + public Builder clearFileType() { + + fileType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.ConfigFile) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ConfigFile) + private static final com.google.api.servicemanagement.v1.ConfigFile DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ConfigFile(); + } + + public static com.google.api.servicemanagement.v1.ConfigFile getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigFile parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConfigFile(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigFile getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigFileOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigFileOrBuilder.java new file mode 100644 index 0000000..36e1782 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigFileOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +public interface ConfigFileOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.ConfigFile) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The file name of the configuration file (full or relative path).
+   * 
+ * + * string file_path = 1; + * + * @return The filePath. + */ + java.lang.String getFilePath(); + /** + * + * + *
+   * The file name of the configuration file (full or relative path).
+   * 
+ * + * string file_path = 1; + * + * @return The bytes for filePath. + */ + com.google.protobuf.ByteString getFilePathBytes(); + + /** + * + * + *
+   * The bytes that constitute the file.
+   * 
+ * + * bytes file_contents = 3; + * + * @return The fileContents. + */ + com.google.protobuf.ByteString getFileContents(); + + /** + * + * + *
+   * The type of configuration file this represents.
+   * 
+ * + * .google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4; + * + * @return The enum numeric value on the wire for fileType. + */ + int getFileTypeValue(); + /** + * + * + *
+   * The type of configuration file this represents.
+   * 
+ * + * .google.api.servicemanagement.v1.ConfigFile.FileType file_type = 4; + * + * @return The fileType. + */ + com.google.api.servicemanagement.v1.ConfigFile.FileType getFileType(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigRef.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigRef.java new file mode 100644 index 0000000..da1e044 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigRef.java @@ -0,0 +1,641 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Represents a service configuration with its name and id.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ConfigRef} + */ +public final class ConfigRef extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ConfigRef) + ConfigRefOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfigRef.newBuilder() to construct. + private ConfigRef(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigRef() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConfigRef(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConfigRef( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ConfigRef.class, + com.google.api.servicemanagement.v1.ConfigRef.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource name of a service config. It must have the following
+   * format: "services/{service name}/configs/{config id}".
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Resource name of a service config. It must have the following
+   * format: "services/{service name}/configs/{config id}".
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.ConfigRef)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.ConfigRef other = + (com.google.api.servicemanagement.v1.ConfigRef) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ConfigRef parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.api.servicemanagement.v1.ConfigRef prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a service configuration with its name and id.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ConfigRef} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ConfigRef) + com.google.api.servicemanagement.v1.ConfigRefOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigRef_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigRef_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ConfigRef.class, + com.google.api.servicemanagement.v1.ConfigRef.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.ConfigRef.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigRef_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigRef getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.ConfigRef.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigRef build() { + com.google.api.servicemanagement.v1.ConfigRef result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigRef buildPartial() { + com.google.api.servicemanagement.v1.ConfigRef result = + new com.google.api.servicemanagement.v1.ConfigRef(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.api.servicemanagement.v1.ConfigRef) { + return mergeFrom((com.google.api.servicemanagement.v1.ConfigRef) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.ConfigRef other) { + if (other == com.google.api.servicemanagement.v1.ConfigRef.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.ConfigRef parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.servicemanagement.v1.ConfigRef) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource name of a service config. It must have the following
+     * format: "services/{service name}/configs/{config id}".
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Resource name of a service config. It must have the following
+     * format: "services/{service name}/configs/{config id}".
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Resource name of a service config. It must have the following
+     * format: "services/{service name}/configs/{config id}".
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Resource name of a service config. It must have the following
+     * format: "services/{service name}/configs/{config id}".
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource name of a service config. It must have the following
+     * format: "services/{service name}/configs/{config id}".
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.ConfigRef) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ConfigRef) + private static final com.google.api.servicemanagement.v1.ConfigRef DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ConfigRef(); + } + + public static com.google.api.servicemanagement.v1.ConfigRef getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigRef parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConfigRef(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigRef getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigRefOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigRefOrBuilder.java new file mode 100644 index 0000000..2940396 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigRefOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +public interface ConfigRefOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.ConfigRef) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource name of a service config. It must have the following
+   * format: "services/{service name}/configs/{config id}".
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource name of a service config. It must have the following
+   * format: "services/{service name}/configs/{config id}".
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigSource.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigSource.java new file mode 100644 index 0000000..725a4dc --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigSource.java @@ -0,0 +1,1167 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Represents a source file which is used to generate the service configuration
+ * defined by `google.api.Service`.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ConfigSource} + */ +public final class ConfigSource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ConfigSource) + ConfigSourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ConfigSource.newBuilder() to construct. + private ConfigSource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ConfigSource() { + id_ = ""; + files_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ConfigSource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ConfigSource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + files_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + files_.add( + input.readMessage( + com.google.api.servicemanagement.v1.ConfigFile.parser(), extensionRegistry)); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + files_ = java.util.Collections.unmodifiableList(files_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ConfigSource.class, + com.google.api.servicemanagement.v1.ConfigSource.Builder.class); + } + + public static final int ID_FIELD_NUMBER = 5; + private volatile java.lang.Object id_; + /** + * + * + *
+   * A unique ID for a specific instance of this message, typically assigned
+   * by the client for tracking purpose. If empty, the server may choose to
+   * generate one instead.
+   * 
+ * + * string id = 5; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * A unique ID for a specific instance of this message, typically assigned
+   * by the client for tracking purpose. If empty, the server may choose to
+   * generate one instead.
+   * 
+ * + * string id = 5; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILES_FIELD_NUMBER = 2; + private java.util.List files_; + /** + * + * + *
+   * Set of source configuration files that are used to generate a service
+   * configuration (`google.api.Service`).
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + @java.lang.Override + public java.util.List getFilesList() { + return files_; + } + /** + * + * + *
+   * Set of source configuration files that are used to generate a service
+   * configuration (`google.api.Service`).
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + @java.lang.Override + public java.util.List + getFilesOrBuilderList() { + return files_; + } + /** + * + * + *
+   * Set of source configuration files that are used to generate a service
+   * configuration (`google.api.Service`).
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + @java.lang.Override + public int getFilesCount() { + return files_.size(); + } + /** + * + * + *
+   * Set of source configuration files that are used to generate a service
+   * configuration (`google.api.Service`).
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigFile getFiles(int index) { + return files_.get(index); + } + /** + * + * + *
+   * Set of source configuration files that are used to generate a service
+   * configuration (`google.api.Service`).
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigFileOrBuilder getFilesOrBuilder(int index) { + return files_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < files_.size(); i++) { + output.writeMessage(2, files_.get(i)); + } + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < files_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, files_.get(i)); + } + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.ConfigSource)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.ConfigSource other = + (com.google.api.servicemanagement.v1.ConfigSource) obj; + + if (!getId().equals(other.getId())) return false; + if (!getFilesList().equals(other.getFilesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getFilesCount() > 0) { + hash = (37 * hash) + FILES_FIELD_NUMBER; + hash = (53 * hash) + getFilesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ConfigSource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.api.servicemanagement.v1.ConfigSource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a source file which is used to generate the service configuration
+   * defined by `google.api.Service`.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ConfigSource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ConfigSource) + com.google.api.servicemanagement.v1.ConfigSourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigSource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigSource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ConfigSource.class, + com.google.api.servicemanagement.v1.ConfigSource.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.ConfigSource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getFilesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + id_ = ""; + + if (filesBuilder_ == null) { + files_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + filesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ConfigSource_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigSource getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.ConfigSource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigSource build() { + com.google.api.servicemanagement.v1.ConfigSource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigSource buildPartial() { + com.google.api.servicemanagement.v1.ConfigSource result = + new com.google.api.servicemanagement.v1.ConfigSource(this); + int from_bitField0_ = bitField0_; + result.id_ = id_; + if (filesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + files_ = java.util.Collections.unmodifiableList(files_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.files_ = files_; + } else { + result.files_ = filesBuilder_.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.api.servicemanagement.v1.ConfigSource) { + return mergeFrom((com.google.api.servicemanagement.v1.ConfigSource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.ConfigSource other) { + if (other == com.google.api.servicemanagement.v1.ConfigSource.getDefaultInstance()) + return this; + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (filesBuilder_ == null) { + if (!other.files_.isEmpty()) { + if (files_.isEmpty()) { + files_ = other.files_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureFilesIsMutable(); + files_.addAll(other.files_); + } + onChanged(); + } + } else { + if (!other.files_.isEmpty()) { + if (filesBuilder_.isEmpty()) { + filesBuilder_.dispose(); + filesBuilder_ = null; + files_ = other.files_; + bitField0_ = (bitField0_ & ~0x00000001); + filesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getFilesFieldBuilder() + : null; + } else { + filesBuilder_.addAllMessages(other.files_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.ConfigSource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.servicemanagement.v1.ConfigSource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * A unique ID for a specific instance of this message, typically assigned
+     * by the client for tracking purpose. If empty, the server may choose to
+     * generate one instead.
+     * 
+ * + * string id = 5; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A unique ID for a specific instance of this message, typically assigned
+     * by the client for tracking purpose. If empty, the server may choose to
+     * generate one instead.
+     * 
+ * + * string id = 5; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A unique ID for a specific instance of this message, typically assigned
+     * by the client for tracking purpose. If empty, the server may choose to
+     * generate one instead.
+     * 
+ * + * string id = 5; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A unique ID for a specific instance of this message, typically assigned
+     * by the client for tracking purpose. If empty, the server may choose to
+     * generate one instead.
+     * 
+ * + * string id = 5; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * A unique ID for a specific instance of this message, typically assigned
+     * by the client for tracking purpose. If empty, the server may choose to
+     * generate one instead.
+     * 
+ * + * string id = 5; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.util.List files_ = + java.util.Collections.emptyList(); + + private void ensureFilesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + files_ = new java.util.ArrayList(files_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.ConfigFile, + com.google.api.servicemanagement.v1.ConfigFile.Builder, + com.google.api.servicemanagement.v1.ConfigFileOrBuilder> + filesBuilder_; + + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public java.util.List getFilesList() { + if (filesBuilder_ == null) { + return java.util.Collections.unmodifiableList(files_); + } else { + return filesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public int getFilesCount() { + if (filesBuilder_ == null) { + return files_.size(); + } else { + return filesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public com.google.api.servicemanagement.v1.ConfigFile getFiles(int index) { + if (filesBuilder_ == null) { + return files_.get(index); + } else { + return filesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public Builder setFiles(int index, com.google.api.servicemanagement.v1.ConfigFile value) { + if (filesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilesIsMutable(); + files_.set(index, value); + onChanged(); + } else { + filesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public Builder setFiles( + int index, com.google.api.servicemanagement.v1.ConfigFile.Builder builderForValue) { + if (filesBuilder_ == null) { + ensureFilesIsMutable(); + files_.set(index, builderForValue.build()); + onChanged(); + } else { + filesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public Builder addFiles(com.google.api.servicemanagement.v1.ConfigFile value) { + if (filesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilesIsMutable(); + files_.add(value); + onChanged(); + } else { + filesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public Builder addFiles(int index, com.google.api.servicemanagement.v1.ConfigFile value) { + if (filesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureFilesIsMutable(); + files_.add(index, value); + onChanged(); + } else { + filesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public Builder addFiles( + com.google.api.servicemanagement.v1.ConfigFile.Builder builderForValue) { + if (filesBuilder_ == null) { + ensureFilesIsMutable(); + files_.add(builderForValue.build()); + onChanged(); + } else { + filesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public Builder addFiles( + int index, com.google.api.servicemanagement.v1.ConfigFile.Builder builderForValue) { + if (filesBuilder_ == null) { + ensureFilesIsMutable(); + files_.add(index, builderForValue.build()); + onChanged(); + } else { + filesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public Builder addAllFiles( + java.lang.Iterable values) { + if (filesBuilder_ == null) { + ensureFilesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, files_); + onChanged(); + } else { + filesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public Builder clearFiles() { + if (filesBuilder_ == null) { + files_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + filesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public Builder removeFiles(int index) { + if (filesBuilder_ == null) { + ensureFilesIsMutable(); + files_.remove(index); + onChanged(); + } else { + filesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public com.google.api.servicemanagement.v1.ConfigFile.Builder getFilesBuilder(int index) { + return getFilesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public com.google.api.servicemanagement.v1.ConfigFileOrBuilder getFilesOrBuilder(int index) { + if (filesBuilder_ == null) { + return files_.get(index); + } else { + return filesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public java.util.List + getFilesOrBuilderList() { + if (filesBuilder_ != null) { + return filesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(files_); + } + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public com.google.api.servicemanagement.v1.ConfigFile.Builder addFilesBuilder() { + return getFilesFieldBuilder() + .addBuilder(com.google.api.servicemanagement.v1.ConfigFile.getDefaultInstance()); + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public com.google.api.servicemanagement.v1.ConfigFile.Builder addFilesBuilder(int index) { + return getFilesFieldBuilder() + .addBuilder(index, com.google.api.servicemanagement.v1.ConfigFile.getDefaultInstance()); + } + /** + * + * + *
+     * Set of source configuration files that are used to generate a service
+     * configuration (`google.api.Service`).
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + public java.util.List + getFilesBuilderList() { + return getFilesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.ConfigFile, + com.google.api.servicemanagement.v1.ConfigFile.Builder, + com.google.api.servicemanagement.v1.ConfigFileOrBuilder> + getFilesFieldBuilder() { + if (filesBuilder_ == null) { + filesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.ConfigFile, + com.google.api.servicemanagement.v1.ConfigFile.Builder, + com.google.api.servicemanagement.v1.ConfigFileOrBuilder>( + files_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + files_ = null; + } + return filesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.ConfigSource) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ConfigSource) + private static final com.google.api.servicemanagement.v1.ConfigSource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ConfigSource(); + } + + public static com.google.api.servicemanagement.v1.ConfigSource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ConfigSource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ConfigSource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigSource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigSourceOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigSourceOrBuilder.java new file mode 100644 index 0000000..b2c82aa --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ConfigSourceOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +public interface ConfigSourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.ConfigSource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * A unique ID for a specific instance of this message, typically assigned
+   * by the client for tracking purpose. If empty, the server may choose to
+   * generate one instead.
+   * 
+ * + * string id = 5; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * A unique ID for a specific instance of this message, typically assigned
+   * by the client for tracking purpose. If empty, the server may choose to
+   * generate one instead.
+   * 
+ * + * string id = 5; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * Set of source configuration files that are used to generate a service
+   * configuration (`google.api.Service`).
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + java.util.List getFilesList(); + /** + * + * + *
+   * Set of source configuration files that are used to generate a service
+   * configuration (`google.api.Service`).
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + com.google.api.servicemanagement.v1.ConfigFile getFiles(int index); + /** + * + * + *
+   * Set of source configuration files that are used to generate a service
+   * configuration (`google.api.Service`).
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + int getFilesCount(); + /** + * + * + *
+   * Set of source configuration files that are used to generate a service
+   * configuration (`google.api.Service`).
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + java.util.List + getFilesOrBuilderList(); + /** + * + * + *
+   * Set of source configuration files that are used to generate a service
+   * configuration (`google.api.Service`).
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ConfigFile files = 2; + */ + com.google.api.servicemanagement.v1.ConfigFileOrBuilder getFilesOrBuilder(int index); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceConfigRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceConfigRequest.java new file mode 100644 index 0000000..7e6a86a --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceConfigRequest.java @@ -0,0 +1,927 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for CreateServiceConfig method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.CreateServiceConfigRequest} + */ +public final class CreateServiceConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.CreateServiceConfigRequest) + CreateServiceConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateServiceConfigRequest.newBuilder() to construct. + private CreateServiceConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateServiceConfigRequest() { + serviceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateServiceConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateServiceConfigRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + com.google.api.Service.Builder subBuilder = null; + if (serviceConfig_ != null) { + subBuilder = serviceConfig_.toBuilder(); + } + serviceConfig_ = + input.readMessage(com.google.api.Service.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(serviceConfig_); + serviceConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.CreateServiceConfigRequest.class, + com.google.api.servicemanagement.v1.CreateServiceConfigRequest.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SERVICE_CONFIG_FIELD_NUMBER = 2; + private com.google.api.Service serviceConfig_; + /** + * + * + *
+   * Required. The service configuration resource.
+   * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the serviceConfig field is set. + */ + @java.lang.Override + public boolean hasServiceConfig() { + return serviceConfig_ != null; + } + /** + * + * + *
+   * Required. The service configuration resource.
+   * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceConfig. + */ + @java.lang.Override + public com.google.api.Service getServiceConfig() { + return serviceConfig_ == null ? com.google.api.Service.getDefaultInstance() : serviceConfig_; + } + /** + * + * + *
+   * Required. The service configuration resource.
+   * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.api.ServiceOrBuilder getServiceConfigOrBuilder() { + return getServiceConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (serviceConfig_ != null) { + output.writeMessage(2, getServiceConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (serviceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getServiceConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.CreateServiceConfigRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.CreateServiceConfigRequest other = + (com.google.api.servicemanagement.v1.CreateServiceConfigRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (hasServiceConfig() != other.hasServiceConfig()) return false; + if (hasServiceConfig()) { + if (!getServiceConfig().equals(other.getServiceConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + if (hasServiceConfig()) { + hash = (37 * hash) + SERVICE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServiceConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.CreateServiceConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CreateServiceConfig method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.CreateServiceConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.CreateServiceConfigRequest) + com.google.api.servicemanagement.v1.CreateServiceConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.CreateServiceConfigRequest.class, + com.google.api.servicemanagement.v1.CreateServiceConfigRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.CreateServiceConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + if (serviceConfigBuilder_ == null) { + serviceConfig_ = null; + } else { + serviceConfig_ = null; + serviceConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceConfigRequest + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.CreateServiceConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceConfigRequest build() { + com.google.api.servicemanagement.v1.CreateServiceConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceConfigRequest buildPartial() { + com.google.api.servicemanagement.v1.CreateServiceConfigRequest result = + new com.google.api.servicemanagement.v1.CreateServiceConfigRequest(this); + result.serviceName_ = serviceName_; + if (serviceConfigBuilder_ == null) { + result.serviceConfig_ = serviceConfig_; + } else { + result.serviceConfig_ = serviceConfigBuilder_.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.api.servicemanagement.v1.CreateServiceConfigRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.CreateServiceConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.CreateServiceConfigRequest other) { + if (other + == com.google.api.servicemanagement.v1.CreateServiceConfigRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (other.hasServiceConfig()) { + mergeServiceConfig(other.getServiceConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.CreateServiceConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.CreateServiceConfigRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private com.google.api.Service serviceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Service, com.google.api.Service.Builder, com.google.api.ServiceOrBuilder> + serviceConfigBuilder_; + /** + * + * + *
+     * Required. The service configuration resource.
+     * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the serviceConfig field is set. + */ + public boolean hasServiceConfig() { + return serviceConfigBuilder_ != null || serviceConfig_ != null; + } + /** + * + * + *
+     * Required. The service configuration resource.
+     * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The serviceConfig. + */ + public com.google.api.Service getServiceConfig() { + if (serviceConfigBuilder_ == null) { + return serviceConfig_ == null + ? com.google.api.Service.getDefaultInstance() + : serviceConfig_; + } else { + return serviceConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The service configuration resource.
+     * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setServiceConfig(com.google.api.Service value) { + if (serviceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceConfig_ = value; + onChanged(); + } else { + serviceConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The service configuration resource.
+     * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setServiceConfig(com.google.api.Service.Builder builderForValue) { + if (serviceConfigBuilder_ == null) { + serviceConfig_ = builderForValue.build(); + onChanged(); + } else { + serviceConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The service configuration resource.
+     * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeServiceConfig(com.google.api.Service value) { + if (serviceConfigBuilder_ == null) { + if (serviceConfig_ != null) { + serviceConfig_ = + com.google.api.Service.newBuilder(serviceConfig_).mergeFrom(value).buildPartial(); + } else { + serviceConfig_ = value; + } + onChanged(); + } else { + serviceConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The service configuration resource.
+     * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearServiceConfig() { + if (serviceConfigBuilder_ == null) { + serviceConfig_ = null; + onChanged(); + } else { + serviceConfig_ = null; + serviceConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The service configuration resource.
+     * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.api.Service.Builder getServiceConfigBuilder() { + + onChanged(); + return getServiceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The service configuration resource.
+     * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.api.ServiceOrBuilder getServiceConfigOrBuilder() { + if (serviceConfigBuilder_ != null) { + return serviceConfigBuilder_.getMessageOrBuilder(); + } else { + return serviceConfig_ == null + ? com.google.api.Service.getDefaultInstance() + : serviceConfig_; + } + } + /** + * + * + *
+     * Required. The service configuration resource.
+     * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Service, com.google.api.Service.Builder, com.google.api.ServiceOrBuilder> + getServiceConfigFieldBuilder() { + if (serviceConfigBuilder_ == null) { + serviceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Service, + com.google.api.Service.Builder, + com.google.api.ServiceOrBuilder>( + getServiceConfig(), getParentForChildren(), isClean()); + serviceConfig_ = null; + } + return serviceConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.CreateServiceConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.CreateServiceConfigRequest) + private static final com.google.api.servicemanagement.v1.CreateServiceConfigRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.CreateServiceConfigRequest(); + } + + public static com.google.api.servicemanagement.v1.CreateServiceConfigRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateServiceConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateServiceConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceConfigRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceConfigRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceConfigRequestOrBuilder.java new file mode 100644 index 0000000..8d01eac --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceConfigRequestOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface CreateServiceConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.CreateServiceConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * Required. The service configuration resource.
+   * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the serviceConfig field is set. + */ + boolean hasServiceConfig(); + /** + * + * + *
+   * Required. The service configuration resource.
+   * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceConfig. + */ + com.google.api.Service getServiceConfig(); + /** + * + * + *
+   * Required. The service configuration resource.
+   * 
+ * + * .google.api.Service service_config = 2 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.api.ServiceOrBuilder getServiceConfigOrBuilder(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRequest.java new file mode 100644 index 0000000..03af3df --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRequest.java @@ -0,0 +1,760 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for CreateService method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.CreateServiceRequest} + */ +public final class CreateServiceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.CreateServiceRequest) + CreateServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateServiceRequest.newBuilder() to construct. + private CreateServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateServiceRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateServiceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.api.servicemanagement.v1.ManagedService.Builder subBuilder = null; + if (service_ != null) { + subBuilder = service_.toBuilder(); + } + service_ = + input.readMessage( + com.google.api.servicemanagement.v1.ManagedService.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(service_); + service_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.CreateServiceRequest.class, + com.google.api.servicemanagement.v1.CreateServiceRequest.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + private com.google.api.servicemanagement.v1.ManagedService service_; + /** + * + * + *
+   * Required. Initial values for the service resource.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return service_ != null; + } + /** + * + * + *
+   * Required. Initial values for the service resource.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The service. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ManagedService getService() { + return service_ == null + ? com.google.api.servicemanagement.v1.ManagedService.getDefaultInstance() + : service_; + } + /** + * + * + *
+   * Required. Initial values for the service resource.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ManagedServiceOrBuilder getServiceOrBuilder() { + return getService(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (service_ != null) { + output.writeMessage(1, getService()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (service_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getService()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.CreateServiceRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.CreateServiceRequest other = + (com.google.api.servicemanagement.v1.CreateServiceRequest) obj; + + if (hasService() != other.hasService()) return false; + if (hasService()) { + if (!getService().equals(other.getService())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasService()) { + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.CreateServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for CreateService method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.CreateServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.CreateServiceRequest) + com.google.api.servicemanagement.v1.CreateServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.CreateServiceRequest.class, + com.google.api.servicemanagement.v1.CreateServiceRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.CreateServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (serviceBuilder_ == null) { + service_ = null; + } else { + service_ = null; + serviceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceRequest getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.CreateServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceRequest build() { + com.google.api.servicemanagement.v1.CreateServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceRequest buildPartial() { + com.google.api.servicemanagement.v1.CreateServiceRequest result = + new com.google.api.servicemanagement.v1.CreateServiceRequest(this); + if (serviceBuilder_ == null) { + result.service_ = service_; + } else { + result.service_ = serviceBuilder_.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.api.servicemanagement.v1.CreateServiceRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.CreateServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.CreateServiceRequest other) { + if (other == com.google.api.servicemanagement.v1.CreateServiceRequest.getDefaultInstance()) + return this; + if (other.hasService()) { + mergeService(other.getService()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.CreateServiceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.CreateServiceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.api.servicemanagement.v1.ManagedService service_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.ManagedService, + com.google.api.servicemanagement.v1.ManagedService.Builder, + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder> + serviceBuilder_; + /** + * + * + *
+     * Required. Initial values for the service resource.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the service field is set. + */ + public boolean hasService() { + return serviceBuilder_ != null || service_ != null; + } + /** + * + * + *
+     * Required. Initial values for the service resource.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The service. + */ + public com.google.api.servicemanagement.v1.ManagedService getService() { + if (serviceBuilder_ == null) { + return service_ == null + ? com.google.api.servicemanagement.v1.ManagedService.getDefaultInstance() + : service_; + } else { + return serviceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Initial values for the service resource.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setService(com.google.api.servicemanagement.v1.ManagedService value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + onChanged(); + } else { + serviceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Initial values for the service resource.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setService( + com.google.api.servicemanagement.v1.ManagedService.Builder builderForValue) { + if (serviceBuilder_ == null) { + service_ = builderForValue.build(); + onChanged(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Initial values for the service resource.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeService(com.google.api.servicemanagement.v1.ManagedService value) { + if (serviceBuilder_ == null) { + if (service_ != null) { + service_ = + com.google.api.servicemanagement.v1.ManagedService.newBuilder(service_) + .mergeFrom(value) + .buildPartial(); + } else { + service_ = value; + } + onChanged(); + } else { + serviceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Initial values for the service resource.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearService() { + if (serviceBuilder_ == null) { + service_ = null; + onChanged(); + } else { + service_ = null; + serviceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Initial values for the service resource.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.api.servicemanagement.v1.ManagedService.Builder getServiceBuilder() { + + onChanged(); + return getServiceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Initial values for the service resource.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.api.servicemanagement.v1.ManagedServiceOrBuilder getServiceOrBuilder() { + if (serviceBuilder_ != null) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + return service_ == null + ? com.google.api.servicemanagement.v1.ManagedService.getDefaultInstance() + : service_; + } + } + /** + * + * + *
+     * Required. Initial values for the service resource.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.ManagedService, + com.google.api.servicemanagement.v1.ManagedService.Builder, + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder> + getServiceFieldBuilder() { + if (serviceBuilder_ == null) { + serviceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.ManagedService, + com.google.api.servicemanagement.v1.ManagedService.Builder, + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder>( + getService(), getParentForChildren(), isClean()); + service_ = null; + } + return serviceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.CreateServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.CreateServiceRequest) + private static final com.google.api.servicemanagement.v1.CreateServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.CreateServiceRequest(); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateServiceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRequestOrBuilder.java new file mode 100644 index 0000000..78e9e49 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRequestOrBuilder.java @@ -0,0 +1,66 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface CreateServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.CreateServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Initial values for the service resource.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the service field is set. + */ + boolean hasService(); + /** + * + * + *
+   * Required. Initial values for the service resource.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The service. + */ + com.google.api.servicemanagement.v1.ManagedService getService(); + /** + * + * + *
+   * Required. Initial values for the service resource.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ManagedService service = 1 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder getServiceOrBuilder(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRolloutRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRolloutRequest.java new file mode 100644 index 0000000..fbcd2c5 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRolloutRequest.java @@ -0,0 +1,952 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for 'CreateServiceRollout'
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.CreateServiceRolloutRequest} + */ +public final class CreateServiceRolloutRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.CreateServiceRolloutRequest) + CreateServiceRolloutRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateServiceRolloutRequest.newBuilder() to construct. + private CreateServiceRolloutRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateServiceRolloutRequest() { + serviceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateServiceRolloutRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateServiceRolloutRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + com.google.api.servicemanagement.v1.Rollout.Builder subBuilder = null; + if (rollout_ != null) { + subBuilder = rollout_.toBuilder(); + } + rollout_ = + input.readMessage( + com.google.api.servicemanagement.v1.Rollout.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(rollout_); + rollout_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceRolloutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceRolloutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest.class, + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLLOUT_FIELD_NUMBER = 2; + private com.google.api.servicemanagement.v1.Rollout rollout_; + /** + * + * + *
+   * Required. The rollout resource. The `service_name` field is output only.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollout field is set. + */ + @java.lang.Override + public boolean hasRollout() { + return rollout_ != null; + } + /** + * + * + *
+   * Required. The rollout resource. The `service_name` field is output only.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollout. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout getRollout() { + return rollout_ == null + ? com.google.api.servicemanagement.v1.Rollout.getDefaultInstance() + : rollout_; + } + /** + * + * + *
+   * Required. The rollout resource. The `service_name` field is output only.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.RolloutOrBuilder getRolloutOrBuilder() { + return getRollout(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (rollout_ != null) { + output.writeMessage(2, getRollout()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (rollout_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getRollout()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.CreateServiceRolloutRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest other = + (com.google.api.servicemanagement.v1.CreateServiceRolloutRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (hasRollout() != other.hasRollout()) return false; + if (hasRollout()) { + if (!getRollout().equals(other.getRollout())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + if (hasRollout()) { + hash = (37 * hash) + ROLLOUT_FIELD_NUMBER; + hash = (53 * hash) + getRollout().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'CreateServiceRollout'
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.CreateServiceRolloutRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.CreateServiceRolloutRequest) + com.google.api.servicemanagement.v1.CreateServiceRolloutRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceRolloutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceRolloutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest.class, + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.CreateServiceRolloutRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + if (rolloutBuilder_ == null) { + rollout_ = null; + } else { + rollout_ = null; + rolloutBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_CreateServiceRolloutRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceRolloutRequest + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.CreateServiceRolloutRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceRolloutRequest build() { + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceRolloutRequest buildPartial() { + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest result = + new com.google.api.servicemanagement.v1.CreateServiceRolloutRequest(this); + result.serviceName_ = serviceName_; + if (rolloutBuilder_ == null) { + result.rollout_ = rollout_; + } else { + result.rollout_ = rolloutBuilder_.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.api.servicemanagement.v1.CreateServiceRolloutRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.CreateServiceRolloutRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest other) { + if (other + == com.google.api.servicemanagement.v1.CreateServiceRolloutRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (other.hasRollout()) { + mergeRollout(other.getRollout()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.CreateServiceRolloutRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.CreateServiceRolloutRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private com.google.api.servicemanagement.v1.Rollout rollout_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout, + com.google.api.servicemanagement.v1.Rollout.Builder, + com.google.api.servicemanagement.v1.RolloutOrBuilder> + rolloutBuilder_; + /** + * + * + *
+     * Required. The rollout resource. The `service_name` field is output only.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollout field is set. + */ + public boolean hasRollout() { + return rolloutBuilder_ != null || rollout_ != null; + } + /** + * + * + *
+     * Required. The rollout resource. The `service_name` field is output only.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollout. + */ + public com.google.api.servicemanagement.v1.Rollout getRollout() { + if (rolloutBuilder_ == null) { + return rollout_ == null + ? com.google.api.servicemanagement.v1.Rollout.getDefaultInstance() + : rollout_; + } else { + return rolloutBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The rollout resource. The `service_name` field is output only.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRollout(com.google.api.servicemanagement.v1.Rollout value) { + if (rolloutBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + rollout_ = value; + onChanged(); + } else { + rolloutBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The rollout resource. The `service_name` field is output only.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRollout(com.google.api.servicemanagement.v1.Rollout.Builder builderForValue) { + if (rolloutBuilder_ == null) { + rollout_ = builderForValue.build(); + onChanged(); + } else { + rolloutBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The rollout resource. The `service_name` field is output only.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRollout(com.google.api.servicemanagement.v1.Rollout value) { + if (rolloutBuilder_ == null) { + if (rollout_ != null) { + rollout_ = + com.google.api.servicemanagement.v1.Rollout.newBuilder(rollout_) + .mergeFrom(value) + .buildPartial(); + } else { + rollout_ = value; + } + onChanged(); + } else { + rolloutBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The rollout resource. The `service_name` field is output only.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRollout() { + if (rolloutBuilder_ == null) { + rollout_ = null; + onChanged(); + } else { + rollout_ = null; + rolloutBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The rollout resource. The `service_name` field is output only.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.api.servicemanagement.v1.Rollout.Builder getRolloutBuilder() { + + onChanged(); + return getRolloutFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The rollout resource. The `service_name` field is output only.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.api.servicemanagement.v1.RolloutOrBuilder getRolloutOrBuilder() { + if (rolloutBuilder_ != null) { + return rolloutBuilder_.getMessageOrBuilder(); + } else { + return rollout_ == null + ? com.google.api.servicemanagement.v1.Rollout.getDefaultInstance() + : rollout_; + } + } + /** + * + * + *
+     * Required. The rollout resource. The `service_name` field is output only.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout, + com.google.api.servicemanagement.v1.Rollout.Builder, + com.google.api.servicemanagement.v1.RolloutOrBuilder> + getRolloutFieldBuilder() { + if (rolloutBuilder_ == null) { + rolloutBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout, + com.google.api.servicemanagement.v1.Rollout.Builder, + com.google.api.servicemanagement.v1.RolloutOrBuilder>( + getRollout(), getParentForChildren(), isClean()); + rollout_ = null; + } + return rolloutBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.CreateServiceRolloutRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.CreateServiceRolloutRequest) + private static final com.google.api.servicemanagement.v1.CreateServiceRolloutRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.CreateServiceRolloutRequest(); + } + + public static com.google.api.servicemanagement.v1.CreateServiceRolloutRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateServiceRolloutRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateServiceRolloutRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.CreateServiceRolloutRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRolloutRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRolloutRequestOrBuilder.java new file mode 100644 index 0000000..48536c9 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/CreateServiceRolloutRequestOrBuilder.java @@ -0,0 +1,93 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface CreateServiceRolloutRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.CreateServiceRolloutRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * Required. The rollout resource. The `service_name` field is output only.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the rollout field is set. + */ + boolean hasRollout(); + /** + * + * + *
+   * Required. The rollout resource. The `service_name` field is output only.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The rollout. + */ + com.google.api.servicemanagement.v1.Rollout getRollout(); + /** + * + * + *
+   * Required. The rollout resource. The `service_name` field is output only.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout rollout = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.api.servicemanagement.v1.RolloutOrBuilder getRolloutOrBuilder(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DeleteServiceRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DeleteServiceRequest.java new file mode 100644 index 0000000..47725e2 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DeleteServiceRequest.java @@ -0,0 +1,644 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for DeleteService method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.DeleteServiceRequest} + */ +public final class DeleteServiceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.DeleteServiceRequest) + DeleteServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteServiceRequest.newBuilder() to construct. + private DeleteServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteServiceRequest() { + serviceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteServiceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.DeleteServiceRequest.class, + com.google.api.servicemanagement.v1.DeleteServiceRequest.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = 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 (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.DeleteServiceRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.DeleteServiceRequest other = + (com.google.api.servicemanagement.v1.DeleteServiceRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.DeleteServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for DeleteService method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.DeleteServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.DeleteServiceRequest) + com.google.api.servicemanagement.v1.DeleteServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.DeleteServiceRequest.class, + com.google.api.servicemanagement.v1.DeleteServiceRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.DeleteServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DeleteServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DeleteServiceRequest getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.DeleteServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DeleteServiceRequest build() { + com.google.api.servicemanagement.v1.DeleteServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DeleteServiceRequest buildPartial() { + com.google.api.servicemanagement.v1.DeleteServiceRequest result = + new com.google.api.servicemanagement.v1.DeleteServiceRequest(this); + result.serviceName_ = serviceName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.DeleteServiceRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.DeleteServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.DeleteServiceRequest other) { + if (other == com.google.api.servicemanagement.v1.DeleteServiceRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.DeleteServiceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.DeleteServiceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = 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.api.servicemanagement.v1.DeleteServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.DeleteServiceRequest) + private static final com.google.api.servicemanagement.v1.DeleteServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.DeleteServiceRequest(); + } + + public static com.google.api.servicemanagement.v1.DeleteServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteServiceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DeleteServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DeleteServiceRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DeleteServiceRequestOrBuilder.java new file mode 100644 index 0000000..bdbec98 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DeleteServiceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface DeleteServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.DeleteServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/Diagnostic.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/Diagnostic.java new file mode 100644 index 0000000..5426ae9 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/Diagnostic.java @@ -0,0 +1,1102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Represents a diagnostic message (error or warning)
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.Diagnostic} + */ +public final class Diagnostic extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.Diagnostic) + DiagnosticOrBuilder { + private static final long serialVersionUID = 0L; + // Use Diagnostic.newBuilder() to construct. + private Diagnostic(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Diagnostic() { + location_ = ""; + kind_ = 0; + message_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Diagnostic(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Diagnostic( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + location_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + kind_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + message_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Diagnostic_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Diagnostic_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.Diagnostic.class, + com.google.api.servicemanagement.v1.Diagnostic.Builder.class); + } + + /** + * + * + *
+   * The kind of diagnostic information possible.
+   * 
+ * + * Protobuf enum {@code google.api.servicemanagement.v1.Diagnostic.Kind} + */ + public enum Kind implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Warnings and errors
+     * 
+ * + * WARNING = 0; + */ + WARNING(0), + /** + * + * + *
+     * Only errors
+     * 
+ * + * ERROR = 1; + */ + ERROR(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Warnings and errors
+     * 
+ * + * WARNING = 0; + */ + public static final int WARNING_VALUE = 0; + /** + * + * + *
+     * Only errors
+     * 
+ * + * ERROR = 1; + */ + public static final int ERROR_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 Kind 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 Kind forNumber(int value) { + switch (value) { + case 0: + return WARNING; + case 1: + return ERROR; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public Kind findValueByNumber(int number) { + return Kind.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.api.servicemanagement.v1.Diagnostic.getDescriptor().getEnumTypes().get(0); + } + + private static final Kind[] VALUES = values(); + + public static Kind 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 Kind(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.servicemanagement.v1.Diagnostic.Kind) + } + + public static final int LOCATION_FIELD_NUMBER = 1; + private volatile java.lang.Object location_; + /** + * + * + *
+   * File name and line number of the error or warning.
+   * 
+ * + * string location = 1; + * + * @return The location. + */ + @java.lang.Override + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } + } + /** + * + * + *
+   * File name and line number of the error or warning.
+   * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int KIND_FIELD_NUMBER = 2; + private int kind_; + /** + * + * + *
+   * The kind of diagnostic information provided.
+   * 
+ * + * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; + * + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override + public int getKindValue() { + return kind_; + } + /** + * + * + *
+   * The kind of diagnostic information provided.
+   * 
+ * + * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; + * + * @return The kind. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Diagnostic.Kind getKind() { + @SuppressWarnings("deprecation") + com.google.api.servicemanagement.v1.Diagnostic.Kind result = + com.google.api.servicemanagement.v1.Diagnostic.Kind.valueOf(kind_); + return result == null + ? com.google.api.servicemanagement.v1.Diagnostic.Kind.UNRECOGNIZED + : result; + } + + public static final int MESSAGE_FIELD_NUMBER = 3; + private volatile java.lang.Object message_; + /** + * + * + *
+   * Message describing the error or warning.
+   * 
+ * + * string message = 3; + * + * @return The message. + */ + @java.lang.Override + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } + } + /** + * + * + *
+   * Message describing the error or warning.
+   * 
+ * + * string message = 3; + * + * @return The bytes for message. + */ + @java.lang.Override + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = 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 (!getLocationBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, location_); + } + if (kind_ != com.google.api.servicemanagement.v1.Diagnostic.Kind.WARNING.getNumber()) { + output.writeEnum(2, kind_); + } + if (!getMessageBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, message_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getLocationBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, location_); + } + if (kind_ != com.google.api.servicemanagement.v1.Diagnostic.Kind.WARNING.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, kind_); + } + if (!getMessageBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, message_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.Diagnostic)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.Diagnostic other = + (com.google.api.servicemanagement.v1.Diagnostic) obj; + + if (!getLocation().equals(other.getLocation())) return false; + if (kind_ != other.kind_) return false; + if (!getMessage().equals(other.getMessage())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + LOCATION_FIELD_NUMBER; + hash = (53 * hash) + getLocation().hashCode(); + hash = (37 * hash) + KIND_FIELD_NUMBER; + hash = (53 * hash) + kind_; + hash = (37 * hash) + MESSAGE_FIELD_NUMBER; + hash = (53 * hash) + getMessage().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Diagnostic parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.api.servicemanagement.v1.Diagnostic prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Represents a diagnostic message (error or warning)
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.Diagnostic} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.Diagnostic) + com.google.api.servicemanagement.v1.DiagnosticOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Diagnostic_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Diagnostic_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.Diagnostic.class, + com.google.api.servicemanagement.v1.Diagnostic.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.Diagnostic.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + location_ = ""; + + kind_ = 0; + + message_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Diagnostic_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Diagnostic getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.Diagnostic.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Diagnostic build() { + com.google.api.servicemanagement.v1.Diagnostic result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Diagnostic buildPartial() { + com.google.api.servicemanagement.v1.Diagnostic result = + new com.google.api.servicemanagement.v1.Diagnostic(this); + result.location_ = location_; + result.kind_ = kind_; + result.message_ = message_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.Diagnostic) { + return mergeFrom((com.google.api.servicemanagement.v1.Diagnostic) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.Diagnostic other) { + if (other == com.google.api.servicemanagement.v1.Diagnostic.getDefaultInstance()) return this; + if (!other.getLocation().isEmpty()) { + location_ = other.location_; + onChanged(); + } + if (other.kind_ != 0) { + setKindValue(other.getKindValue()); + } + if (!other.getMessage().isEmpty()) { + message_ = other.message_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.Diagnostic parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.servicemanagement.v1.Diagnostic) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object location_ = ""; + /** + * + * + *
+     * File name and line number of the error or warning.
+     * 
+ * + * string location = 1; + * + * @return The location. + */ + public java.lang.String getLocation() { + java.lang.Object ref = location_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + location_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * File name and line number of the error or warning.
+     * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + public com.google.protobuf.ByteString getLocationBytes() { + java.lang.Object ref = location_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + location_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * File name and line number of the error or warning.
+     * 
+ * + * string location = 1; + * + * @param value The location to set. + * @return This builder for chaining. + */ + public Builder setLocation(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + location_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * File name and line number of the error or warning.
+     * 
+ * + * string location = 1; + * + * @return This builder for chaining. + */ + public Builder clearLocation() { + + location_ = getDefaultInstance().getLocation(); + onChanged(); + return this; + } + /** + * + * + *
+     * File name and line number of the error or warning.
+     * 
+ * + * string location = 1; + * + * @param value The bytes for location to set. + * @return This builder for chaining. + */ + public Builder setLocationBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + location_ = value; + onChanged(); + return this; + } + + private int kind_ = 0; + /** + * + * + *
+     * The kind of diagnostic information provided.
+     * 
+ * + * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; + * + * @return The enum numeric value on the wire for kind. + */ + @java.lang.Override + public int getKindValue() { + return kind_; + } + /** + * + * + *
+     * The kind of diagnostic information provided.
+     * 
+ * + * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; + * + * @param value The enum numeric value on the wire for kind to set. + * @return This builder for chaining. + */ + public Builder setKindValue(int value) { + + kind_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The kind of diagnostic information provided.
+     * 
+ * + * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; + * + * @return The kind. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Diagnostic.Kind getKind() { + @SuppressWarnings("deprecation") + com.google.api.servicemanagement.v1.Diagnostic.Kind result = + com.google.api.servicemanagement.v1.Diagnostic.Kind.valueOf(kind_); + return result == null + ? com.google.api.servicemanagement.v1.Diagnostic.Kind.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The kind of diagnostic information provided.
+     * 
+ * + * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; + * + * @param value The kind to set. + * @return This builder for chaining. + */ + public Builder setKind(com.google.api.servicemanagement.v1.Diagnostic.Kind value) { + if (value == null) { + throw new NullPointerException(); + } + + kind_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The kind of diagnostic information provided.
+     * 
+ * + * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; + * + * @return This builder for chaining. + */ + public Builder clearKind() { + + kind_ = 0; + onChanged(); + return this; + } + + private java.lang.Object message_ = ""; + /** + * + * + *
+     * Message describing the error or warning.
+     * 
+ * + * string message = 3; + * + * @return The message. + */ + public java.lang.String getMessage() { + java.lang.Object ref = message_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + message_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Message describing the error or warning.
+     * 
+ * + * string message = 3; + * + * @return The bytes for message. + */ + public com.google.protobuf.ByteString getMessageBytes() { + java.lang.Object ref = message_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + message_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Message describing the error or warning.
+     * 
+ * + * string message = 3; + * + * @param value The message to set. + * @return This builder for chaining. + */ + public Builder setMessage(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + message_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Message describing the error or warning.
+     * 
+ * + * string message = 3; + * + * @return This builder for chaining. + */ + public Builder clearMessage() { + + message_ = getDefaultInstance().getMessage(); + onChanged(); + return this; + } + /** + * + * + *
+     * Message describing the error or warning.
+     * 
+ * + * string message = 3; + * + * @param value The bytes for message to set. + * @return This builder for chaining. + */ + public Builder setMessageBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + message_ = 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.api.servicemanagement.v1.Diagnostic) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.Diagnostic) + private static final com.google.api.servicemanagement.v1.Diagnostic DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.Diagnostic(); + } + + public static com.google.api.servicemanagement.v1.Diagnostic getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Diagnostic parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Diagnostic(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Diagnostic getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DiagnosticOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DiagnosticOrBuilder.java new file mode 100644 index 0000000..04844a1 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DiagnosticOrBuilder.java @@ -0,0 +1,100 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +public interface DiagnosticOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.Diagnostic) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * File name and line number of the error or warning.
+   * 
+ * + * string location = 1; + * + * @return The location. + */ + java.lang.String getLocation(); + /** + * + * + *
+   * File name and line number of the error or warning.
+   * 
+ * + * string location = 1; + * + * @return The bytes for location. + */ + com.google.protobuf.ByteString getLocationBytes(); + + /** + * + * + *
+   * The kind of diagnostic information provided.
+   * 
+ * + * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; + * + * @return The enum numeric value on the wire for kind. + */ + int getKindValue(); + /** + * + * + *
+   * The kind of diagnostic information provided.
+   * 
+ * + * .google.api.servicemanagement.v1.Diagnostic.Kind kind = 2; + * + * @return The kind. + */ + com.google.api.servicemanagement.v1.Diagnostic.Kind getKind(); + + /** + * + * + *
+   * Message describing the error or warning.
+   * 
+ * + * string message = 3; + * + * @return The message. + */ + java.lang.String getMessage(); + /** + * + * + *
+   * Message describing the error or warning.
+   * 
+ * + * string message = 3; + * + * @return The bytes for message. + */ + com.google.protobuf.ByteString getMessageBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceRequest.java new file mode 100644 index 0000000..a894b29 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceRequest.java @@ -0,0 +1,865 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for DisableService method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.DisableServiceRequest} + */ +public final class DisableServiceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.DisableServiceRequest) + DisableServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DisableServiceRequest.newBuilder() to construct. + private DisableServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DisableServiceRequest() { + serviceName_ = ""; + consumerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DisableServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DisableServiceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + consumerId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DisableServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DisableServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.DisableServiceRequest.class, + com.google.api.servicemanagement.v1.DisableServiceRequest.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. Name of the service to disable. Specifying an unknown service name
+   * will cause the request to fail.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the service to disable. Specifying an unknown service name
+   * will cause the request to fail.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONSUMER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object consumerId_; + /** + * + * + *
+   * Required. The identity of consumer resource which service disablement will be
+   * applied to.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - "project:<project_id>"
+   * Note: this is made compatible with
+   * google.api.servicecontrol.v1.Operation.consumer_id.
+   * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The consumerId. + */ + @java.lang.Override + public java.lang.String getConsumerId() { + java.lang.Object ref = consumerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + consumerId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The identity of consumer resource which service disablement will be
+   * applied to.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - "project:<project_id>"
+   * Note: this is made compatible with
+   * google.api.servicecontrol.v1.Operation.consumer_id.
+   * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for consumerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConsumerIdBytes() { + java.lang.Object ref = consumerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + consumerId_ = 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 (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (!getConsumerIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, consumerId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (!getConsumerIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, consumerId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.DisableServiceRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.DisableServiceRequest other = + (com.google.api.servicemanagement.v1.DisableServiceRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (!getConsumerId().equals(other.getConsumerId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + CONSUMER_ID_FIELD_NUMBER; + hash = (53 * hash) + getConsumerId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.DisableServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for DisableService method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.DisableServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.DisableServiceRequest) + com.google.api.servicemanagement.v1.DisableServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DisableServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DisableServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.DisableServiceRequest.class, + com.google.api.servicemanagement.v1.DisableServiceRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.DisableServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + consumerId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DisableServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DisableServiceRequest getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.DisableServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DisableServiceRequest build() { + com.google.api.servicemanagement.v1.DisableServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DisableServiceRequest buildPartial() { + com.google.api.servicemanagement.v1.DisableServiceRequest result = + new com.google.api.servicemanagement.v1.DisableServiceRequest(this); + result.serviceName_ = serviceName_; + result.consumerId_ = consumerId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.DisableServiceRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.DisableServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.DisableServiceRequest other) { + if (other == com.google.api.servicemanagement.v1.DisableServiceRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (!other.getConsumerId().isEmpty()) { + consumerId_ = other.consumerId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.DisableServiceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.DisableServiceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. Name of the service to disable. Specifying an unknown service name
+     * will cause the request to fail.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the service to disable. Specifying an unknown service name
+     * will cause the request to fail.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the service to disable. Specifying an unknown service name
+     * will cause the request to fail.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the service to disable. Specifying an unknown service name
+     * will cause the request to fail.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the service to disable. Specifying an unknown service name
+     * will cause the request to fail.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object consumerId_ = ""; + /** + * + * + *
+     * Required. The identity of consumer resource which service disablement will be
+     * applied to.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - "project:<project_id>"
+     * Note: this is made compatible with
+     * google.api.servicecontrol.v1.Operation.consumer_id.
+     * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The consumerId. + */ + public java.lang.String getConsumerId() { + java.lang.Object ref = consumerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + consumerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The identity of consumer resource which service disablement will be
+     * applied to.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - "project:<project_id>"
+     * Note: this is made compatible with
+     * google.api.servicecontrol.v1.Operation.consumer_id.
+     * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for consumerId. + */ + public com.google.protobuf.ByteString getConsumerIdBytes() { + java.lang.Object ref = consumerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + consumerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The identity of consumer resource which service disablement will be
+     * applied to.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - "project:<project_id>"
+     * Note: this is made compatible with
+     * google.api.servicecontrol.v1.Operation.consumer_id.
+     * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The consumerId to set. + * @return This builder for chaining. + */ + public Builder setConsumerId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + consumerId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The identity of consumer resource which service disablement will be
+     * applied to.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - "project:<project_id>"
+     * Note: this is made compatible with
+     * google.api.servicecontrol.v1.Operation.consumer_id.
+     * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearConsumerId() { + + consumerId_ = getDefaultInstance().getConsumerId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The identity of consumer resource which service disablement will be
+     * applied to.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - "project:<project_id>"
+     * Note: this is made compatible with
+     * google.api.servicecontrol.v1.Operation.consumer_id.
+     * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for consumerId to set. + * @return This builder for chaining. + */ + public Builder setConsumerIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + consumerId_ = 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.api.servicemanagement.v1.DisableServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.DisableServiceRequest) + private static final com.google.api.servicemanagement.v1.DisableServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.DisableServiceRequest(); + } + + public static com.google.api.servicemanagement.v1.DisableServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisableServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DisableServiceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DisableServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceRequestOrBuilder.java new file mode 100644 index 0000000..e1d59ad --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceRequestOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface DisableServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.DisableServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the service to disable. Specifying an unknown service name
+   * will cause the request to fail.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. Name of the service to disable. Specifying an unknown service name
+   * will cause the request to fail.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * Required. The identity of consumer resource which service disablement will be
+   * applied to.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - "project:<project_id>"
+   * Note: this is made compatible with
+   * google.api.servicecontrol.v1.Operation.consumer_id.
+   * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The consumerId. + */ + java.lang.String getConsumerId(); + /** + * + * + *
+   * Required. The identity of consumer resource which service disablement will be
+   * applied to.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - "project:<project_id>"
+   * Note: this is made compatible with
+   * google.api.servicecontrol.v1.Operation.consumer_id.
+   * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for consumerId. + */ + com.google.protobuf.ByteString getConsumerIdBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceResponse.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceResponse.java new file mode 100644 index 0000000..62900aa --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceResponse.java @@ -0,0 +1,457 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Operation payload for DisableService method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.DisableServiceResponse} + */ +public final class DisableServiceResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.DisableServiceResponse) + DisableServiceResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use DisableServiceResponse.newBuilder() to construct. + private DisableServiceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DisableServiceResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DisableServiceResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DisableServiceResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DisableServiceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DisableServiceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.DisableServiceResponse.class, + com.google.api.servicemanagement.v1.DisableServiceResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.DisableServiceResponse)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.DisableServiceResponse other = + (com.google.api.servicemanagement.v1.DisableServiceResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.DisableServiceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Operation payload for DisableService method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.DisableServiceResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.DisableServiceResponse) + com.google.api.servicemanagement.v1.DisableServiceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DisableServiceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DisableServiceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.DisableServiceResponse.class, + com.google.api.servicemanagement.v1.DisableServiceResponse.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.DisableServiceResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_DisableServiceResponse_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DisableServiceResponse getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.DisableServiceResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DisableServiceResponse build() { + com.google.api.servicemanagement.v1.DisableServiceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DisableServiceResponse buildPartial() { + com.google.api.servicemanagement.v1.DisableServiceResponse result = + new com.google.api.servicemanagement.v1.DisableServiceResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.DisableServiceResponse) { + return mergeFrom((com.google.api.servicemanagement.v1.DisableServiceResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.DisableServiceResponse other) { + if (other == com.google.api.servicemanagement.v1.DisableServiceResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.DisableServiceResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.DisableServiceResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.DisableServiceResponse) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.DisableServiceResponse) + private static final com.google.api.servicemanagement.v1.DisableServiceResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.DisableServiceResponse(); + } + + public static com.google.api.servicemanagement.v1.DisableServiceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DisableServiceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DisableServiceResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.DisableServiceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceResponseOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceResponseOrBuilder.java new file mode 100644 index 0000000..c915fbc --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/DisableServiceResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface DisableServiceResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.DisableServiceResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceRequest.java new file mode 100644 index 0000000..b1c4a11 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceRequest.java @@ -0,0 +1,865 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for EnableService method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.EnableServiceRequest} + */ +public final class EnableServiceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.EnableServiceRequest) + EnableServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnableServiceRequest.newBuilder() to construct. + private EnableServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnableServiceRequest() { + serviceName_ = ""; + consumerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnableServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EnableServiceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + consumerId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_EnableServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_EnableServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.EnableServiceRequest.class, + com.google.api.servicemanagement.v1.EnableServiceRequest.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. Name of the service to enable. Specifying an unknown service name will
+   * cause the request to fail.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the service to enable. Specifying an unknown service name will
+   * cause the request to fail.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONSUMER_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object consumerId_; + /** + * + * + *
+   * Required. The identity of consumer resource which service enablement will be
+   * applied to.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - "project:<project_id>"
+   * Note: this is made compatible with
+   * google.api.servicecontrol.v1.Operation.consumer_id.
+   * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The consumerId. + */ + @java.lang.Override + public java.lang.String getConsumerId() { + java.lang.Object ref = consumerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + consumerId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The identity of consumer resource which service enablement will be
+   * applied to.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - "project:<project_id>"
+   * Note: this is made compatible with
+   * google.api.servicecontrol.v1.Operation.consumer_id.
+   * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for consumerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConsumerIdBytes() { + java.lang.Object ref = consumerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + consumerId_ = 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 (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (!getConsumerIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, consumerId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (!getConsumerIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, consumerId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.EnableServiceRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.EnableServiceRequest other = + (com.google.api.servicemanagement.v1.EnableServiceRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (!getConsumerId().equals(other.getConsumerId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + CONSUMER_ID_FIELD_NUMBER; + hash = (53 * hash) + getConsumerId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.EnableServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for EnableService method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.EnableServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.EnableServiceRequest) + com.google.api.servicemanagement.v1.EnableServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_EnableServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_EnableServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.EnableServiceRequest.class, + com.google.api.servicemanagement.v1.EnableServiceRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.EnableServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + consumerId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_EnableServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.EnableServiceRequest getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.EnableServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.EnableServiceRequest build() { + com.google.api.servicemanagement.v1.EnableServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.EnableServiceRequest buildPartial() { + com.google.api.servicemanagement.v1.EnableServiceRequest result = + new com.google.api.servicemanagement.v1.EnableServiceRequest(this); + result.serviceName_ = serviceName_; + result.consumerId_ = consumerId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.EnableServiceRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.EnableServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.EnableServiceRequest other) { + if (other == com.google.api.servicemanagement.v1.EnableServiceRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (!other.getConsumerId().isEmpty()) { + consumerId_ = other.consumerId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.EnableServiceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.EnableServiceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. Name of the service to enable. Specifying an unknown service name will
+     * cause the request to fail.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the service to enable. Specifying an unknown service name will
+     * cause the request to fail.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the service to enable. Specifying an unknown service name will
+     * cause the request to fail.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the service to enable. Specifying an unknown service name will
+     * cause the request to fail.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the service to enable. Specifying an unknown service name will
+     * cause the request to fail.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object consumerId_ = ""; + /** + * + * + *
+     * Required. The identity of consumer resource which service enablement will be
+     * applied to.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - "project:<project_id>"
+     * Note: this is made compatible with
+     * google.api.servicecontrol.v1.Operation.consumer_id.
+     * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The consumerId. + */ + public java.lang.String getConsumerId() { + java.lang.Object ref = consumerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + consumerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The identity of consumer resource which service enablement will be
+     * applied to.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - "project:<project_id>"
+     * Note: this is made compatible with
+     * google.api.servicecontrol.v1.Operation.consumer_id.
+     * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for consumerId. + */ + public com.google.protobuf.ByteString getConsumerIdBytes() { + java.lang.Object ref = consumerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + consumerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The identity of consumer resource which service enablement will be
+     * applied to.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - "project:<project_id>"
+     * Note: this is made compatible with
+     * google.api.servicecontrol.v1.Operation.consumer_id.
+     * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The consumerId to set. + * @return This builder for chaining. + */ + public Builder setConsumerId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + consumerId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The identity of consumer resource which service enablement will be
+     * applied to.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - "project:<project_id>"
+     * Note: this is made compatible with
+     * google.api.servicecontrol.v1.Operation.consumer_id.
+     * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearConsumerId() { + + consumerId_ = getDefaultInstance().getConsumerId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The identity of consumer resource which service enablement will be
+     * applied to.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - "project:<project_id>"
+     * Note: this is made compatible with
+     * google.api.servicecontrol.v1.Operation.consumer_id.
+     * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for consumerId to set. + * @return This builder for chaining. + */ + public Builder setConsumerIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + consumerId_ = 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.api.servicemanagement.v1.EnableServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.EnableServiceRequest) + private static final com.google.api.servicemanagement.v1.EnableServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.EnableServiceRequest(); + } + + public static com.google.api.servicemanagement.v1.EnableServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnableServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EnableServiceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.EnableServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceRequestOrBuilder.java new file mode 100644 index 0000000..e2d8664 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceRequestOrBuilder.java @@ -0,0 +1,89 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface EnableServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.EnableServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Name of the service to enable. Specifying an unknown service name will
+   * cause the request to fail.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. Name of the service to enable. Specifying an unknown service name will
+   * cause the request to fail.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * Required. The identity of consumer resource which service enablement will be
+   * applied to.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - "project:<project_id>"
+   * Note: this is made compatible with
+   * google.api.servicecontrol.v1.Operation.consumer_id.
+   * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The consumerId. + */ + java.lang.String getConsumerId(); + /** + * + * + *
+   * Required. The identity of consumer resource which service enablement will be
+   * applied to.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - "project:<project_id>"
+   * Note: this is made compatible with
+   * google.api.servicecontrol.v1.Operation.consumer_id.
+   * 
+ * + * string consumer_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for consumerId. + */ + com.google.protobuf.ByteString getConsumerIdBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceResponse.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceResponse.java new file mode 100644 index 0000000..0ac6f24 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceResponse.java @@ -0,0 +1,457 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Operation payload for EnableService method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.EnableServiceResponse} + */ +public final class EnableServiceResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.EnableServiceResponse) + EnableServiceResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use EnableServiceResponse.newBuilder() to construct. + private EnableServiceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EnableServiceResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EnableServiceResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EnableServiceResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_EnableServiceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_EnableServiceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.EnableServiceResponse.class, + com.google.api.servicemanagement.v1.EnableServiceResponse.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.EnableServiceResponse)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.EnableServiceResponse other = + (com.google.api.servicemanagement.v1.EnableServiceResponse) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.EnableServiceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Operation payload for EnableService method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.EnableServiceResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.EnableServiceResponse) + com.google.api.servicemanagement.v1.EnableServiceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_EnableServiceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_EnableServiceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.EnableServiceResponse.class, + com.google.api.servicemanagement.v1.EnableServiceResponse.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.EnableServiceResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_EnableServiceResponse_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.EnableServiceResponse getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.EnableServiceResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.EnableServiceResponse build() { + com.google.api.servicemanagement.v1.EnableServiceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.EnableServiceResponse buildPartial() { + com.google.api.servicemanagement.v1.EnableServiceResponse result = + new com.google.api.servicemanagement.v1.EnableServiceResponse(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.EnableServiceResponse) { + return mergeFrom((com.google.api.servicemanagement.v1.EnableServiceResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.EnableServiceResponse other) { + if (other == com.google.api.servicemanagement.v1.EnableServiceResponse.getDefaultInstance()) + return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.EnableServiceResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.EnableServiceResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.EnableServiceResponse) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.EnableServiceResponse) + private static final com.google.api.servicemanagement.v1.EnableServiceResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.EnableServiceResponse(); + } + + public static com.google.api.servicemanagement.v1.EnableServiceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EnableServiceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EnableServiceResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.EnableServiceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceResponseOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceResponseOrBuilder.java new file mode 100644 index 0000000..b701c23 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/EnableServiceResponseOrBuilder.java @@ -0,0 +1,24 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface EnableServiceResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.EnableServiceResponse) + com.google.protobuf.MessageOrBuilder {} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportRequest.java new file mode 100644 index 0000000..97305dd --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportRequest.java @@ -0,0 +1,1094 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for GenerateConfigReport method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.GenerateConfigReportRequest} + */ +public final class GenerateConfigReportRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.GenerateConfigReportRequest) + GenerateConfigReportRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateConfigReportRequest.newBuilder() to construct. + private GenerateConfigReportRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateConfigReportRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateConfigReportRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GenerateConfigReportRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Any.Builder subBuilder = null; + if (newConfig_ != null) { + subBuilder = newConfig_.toBuilder(); + } + newConfig_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(newConfig_); + newConfig_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Any.Builder subBuilder = null; + if (oldConfig_ != null) { + subBuilder = oldConfig_.toBuilder(); + } + oldConfig_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(oldConfig_); + oldConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GenerateConfigReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GenerateConfigReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.GenerateConfigReportRequest.class, + com.google.api.servicemanagement.v1.GenerateConfigReportRequest.Builder.class); + } + + public static final int NEW_CONFIG_FIELD_NUMBER = 1; + private com.google.protobuf.Any newConfig_; + /** + * + * + *
+   * Required. Service configuration for which we want to generate the report.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the newConfig field is set. + */ + @java.lang.Override + public boolean hasNewConfig() { + return newConfig_ != null; + } + /** + * + * + *
+   * Required. Service configuration for which we want to generate the report.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The newConfig. + */ + @java.lang.Override + public com.google.protobuf.Any getNewConfig() { + return newConfig_ == null ? com.google.protobuf.Any.getDefaultInstance() : newConfig_; + } + /** + * + * + *
+   * Required. Service configuration for which we want to generate the report.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getNewConfigOrBuilder() { + return getNewConfig(); + } + + public static final int OLD_CONFIG_FIELD_NUMBER = 2; + private com.google.protobuf.Any oldConfig_; + /** + * + * + *
+   * Optional. Service configuration against which the comparison will be done.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the oldConfig field is set. + */ + @java.lang.Override + public boolean hasOldConfig() { + return oldConfig_ != null; + } + /** + * + * + *
+   * Optional. Service configuration against which the comparison will be done.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The oldConfig. + */ + @java.lang.Override + public com.google.protobuf.Any getOldConfig() { + return oldConfig_ == null ? com.google.protobuf.Any.getDefaultInstance() : oldConfig_; + } + /** + * + * + *
+   * Optional. Service configuration against which the comparison will be done.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getOldConfigOrBuilder() { + return getOldConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (newConfig_ != null) { + output.writeMessage(1, getNewConfig()); + } + if (oldConfig_ != null) { + output.writeMessage(2, getOldConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (newConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getNewConfig()); + } + if (oldConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getOldConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.GenerateConfigReportRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.GenerateConfigReportRequest other = + (com.google.api.servicemanagement.v1.GenerateConfigReportRequest) obj; + + if (hasNewConfig() != other.hasNewConfig()) return false; + if (hasNewConfig()) { + if (!getNewConfig().equals(other.getNewConfig())) return false; + } + if (hasOldConfig() != other.hasOldConfig()) return false; + if (hasOldConfig()) { + if (!getOldConfig().equals(other.getOldConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasNewConfig()) { + hash = (37 * hash) + NEW_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getNewConfig().hashCode(); + } + if (hasOldConfig()) { + hash = (37 * hash) + OLD_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getOldConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.GenerateConfigReportRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GenerateConfigReport method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.GenerateConfigReportRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.GenerateConfigReportRequest) + com.google.api.servicemanagement.v1.GenerateConfigReportRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GenerateConfigReportRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GenerateConfigReportRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.GenerateConfigReportRequest.class, + com.google.api.servicemanagement.v1.GenerateConfigReportRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.GenerateConfigReportRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (newConfigBuilder_ == null) { + newConfig_ = null; + } else { + newConfig_ = null; + newConfigBuilder_ = null; + } + if (oldConfigBuilder_ == null) { + oldConfig_ = null; + } else { + oldConfig_ = null; + oldConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GenerateConfigReportRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GenerateConfigReportRequest + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.GenerateConfigReportRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GenerateConfigReportRequest build() { + com.google.api.servicemanagement.v1.GenerateConfigReportRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GenerateConfigReportRequest buildPartial() { + com.google.api.servicemanagement.v1.GenerateConfigReportRequest result = + new com.google.api.servicemanagement.v1.GenerateConfigReportRequest(this); + if (newConfigBuilder_ == null) { + result.newConfig_ = newConfig_; + } else { + result.newConfig_ = newConfigBuilder_.build(); + } + if (oldConfigBuilder_ == null) { + result.oldConfig_ = oldConfig_; + } else { + result.oldConfig_ = oldConfigBuilder_.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.api.servicemanagement.v1.GenerateConfigReportRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.GenerateConfigReportRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.api.servicemanagement.v1.GenerateConfigReportRequest other) { + if (other + == com.google.api.servicemanagement.v1.GenerateConfigReportRequest.getDefaultInstance()) + return this; + if (other.hasNewConfig()) { + mergeNewConfig(other.getNewConfig()); + } + if (other.hasOldConfig()) { + mergeOldConfig(other.getOldConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.GenerateConfigReportRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.GenerateConfigReportRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Any newConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + newConfigBuilder_; + /** + * + * + *
+     * Required. Service configuration for which we want to generate the report.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the newConfig field is set. + */ + public boolean hasNewConfig() { + return newConfigBuilder_ != null || newConfig_ != null; + } + /** + * + * + *
+     * Required. Service configuration for which we want to generate the report.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The newConfig. + */ + public com.google.protobuf.Any getNewConfig() { + if (newConfigBuilder_ == null) { + return newConfig_ == null ? com.google.protobuf.Any.getDefaultInstance() : newConfig_; + } else { + return newConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Service configuration for which we want to generate the report.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNewConfig(com.google.protobuf.Any value) { + if (newConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + newConfig_ = value; + onChanged(); + } else { + newConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Service configuration for which we want to generate the report.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder setNewConfig(com.google.protobuf.Any.Builder builderForValue) { + if (newConfigBuilder_ == null) { + newConfig_ = builderForValue.build(); + onChanged(); + } else { + newConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Service configuration for which we want to generate the report.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder mergeNewConfig(com.google.protobuf.Any value) { + if (newConfigBuilder_ == null) { + if (newConfig_ != null) { + newConfig_ = + com.google.protobuf.Any.newBuilder(newConfig_).mergeFrom(value).buildPartial(); + } else { + newConfig_ = value; + } + onChanged(); + } else { + newConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Service configuration for which we want to generate the report.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public Builder clearNewConfig() { + if (newConfigBuilder_ == null) { + newConfig_ = null; + onChanged(); + } else { + newConfig_ = null; + newConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Service configuration for which we want to generate the report.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.Any.Builder getNewConfigBuilder() { + + onChanged(); + return getNewConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Service configuration for which we want to generate the report.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + public com.google.protobuf.AnyOrBuilder getNewConfigOrBuilder() { + if (newConfigBuilder_ != null) { + return newConfigBuilder_.getMessageOrBuilder(); + } else { + return newConfig_ == null ? com.google.protobuf.Any.getDefaultInstance() : newConfig_; + } + } + /** + * + * + *
+     * Required. Service configuration for which we want to generate the report.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + getNewConfigFieldBuilder() { + if (newConfigBuilder_ == null) { + newConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder>( + getNewConfig(), getParentForChildren(), isClean()); + newConfig_ = null; + } + return newConfigBuilder_; + } + + private com.google.protobuf.Any oldConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + oldConfigBuilder_; + /** + * + * + *
+     * Optional. Service configuration against which the comparison will be done.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the oldConfig field is set. + */ + public boolean hasOldConfig() { + return oldConfigBuilder_ != null || oldConfig_ != null; + } + /** + * + * + *
+     * Optional. Service configuration against which the comparison will be done.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The oldConfig. + */ + public com.google.protobuf.Any getOldConfig() { + if (oldConfigBuilder_ == null) { + return oldConfig_ == null ? com.google.protobuf.Any.getDefaultInstance() : oldConfig_; + } else { + return oldConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Service configuration against which the comparison will be done.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setOldConfig(com.google.protobuf.Any value) { + if (oldConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + oldConfig_ = value; + onChanged(); + } else { + oldConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Service configuration against which the comparison will be done.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder setOldConfig(com.google.protobuf.Any.Builder builderForValue) { + if (oldConfigBuilder_ == null) { + oldConfig_ = builderForValue.build(); + onChanged(); + } else { + oldConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Service configuration against which the comparison will be done.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder mergeOldConfig(com.google.protobuf.Any value) { + if (oldConfigBuilder_ == null) { + if (oldConfig_ != null) { + oldConfig_ = + com.google.protobuf.Any.newBuilder(oldConfig_).mergeFrom(value).buildPartial(); + } else { + oldConfig_ = value; + } + onChanged(); + } else { + oldConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Service configuration against which the comparison will be done.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public Builder clearOldConfig() { + if (oldConfigBuilder_ == null) { + oldConfig_ = null; + onChanged(); + } else { + oldConfig_ = null; + oldConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Service configuration against which the comparison will be done.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.Any.Builder getOldConfigBuilder() { + + onChanged(); + return getOldConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Service configuration against which the comparison will be done.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + public com.google.protobuf.AnyOrBuilder getOldConfigOrBuilder() { + if (oldConfigBuilder_ != null) { + return oldConfigBuilder_.getMessageOrBuilder(); + } else { + return oldConfig_ == null ? com.google.protobuf.Any.getDefaultInstance() : oldConfig_; + } + } + /** + * + * + *
+     * Optional. Service configuration against which the comparison will be done.
+     * For this version of API, the supported types are
+     * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+     * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+     * and [google.api.Service][google.api.Service]
+     * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + getOldConfigFieldBuilder() { + if (oldConfigBuilder_ == null) { + oldConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder>( + getOldConfig(), getParentForChildren(), isClean()); + oldConfig_ = null; + } + return oldConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.GenerateConfigReportRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.GenerateConfigReportRequest) + private static final com.google.api.servicemanagement.v1.GenerateConfigReportRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.GenerateConfigReportRequest(); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateConfigReportRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenerateConfigReportRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GenerateConfigReportRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportRequestOrBuilder.java new file mode 100644 index 0000000..5f9b2ca --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportRequestOrBuilder.java @@ -0,0 +1,119 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface GenerateConfigReportRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.GenerateConfigReportRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Service configuration for which we want to generate the report.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return Whether the newConfig field is set. + */ + boolean hasNewConfig(); + /** + * + * + *
+   * Required. Service configuration for which we want to generate the report.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The newConfig. + */ + com.google.protobuf.Any getNewConfig(); + /** + * + * + *
+   * Required. Service configuration for which we want to generate the report.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any new_config = 1 [(.google.api.field_behavior) = REQUIRED]; + */ + com.google.protobuf.AnyOrBuilder getNewConfigOrBuilder(); + + /** + * + * + *
+   * Optional. Service configuration against which the comparison will be done.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return Whether the oldConfig field is set. + */ + boolean hasOldConfig(); + /** + * + * + *
+   * Optional. Service configuration against which the comparison will be done.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The oldConfig. + */ + com.google.protobuf.Any getOldConfig(); + /** + * + * + *
+   * Optional. Service configuration against which the comparison will be done.
+   * For this version of API, the supported types are
+   * [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef],
+   * [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource],
+   * and [google.api.Service][google.api.Service]
+   * 
+ * + * .google.protobuf.Any old_config = 2 [(.google.api.field_behavior) = OPTIONAL]; + */ + com.google.protobuf.AnyOrBuilder getOldConfigOrBuilder(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportResponse.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportResponse.java new file mode 100644 index 0000000..e79fa4b --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportResponse.java @@ -0,0 +1,1890 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Response message for GenerateConfigReport method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.GenerateConfigReportResponse} + */ +public final class GenerateConfigReportResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.GenerateConfigReportResponse) + GenerateConfigReportResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use GenerateConfigReportResponse.newBuilder() to construct. + private GenerateConfigReportResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GenerateConfigReportResponse() { + serviceName_ = ""; + id_ = ""; + changeReports_ = java.util.Collections.emptyList(); + diagnostics_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GenerateConfigReportResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GenerateConfigReportResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + id_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + changeReports_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + changeReports_.add( + input.readMessage( + com.google.api.servicemanagement.v1.ChangeReport.parser(), + extensionRegistry)); + break; + } + case 34: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + diagnostics_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + diagnostics_.add( + input.readMessage( + com.google.api.servicemanagement.v1.Diagnostic.parser(), extensionRegistry)); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + changeReports_ = java.util.Collections.unmodifiableList(changeReports_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + diagnostics_ = java.util.Collections.unmodifiableList(diagnostics_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GenerateConfigReportResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GenerateConfigReportResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.GenerateConfigReportResponse.class, + com.google.api.servicemanagement.v1.GenerateConfigReportResponse.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Name of the service this report belongs to.
+   * 
+ * + * string service_name = 1; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the service this report belongs to.
+   * 
+ * + * string service_name = 1; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ID_FIELD_NUMBER = 2; + private volatile java.lang.Object id_; + /** + * + * + *
+   * ID of the service configuration this report belongs to.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + @java.lang.Override + public java.lang.String getId() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } + } + /** + * + * + *
+   * ID of the service configuration this report belongs to.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + @java.lang.Override + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHANGE_REPORTS_FIELD_NUMBER = 3; + private java.util.List changeReports_; + /** + * + * + *
+   * list of ChangeReport, each corresponding to comparison between two
+   * service configurations.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + @java.lang.Override + public java.util.List getChangeReportsList() { + return changeReports_; + } + /** + * + * + *
+   * list of ChangeReport, each corresponding to comparison between two
+   * service configurations.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + @java.lang.Override + public java.util.List + getChangeReportsOrBuilderList() { + return changeReports_; + } + /** + * + * + *
+   * list of ChangeReport, each corresponding to comparison between two
+   * service configurations.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + @java.lang.Override + public int getChangeReportsCount() { + return changeReports_.size(); + } + /** + * + * + *
+   * list of ChangeReport, each corresponding to comparison between two
+   * service configurations.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ChangeReport getChangeReports(int index) { + return changeReports_.get(index); + } + /** + * + * + *
+   * list of ChangeReport, each corresponding to comparison between two
+   * service configurations.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ChangeReportOrBuilder getChangeReportsOrBuilder( + int index) { + return changeReports_.get(index); + } + + public static final int DIAGNOSTICS_FIELD_NUMBER = 4; + private java.util.List diagnostics_; + /** + * + * + *
+   * Errors / Linter warnings associated with the service definition this
+   * report
+   * belongs to.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + @java.lang.Override + public java.util.List getDiagnosticsList() { + return diagnostics_; + } + /** + * + * + *
+   * Errors / Linter warnings associated with the service definition this
+   * report
+   * belongs to.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + @java.lang.Override + public java.util.List + getDiagnosticsOrBuilderList() { + return diagnostics_; + } + /** + * + * + *
+   * Errors / Linter warnings associated with the service definition this
+   * report
+   * belongs to.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + @java.lang.Override + public int getDiagnosticsCount() { + return diagnostics_.size(); + } + /** + * + * + *
+   * Errors / Linter warnings associated with the service definition this
+   * report
+   * belongs to.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Diagnostic getDiagnostics(int index) { + return diagnostics_.get(index); + } + /** + * + * + *
+   * Errors / Linter warnings associated with the service definition this
+   * report
+   * belongs to.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.DiagnosticOrBuilder getDiagnosticsOrBuilder( + int index) { + return diagnostics_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (!getIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_); + } + for (int i = 0; i < changeReports_.size(); i++) { + output.writeMessage(3, changeReports_.get(i)); + } + for (int i = 0; i < diagnostics_.size(); i++) { + output.writeMessage(4, diagnostics_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (!getIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_); + } + for (int i = 0; i < changeReports_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, changeReports_.get(i)); + } + for (int i = 0; i < diagnostics_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, diagnostics_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.GenerateConfigReportResponse)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.GenerateConfigReportResponse other = + (com.google.api.servicemanagement.v1.GenerateConfigReportResponse) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (!getId().equals(other.getId())) return false; + if (!getChangeReportsList().equals(other.getChangeReportsList())) return false; + if (!getDiagnosticsList().equals(other.getDiagnosticsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + ID_FIELD_NUMBER; + hash = (53 * hash) + getId().hashCode(); + if (getChangeReportsCount() > 0) { + hash = (37 * hash) + CHANGE_REPORTS_FIELD_NUMBER; + hash = (53 * hash) + getChangeReportsList().hashCode(); + } + if (getDiagnosticsCount() > 0) { + hash = (37 * hash) + DIAGNOSTICS_FIELD_NUMBER; + hash = (53 * hash) + getDiagnosticsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.GenerateConfigReportResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for GenerateConfigReport method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.GenerateConfigReportResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.GenerateConfigReportResponse) + com.google.api.servicemanagement.v1.GenerateConfigReportResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GenerateConfigReportResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GenerateConfigReportResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.GenerateConfigReportResponse.class, + com.google.api.servicemanagement.v1.GenerateConfigReportResponse.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.GenerateConfigReportResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getChangeReportsFieldBuilder(); + getDiagnosticsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + id_ = ""; + + if (changeReportsBuilder_ == null) { + changeReports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + changeReportsBuilder_.clear(); + } + if (diagnosticsBuilder_ == null) { + diagnostics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + diagnosticsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GenerateConfigReportResponse_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GenerateConfigReportResponse + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.GenerateConfigReportResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GenerateConfigReportResponse build() { + com.google.api.servicemanagement.v1.GenerateConfigReportResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GenerateConfigReportResponse buildPartial() { + com.google.api.servicemanagement.v1.GenerateConfigReportResponse result = + new com.google.api.servicemanagement.v1.GenerateConfigReportResponse(this); + int from_bitField0_ = bitField0_; + result.serviceName_ = serviceName_; + result.id_ = id_; + if (changeReportsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + changeReports_ = java.util.Collections.unmodifiableList(changeReports_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.changeReports_ = changeReports_; + } else { + result.changeReports_ = changeReportsBuilder_.build(); + } + if (diagnosticsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + diagnostics_ = java.util.Collections.unmodifiableList(diagnostics_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.diagnostics_ = diagnostics_; + } else { + result.diagnostics_ = diagnosticsBuilder_.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.api.servicemanagement.v1.GenerateConfigReportResponse) { + return mergeFrom((com.google.api.servicemanagement.v1.GenerateConfigReportResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.api.servicemanagement.v1.GenerateConfigReportResponse other) { + if (other + == com.google.api.servicemanagement.v1.GenerateConfigReportResponse.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (!other.getId().isEmpty()) { + id_ = other.id_; + onChanged(); + } + if (changeReportsBuilder_ == null) { + if (!other.changeReports_.isEmpty()) { + if (changeReports_.isEmpty()) { + changeReports_ = other.changeReports_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChangeReportsIsMutable(); + changeReports_.addAll(other.changeReports_); + } + onChanged(); + } + } else { + if (!other.changeReports_.isEmpty()) { + if (changeReportsBuilder_.isEmpty()) { + changeReportsBuilder_.dispose(); + changeReportsBuilder_ = null; + changeReports_ = other.changeReports_; + bitField0_ = (bitField0_ & ~0x00000001); + changeReportsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChangeReportsFieldBuilder() + : null; + } else { + changeReportsBuilder_.addAllMessages(other.changeReports_); + } + } + } + if (diagnosticsBuilder_ == null) { + if (!other.diagnostics_.isEmpty()) { + if (diagnostics_.isEmpty()) { + diagnostics_ = other.diagnostics_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureDiagnosticsIsMutable(); + diagnostics_.addAll(other.diagnostics_); + } + onChanged(); + } + } else { + if (!other.diagnostics_.isEmpty()) { + if (diagnosticsBuilder_.isEmpty()) { + diagnosticsBuilder_.dispose(); + diagnosticsBuilder_ = null; + diagnostics_ = other.diagnostics_; + bitField0_ = (bitField0_ & ~0x00000002); + diagnosticsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getDiagnosticsFieldBuilder() + : null; + } else { + diagnosticsBuilder_.addAllMessages(other.diagnostics_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.GenerateConfigReportResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.GenerateConfigReportResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Name of the service this report belongs to.
+     * 
+ * + * string service_name = 1; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the service this report belongs to.
+     * 
+ * + * string service_name = 1; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the service this report belongs to.
+     * 
+ * + * string service_name = 1; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the service this report belongs to.
+     * 
+ * + * string service_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the service this report belongs to.
+     * 
+ * + * string service_name = 1; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object id_ = ""; + /** + * + * + *
+     * ID of the service configuration this report belongs to.
+     * 
+ * + * string id = 2; + * + * @return The id. + */ + public java.lang.String getId() { + java.lang.Object ref = id_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + id_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * ID of the service configuration this report belongs to.
+     * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + public com.google.protobuf.ByteString getIdBytes() { + java.lang.Object ref = id_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + id_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * ID of the service configuration this report belongs to.
+     * 
+ * + * string id = 2; + * + * @param value The id to set. + * @return This builder for chaining. + */ + public Builder setId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + id_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the service configuration this report belongs to.
+     * 
+ * + * string id = 2; + * + * @return This builder for chaining. + */ + public Builder clearId() { + + id_ = getDefaultInstance().getId(); + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the service configuration this report belongs to.
+     * 
+ * + * string id = 2; + * + * @param value The bytes for id to set. + * @return This builder for chaining. + */ + public Builder setIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + id_ = value; + onChanged(); + return this; + } + + private java.util.List changeReports_ = + java.util.Collections.emptyList(); + + private void ensureChangeReportsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + changeReports_ = + new java.util.ArrayList( + changeReports_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.ChangeReport, + com.google.api.servicemanagement.v1.ChangeReport.Builder, + com.google.api.servicemanagement.v1.ChangeReportOrBuilder> + changeReportsBuilder_; + + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public java.util.List getChangeReportsList() { + if (changeReportsBuilder_ == null) { + return java.util.Collections.unmodifiableList(changeReports_); + } else { + return changeReportsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public int getChangeReportsCount() { + if (changeReportsBuilder_ == null) { + return changeReports_.size(); + } else { + return changeReportsBuilder_.getCount(); + } + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public com.google.api.servicemanagement.v1.ChangeReport getChangeReports(int index) { + if (changeReportsBuilder_ == null) { + return changeReports_.get(index); + } else { + return changeReportsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public Builder setChangeReports( + int index, com.google.api.servicemanagement.v1.ChangeReport value) { + if (changeReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeReportsIsMutable(); + changeReports_.set(index, value); + onChanged(); + } else { + changeReportsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public Builder setChangeReports( + int index, com.google.api.servicemanagement.v1.ChangeReport.Builder builderForValue) { + if (changeReportsBuilder_ == null) { + ensureChangeReportsIsMutable(); + changeReports_.set(index, builderForValue.build()); + onChanged(); + } else { + changeReportsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public Builder addChangeReports(com.google.api.servicemanagement.v1.ChangeReport value) { + if (changeReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeReportsIsMutable(); + changeReports_.add(value); + onChanged(); + } else { + changeReportsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public Builder addChangeReports( + int index, com.google.api.servicemanagement.v1.ChangeReport value) { + if (changeReportsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChangeReportsIsMutable(); + changeReports_.add(index, value); + onChanged(); + } else { + changeReportsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public Builder addChangeReports( + com.google.api.servicemanagement.v1.ChangeReport.Builder builderForValue) { + if (changeReportsBuilder_ == null) { + ensureChangeReportsIsMutable(); + changeReports_.add(builderForValue.build()); + onChanged(); + } else { + changeReportsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public Builder addChangeReports( + int index, com.google.api.servicemanagement.v1.ChangeReport.Builder builderForValue) { + if (changeReportsBuilder_ == null) { + ensureChangeReportsIsMutable(); + changeReports_.add(index, builderForValue.build()); + onChanged(); + } else { + changeReportsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public Builder addAllChangeReports( + java.lang.Iterable values) { + if (changeReportsBuilder_ == null) { + ensureChangeReportsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, changeReports_); + onChanged(); + } else { + changeReportsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public Builder clearChangeReports() { + if (changeReportsBuilder_ == null) { + changeReports_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + changeReportsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public Builder removeChangeReports(int index) { + if (changeReportsBuilder_ == null) { + ensureChangeReportsIsMutable(); + changeReports_.remove(index); + onChanged(); + } else { + changeReportsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public com.google.api.servicemanagement.v1.ChangeReport.Builder getChangeReportsBuilder( + int index) { + return getChangeReportsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public com.google.api.servicemanagement.v1.ChangeReportOrBuilder getChangeReportsOrBuilder( + int index) { + if (changeReportsBuilder_ == null) { + return changeReports_.get(index); + } else { + return changeReportsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public java.util.List + getChangeReportsOrBuilderList() { + if (changeReportsBuilder_ != null) { + return changeReportsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(changeReports_); + } + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public com.google.api.servicemanagement.v1.ChangeReport.Builder addChangeReportsBuilder() { + return getChangeReportsFieldBuilder() + .addBuilder(com.google.api.servicemanagement.v1.ChangeReport.getDefaultInstance()); + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public com.google.api.servicemanagement.v1.ChangeReport.Builder addChangeReportsBuilder( + int index) { + return getChangeReportsFieldBuilder() + .addBuilder(index, com.google.api.servicemanagement.v1.ChangeReport.getDefaultInstance()); + } + /** + * + * + *
+     * list of ChangeReport, each corresponding to comparison between two
+     * service configurations.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + public java.util.List + getChangeReportsBuilderList() { + return getChangeReportsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.ChangeReport, + com.google.api.servicemanagement.v1.ChangeReport.Builder, + com.google.api.servicemanagement.v1.ChangeReportOrBuilder> + getChangeReportsFieldBuilder() { + if (changeReportsBuilder_ == null) { + changeReportsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.ChangeReport, + com.google.api.servicemanagement.v1.ChangeReport.Builder, + com.google.api.servicemanagement.v1.ChangeReportOrBuilder>( + changeReports_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + changeReports_ = null; + } + return changeReportsBuilder_; + } + + private java.util.List diagnostics_ = + java.util.Collections.emptyList(); + + private void ensureDiagnosticsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + diagnostics_ = + new java.util.ArrayList(diagnostics_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.Diagnostic, + com.google.api.servicemanagement.v1.Diagnostic.Builder, + com.google.api.servicemanagement.v1.DiagnosticOrBuilder> + diagnosticsBuilder_; + + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public java.util.List getDiagnosticsList() { + if (diagnosticsBuilder_ == null) { + return java.util.Collections.unmodifiableList(diagnostics_); + } else { + return diagnosticsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public int getDiagnosticsCount() { + if (diagnosticsBuilder_ == null) { + return diagnostics_.size(); + } else { + return diagnosticsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public com.google.api.servicemanagement.v1.Diagnostic getDiagnostics(int index) { + if (diagnosticsBuilder_ == null) { + return diagnostics_.get(index); + } else { + return diagnosticsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public Builder setDiagnostics(int index, com.google.api.servicemanagement.v1.Diagnostic value) { + if (diagnosticsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiagnosticsIsMutable(); + diagnostics_.set(index, value); + onChanged(); + } else { + diagnosticsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public Builder setDiagnostics( + int index, com.google.api.servicemanagement.v1.Diagnostic.Builder builderForValue) { + if (diagnosticsBuilder_ == null) { + ensureDiagnosticsIsMutable(); + diagnostics_.set(index, builderForValue.build()); + onChanged(); + } else { + diagnosticsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public Builder addDiagnostics(com.google.api.servicemanagement.v1.Diagnostic value) { + if (diagnosticsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiagnosticsIsMutable(); + diagnostics_.add(value); + onChanged(); + } else { + diagnosticsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public Builder addDiagnostics(int index, com.google.api.servicemanagement.v1.Diagnostic value) { + if (diagnosticsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureDiagnosticsIsMutable(); + diagnostics_.add(index, value); + onChanged(); + } else { + diagnosticsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public Builder addDiagnostics( + com.google.api.servicemanagement.v1.Diagnostic.Builder builderForValue) { + if (diagnosticsBuilder_ == null) { + ensureDiagnosticsIsMutable(); + diagnostics_.add(builderForValue.build()); + onChanged(); + } else { + diagnosticsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public Builder addDiagnostics( + int index, com.google.api.servicemanagement.v1.Diagnostic.Builder builderForValue) { + if (diagnosticsBuilder_ == null) { + ensureDiagnosticsIsMutable(); + diagnostics_.add(index, builderForValue.build()); + onChanged(); + } else { + diagnosticsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public Builder addAllDiagnostics( + java.lang.Iterable values) { + if (diagnosticsBuilder_ == null) { + ensureDiagnosticsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, diagnostics_); + onChanged(); + } else { + diagnosticsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public Builder clearDiagnostics() { + if (diagnosticsBuilder_ == null) { + diagnostics_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + diagnosticsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public Builder removeDiagnostics(int index) { + if (diagnosticsBuilder_ == null) { + ensureDiagnosticsIsMutable(); + diagnostics_.remove(index); + onChanged(); + } else { + diagnosticsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public com.google.api.servicemanagement.v1.Diagnostic.Builder getDiagnosticsBuilder(int index) { + return getDiagnosticsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public com.google.api.servicemanagement.v1.DiagnosticOrBuilder getDiagnosticsOrBuilder( + int index) { + if (diagnosticsBuilder_ == null) { + return diagnostics_.get(index); + } else { + return diagnosticsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public java.util.List + getDiagnosticsOrBuilderList() { + if (diagnosticsBuilder_ != null) { + return diagnosticsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(diagnostics_); + } + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public com.google.api.servicemanagement.v1.Diagnostic.Builder addDiagnosticsBuilder() { + return getDiagnosticsFieldBuilder() + .addBuilder(com.google.api.servicemanagement.v1.Diagnostic.getDefaultInstance()); + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public com.google.api.servicemanagement.v1.Diagnostic.Builder addDiagnosticsBuilder(int index) { + return getDiagnosticsFieldBuilder() + .addBuilder(index, com.google.api.servicemanagement.v1.Diagnostic.getDefaultInstance()); + } + /** + * + * + *
+     * Errors / Linter warnings associated with the service definition this
+     * report
+     * belongs to.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + public java.util.List + getDiagnosticsBuilderList() { + return getDiagnosticsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.Diagnostic, + com.google.api.servicemanagement.v1.Diagnostic.Builder, + com.google.api.servicemanagement.v1.DiagnosticOrBuilder> + getDiagnosticsFieldBuilder() { + if (diagnosticsBuilder_ == null) { + diagnosticsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.Diagnostic, + com.google.api.servicemanagement.v1.Diagnostic.Builder, + com.google.api.servicemanagement.v1.DiagnosticOrBuilder>( + diagnostics_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + diagnostics_ = null; + } + return diagnosticsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.GenerateConfigReportResponse) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.GenerateConfigReportResponse) + private static final com.google.api.servicemanagement.v1.GenerateConfigReportResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.GenerateConfigReportResponse(); + } + + public static com.google.api.servicemanagement.v1.GenerateConfigReportResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GenerateConfigReportResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GenerateConfigReportResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GenerateConfigReportResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportResponseOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportResponseOrBuilder.java new file mode 100644 index 0000000..5772a3e --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GenerateConfigReportResponseOrBuilder.java @@ -0,0 +1,194 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface GenerateConfigReportResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.GenerateConfigReportResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the service this report belongs to.
+   * 
+ * + * string service_name = 1; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Name of the service this report belongs to.
+   * 
+ * + * string service_name = 1; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * ID of the service configuration this report belongs to.
+   * 
+ * + * string id = 2; + * + * @return The id. + */ + java.lang.String getId(); + /** + * + * + *
+   * ID of the service configuration this report belongs to.
+   * 
+ * + * string id = 2; + * + * @return The bytes for id. + */ + com.google.protobuf.ByteString getIdBytes(); + + /** + * + * + *
+   * list of ChangeReport, each corresponding to comparison between two
+   * service configurations.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + java.util.List getChangeReportsList(); + /** + * + * + *
+   * list of ChangeReport, each corresponding to comparison between two
+   * service configurations.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + com.google.api.servicemanagement.v1.ChangeReport getChangeReports(int index); + /** + * + * + *
+   * list of ChangeReport, each corresponding to comparison between two
+   * service configurations.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + int getChangeReportsCount(); + /** + * + * + *
+   * list of ChangeReport, each corresponding to comparison between two
+   * service configurations.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + java.util.List + getChangeReportsOrBuilderList(); + /** + * + * + *
+   * list of ChangeReport, each corresponding to comparison between two
+   * service configurations.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ChangeReport change_reports = 3; + */ + com.google.api.servicemanagement.v1.ChangeReportOrBuilder getChangeReportsOrBuilder(int index); + + /** + * + * + *
+   * Errors / Linter warnings associated with the service definition this
+   * report
+   * belongs to.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + java.util.List getDiagnosticsList(); + /** + * + * + *
+   * Errors / Linter warnings associated with the service definition this
+   * report
+   * belongs to.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + com.google.api.servicemanagement.v1.Diagnostic getDiagnostics(int index); + /** + * + * + *
+   * Errors / Linter warnings associated with the service definition this
+   * report
+   * belongs to.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + int getDiagnosticsCount(); + /** + * + * + *
+   * Errors / Linter warnings associated with the service definition this
+   * report
+   * belongs to.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + java.util.List + getDiagnosticsOrBuilderList(); + /** + * + * + *
+   * Errors / Linter warnings associated with the service definition this
+   * report
+   * belongs to.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Diagnostic diagnostics = 4; + */ + com.google.api.servicemanagement.v1.DiagnosticOrBuilder getDiagnosticsOrBuilder(int index); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceConfigRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceConfigRequest.java new file mode 100644 index 0000000..41233e3 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceConfigRequest.java @@ -0,0 +1,1138 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for GetServiceConfig method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.GetServiceConfigRequest} + */ +public final class GetServiceConfigRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.GetServiceConfigRequest) + GetServiceConfigRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetServiceConfigRequest.newBuilder() to construct. + private GetServiceConfigRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetServiceConfigRequest() { + serviceName_ = ""; + configId_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetServiceConfigRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetServiceConfigRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + configId_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + view_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.GetServiceConfigRequest.class, + com.google.api.servicemanagement.v1.GetServiceConfigRequest.Builder.class); + } + + /** Protobuf enum {@code google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView} */ + public enum ConfigView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Server response includes all fields except SourceInfo.
+     * 
+ * + * BASIC = 0; + */ + BASIC(0), + /** + * + * + *
+     * Server response includes all fields including SourceInfo.
+     * SourceFiles are of type 'google.api.servicemanagement.v1.ConfigFile'
+     * and are only available for configs created using the
+     * SubmitConfigSource method.
+     * 
+ * + * FULL = 1; + */ + FULL(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Server response includes all fields except SourceInfo.
+     * 
+ * + * BASIC = 0; + */ + public static final int BASIC_VALUE = 0; + /** + * + * + *
+     * Server response includes all fields including SourceInfo.
+     * SourceFiles are of type 'google.api.servicemanagement.v1.ConfigFile'
+     * and are only available for configs created using the
+     * SubmitConfigSource method.
+     * 
+ * + * FULL = 1; + */ + public static final int FULL_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 ConfigView 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 ConfigView forNumber(int value) { + switch (value) { + case 0: + return BASIC; + case 1: + return FULL; + default: + return null; + } + } + + public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() { + return internalValueMap; + } + + private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap = + new com.google.protobuf.Internal.EnumLiteMap() { + public ConfigView findValueByNumber(int number) { + return ConfigView.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.api.servicemanagement.v1.GetServiceConfigRequest.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ConfigView[] VALUES = values(); + + public static ConfigView 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 ConfigView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView) + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object configId_; + /** + * + * + *
+   * Required. The id of the service configuration resource.
+   * This field must be specified for the server to return all fields, including
+   * `SourceInfo`.
+   * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The configId. + */ + @java.lang.Override + public java.lang.String getConfigId() { + java.lang.Object ref = configId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + configId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The id of the service configuration resource.
+   * This field must be specified for the server to return all fields, including
+   * `SourceInfo`.
+   * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for configId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getConfigIdBytes() { + java.lang.Object ref = configId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + configId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 3; + private int view_; + /** + * + * + *
+   * Specifies which parts of the Service Config should be returned in the
+   * response.
+   * 
+ * + * .google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView view = 3; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Specifies which parts of the Service Config should be returned in the
+   * response.
+   * 
+ * + * .google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView view = 3; + * + * @return The view. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView getView() { + @SuppressWarnings("deprecation") + com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView result = + com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView.valueOf(view_); + return result == null + ? com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (!getConfigIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, configId_); + } + if (view_ + != com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView.BASIC + .getNumber()) { + output.writeEnum(3, view_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (!getConfigIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, configId_); + } + if (view_ + != com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView.BASIC + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, view_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.GetServiceConfigRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.GetServiceConfigRequest other = + (com.google.api.servicemanagement.v1.GetServiceConfigRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (!getConfigId().equals(other.getConfigId())) return false; + if (view_ != other.view_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + CONFIG_ID_FIELD_NUMBER; + hash = (53 * hash) + getConfigId().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.GetServiceConfigRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetServiceConfig method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.GetServiceConfigRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.GetServiceConfigRequest) + com.google.api.servicemanagement.v1.GetServiceConfigRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceConfigRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceConfigRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.GetServiceConfigRequest.class, + com.google.api.servicemanagement.v1.GetServiceConfigRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.GetServiceConfigRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + configId_ = ""; + + view_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceConfigRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceConfigRequest getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.GetServiceConfigRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceConfigRequest build() { + com.google.api.servicemanagement.v1.GetServiceConfigRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceConfigRequest buildPartial() { + com.google.api.servicemanagement.v1.GetServiceConfigRequest result = + new com.google.api.servicemanagement.v1.GetServiceConfigRequest(this); + result.serviceName_ = serviceName_; + result.configId_ = configId_; + result.view_ = view_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.GetServiceConfigRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.GetServiceConfigRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.GetServiceConfigRequest other) { + if (other == com.google.api.servicemanagement.v1.GetServiceConfigRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (!other.getConfigId().isEmpty()) { + configId_ = other.configId_; + onChanged(); + } + if (other.view_ != 0) { + setViewValue(other.getViewValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.GetServiceConfigRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.GetServiceConfigRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object configId_ = ""; + /** + * + * + *
+     * Required. The id of the service configuration resource.
+     * This field must be specified for the server to return all fields, including
+     * `SourceInfo`.
+     * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The configId. + */ + public java.lang.String getConfigId() { + java.lang.Object ref = configId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + configId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The id of the service configuration resource.
+     * This field must be specified for the server to return all fields, including
+     * `SourceInfo`.
+     * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for configId. + */ + public com.google.protobuf.ByteString getConfigIdBytes() { + java.lang.Object ref = configId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + configId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The id of the service configuration resource.
+     * This field must be specified for the server to return all fields, including
+     * `SourceInfo`.
+     * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The configId to set. + * @return This builder for chaining. + */ + public Builder setConfigId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + configId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the service configuration resource.
+     * This field must be specified for the server to return all fields, including
+     * `SourceInfo`.
+     * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearConfigId() { + + configId_ = getDefaultInstance().getConfigId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the service configuration resource.
+     * This field must be specified for the server to return all fields, including
+     * `SourceInfo`.
+     * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for configId to set. + * @return This builder for chaining. + */ + public Builder setConfigIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + configId_ = value; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Specifies which parts of the Service Config should be returned in the
+     * response.
+     * 
+ * + * .google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView view = 3; + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Specifies which parts of the Service Config should be returned in the
+     * response.
+     * 
+ * + * .google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView view = 3; + * + * @param value The enum numeric value on the wire for view to set. + * @return This builder for chaining. + */ + public Builder setViewValue(int value) { + + view_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies which parts of the Service Config should be returned in the
+     * response.
+     * 
+ * + * .google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView view = 3; + * + * @return The view. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView getView() { + @SuppressWarnings("deprecation") + com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView result = + com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView.valueOf(view_); + return result == null + ? com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Specifies which parts of the Service Config should be returned in the
+     * response.
+     * 
+ * + * .google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView view = 3; + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView( + com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies which parts of the Service Config should be returned in the
+     * response.
+     * 
+ * + * .google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView view = 3; + * + * @return This builder for chaining. + */ + public Builder clearView() { + + view_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.GetServiceConfigRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.GetServiceConfigRequest) + private static final com.google.api.servicemanagement.v1.GetServiceConfigRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.GetServiceConfigRequest(); + } + + public static com.google.api.servicemanagement.v1.GetServiceConfigRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetServiceConfigRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetServiceConfigRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceConfigRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceConfigRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceConfigRequestOrBuilder.java new file mode 100644 index 0000000..4a89592 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceConfigRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface GetServiceConfigRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.GetServiceConfigRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * Required. The id of the service configuration resource.
+   * This field must be specified for the server to return all fields, including
+   * `SourceInfo`.
+   * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The configId. + */ + java.lang.String getConfigId(); + /** + * + * + *
+   * Required. The id of the service configuration resource.
+   * This field must be specified for the server to return all fields, including
+   * `SourceInfo`.
+   * 
+ * + * string config_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for configId. + */ + com.google.protobuf.ByteString getConfigIdBytes(); + + /** + * + * + *
+   * Specifies which parts of the Service Config should be returned in the
+   * response.
+   * 
+ * + * .google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView view = 3; + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Specifies which parts of the Service Config should be returned in the
+   * response.
+   * 
+ * + * .google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView view = 3; + * + * @return The view. + */ + com.google.api.servicemanagement.v1.GetServiceConfigRequest.ConfigView getView(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRequest.java new file mode 100644 index 0000000..6a81a88 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRequest.java @@ -0,0 +1,644 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for `GetService` method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.GetServiceRequest} + */ +public final class GetServiceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.GetServiceRequest) + GetServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetServiceRequest.newBuilder() to construct. + private GetServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetServiceRequest() { + serviceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetServiceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.GetServiceRequest.class, + com.google.api.servicemanagement.v1.GetServiceRequest.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. The name of the service.  See the `ServiceManager` overview for naming
+   * requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the service.  See the `ServiceManager` overview for naming
+   * requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = 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 (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.GetServiceRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.GetServiceRequest other = + (com.google.api.servicemanagement.v1.GetServiceRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.GetServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for `GetService` method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.GetServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.GetServiceRequest) + com.google.api.servicemanagement.v1.GetServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.GetServiceRequest.class, + com.google.api.servicemanagement.v1.GetServiceRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.GetServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceRequest getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.GetServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceRequest build() { + com.google.api.servicemanagement.v1.GetServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceRequest buildPartial() { + com.google.api.servicemanagement.v1.GetServiceRequest result = + new com.google.api.servicemanagement.v1.GetServiceRequest(this); + result.serviceName_ = serviceName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.GetServiceRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.GetServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.GetServiceRequest other) { + if (other == com.google.api.servicemanagement.v1.GetServiceRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.GetServiceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.GetServiceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. The name of the service.  See the `ServiceManager` overview for naming
+     * requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the `ServiceManager` overview for naming
+     * requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the `ServiceManager` overview for naming
+     * requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the `ServiceManager` overview for naming
+     * requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the `ServiceManager` overview for naming
+     * requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = 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.api.servicemanagement.v1.GetServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.GetServiceRequest) + private static final com.google.api.servicemanagement.v1.GetServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.GetServiceRequest(); + } + + public static com.google.api.servicemanagement.v1.GetServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetServiceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRequestOrBuilder.java new file mode 100644 index 0000000..b75e0d3 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface GetServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.GetServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the service.  See the `ServiceManager` overview for naming
+   * requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. The name of the service.  See the `ServiceManager` overview for naming
+   * requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRolloutRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRolloutRequest.java new file mode 100644 index 0000000..92c341d --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRolloutRequest.java @@ -0,0 +1,826 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for GetServiceRollout method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.GetServiceRolloutRequest} + */ +public final class GetServiceRolloutRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.GetServiceRolloutRequest) + GetServiceRolloutRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetServiceRolloutRequest.newBuilder() to construct. + private GetServiceRolloutRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetServiceRolloutRequest() { + serviceName_ = ""; + rolloutId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetServiceRolloutRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetServiceRolloutRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + rolloutId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceRolloutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceRolloutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.GetServiceRolloutRequest.class, + com.google.api.servicemanagement.v1.GetServiceRolloutRequest.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ROLLOUT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object rolloutId_; + /** + * + * + *
+   * Required. The id of the rollout resource.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rolloutId. + */ + @java.lang.Override + public java.lang.String getRolloutId() { + java.lang.Object ref = rolloutId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The id of the rollout resource.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rolloutId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRolloutIdBytes() { + java.lang.Object ref = rolloutId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutId_ = 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 (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (!getRolloutIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, rolloutId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (!getRolloutIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, rolloutId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.GetServiceRolloutRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.GetServiceRolloutRequest other = + (com.google.api.servicemanagement.v1.GetServiceRolloutRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (!getRolloutId().equals(other.getRolloutId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + ROLLOUT_ID_FIELD_NUMBER; + hash = (53 * hash) + getRolloutId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.GetServiceRolloutRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for GetServiceRollout method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.GetServiceRolloutRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.GetServiceRolloutRequest) + com.google.api.servicemanagement.v1.GetServiceRolloutRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceRolloutRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceRolloutRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.GetServiceRolloutRequest.class, + com.google.api.servicemanagement.v1.GetServiceRolloutRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.GetServiceRolloutRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + rolloutId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_GetServiceRolloutRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceRolloutRequest + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.GetServiceRolloutRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceRolloutRequest build() { + com.google.api.servicemanagement.v1.GetServiceRolloutRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceRolloutRequest buildPartial() { + com.google.api.servicemanagement.v1.GetServiceRolloutRequest result = + new com.google.api.servicemanagement.v1.GetServiceRolloutRequest(this); + result.serviceName_ = serviceName_; + result.rolloutId_ = rolloutId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.GetServiceRolloutRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.GetServiceRolloutRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.GetServiceRolloutRequest other) { + if (other + == com.google.api.servicemanagement.v1.GetServiceRolloutRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (!other.getRolloutId().isEmpty()) { + rolloutId_ = other.rolloutId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.GetServiceRolloutRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.GetServiceRolloutRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object rolloutId_ = ""; + /** + * + * + *
+     * Required. The id of the rollout resource.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rolloutId. + */ + public java.lang.String getRolloutId() { + java.lang.Object ref = rolloutId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The id of the rollout resource.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rolloutId. + */ + public com.google.protobuf.ByteString getRolloutIdBytes() { + java.lang.Object ref = rolloutId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The id of the rollout resource.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The rolloutId to set. + * @return This builder for chaining. + */ + public Builder setRolloutId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rolloutId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the rollout resource.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearRolloutId() { + + rolloutId_ = getDefaultInstance().getRolloutId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The id of the rollout resource.
+     * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for rolloutId to set. + * @return This builder for chaining. + */ + public Builder setRolloutIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rolloutId_ = 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.api.servicemanagement.v1.GetServiceRolloutRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.GetServiceRolloutRequest) + private static final com.google.api.servicemanagement.v1.GetServiceRolloutRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.GetServiceRolloutRequest(); + } + + public static com.google.api.servicemanagement.v1.GetServiceRolloutRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetServiceRolloutRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetServiceRolloutRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.GetServiceRolloutRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRolloutRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRolloutRequestOrBuilder.java new file mode 100644 index 0000000..7f0ee4e --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/GetServiceRolloutRequestOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface GetServiceRolloutRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.GetServiceRolloutRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * Required. The id of the rollout resource.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The rolloutId. + */ + java.lang.String getRolloutId(); + /** + * + * + *
+   * Required. The id of the rollout resource.
+   * 
+ * + * string rollout_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for rolloutId. + */ + com.google.protobuf.ByteString getRolloutIdBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsRequest.java new file mode 100644 index 0000000..c72c19d --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsRequest.java @@ -0,0 +1,921 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for ListServiceConfigs method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServiceConfigsRequest} + */ +public final class ListServiceConfigsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ListServiceConfigsRequest) + ListServiceConfigsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListServiceConfigsRequest.newBuilder() to construct. + private ListServiceConfigsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListServiceConfigsRequest() { + serviceName_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListServiceConfigsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListServiceConfigsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServiceConfigsRequest.class, + com.google.api.servicemanagement.v1.ListServiceConfigsRequest.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The token of the page to retrieve.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token of the page to retrieve.
+   * 
+ * + * string page_token = 2; + * + * @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 PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The max number of items to include in the response list. Page size is 50
+   * if not specified. Maximum value is 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.ListServiceConfigsRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.ListServiceConfigsRequest other = + (com.google.api.servicemanagement.v1.ListServiceConfigsRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.ListServiceConfigsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for ListServiceConfigs method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServiceConfigsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ListServiceConfigsRequest) + com.google.api.servicemanagement.v1.ListServiceConfigsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceConfigsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceConfigsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServiceConfigsRequest.class, + com.google.api.servicemanagement.v1.ListServiceConfigsRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.ListServiceConfigsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + pageToken_ = ""; + + pageSize_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceConfigsRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceConfigsRequest + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.ListServiceConfigsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceConfigsRequest build() { + com.google.api.servicemanagement.v1.ListServiceConfigsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceConfigsRequest buildPartial() { + com.google.api.servicemanagement.v1.ListServiceConfigsRequest result = + new com.google.api.servicemanagement.v1.ListServiceConfigsRequest(this); + result.serviceName_ = serviceName_; + result.pageToken_ = pageToken_; + result.pageSize_ = pageSize_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.ListServiceConfigsRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.ListServiceConfigsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.ListServiceConfigsRequest other) { + if (other + == com.google.api.servicemanagement.v1.ListServiceConfigsRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.ListServiceConfigsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.ListServiceConfigsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The token of the page to retrieve.
+     * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token of the page to retrieve.
+     * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token of the page to retrieve.
+     * 
+ * + * string page_token = 2; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The token of the page to retrieve.
+     * 
+ * + * string page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token of the page to retrieve.
+     * 
+ * + * string page_token = 2; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The max number of items to include in the response list. Page size is 50
+     * if not specified. Maximum value is 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The max number of items to include in the response list. Page size is 50
+     * if not specified. Maximum value is 100.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The max number of items to include in the response list. Page size is 50
+     * if not specified. Maximum value is 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.ListServiceConfigsRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ListServiceConfigsRequest) + private static final com.google.api.servicemanagement.v1.ListServiceConfigsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ListServiceConfigsRequest(); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServiceConfigsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListServiceConfigsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceConfigsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsRequestOrBuilder.java new file mode 100644 index 0000000..1848c40 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsRequestOrBuilder.java @@ -0,0 +1,91 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface ListServiceConfigsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.ListServiceConfigsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * The token of the page to retrieve.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The token of the page to retrieve.
+   * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The max number of items to include in the response list. Page size is 50
+   * if not specified. Maximum value is 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsResponse.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsResponse.java new file mode 100644 index 0000000..888ff2c --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsResponse.java @@ -0,0 +1,1130 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Response message for ListServiceConfigs method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServiceConfigsResponse} + */ +public final class ListServiceConfigsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ListServiceConfigsResponse) + ListServiceConfigsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListServiceConfigsResponse.newBuilder() to construct. + private ListServiceConfigsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListServiceConfigsResponse() { + serviceConfigs_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListServiceConfigsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListServiceConfigsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + serviceConfigs_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + serviceConfigs_.add( + input.readMessage(com.google.api.Service.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + serviceConfigs_ = java.util.Collections.unmodifiableList(serviceConfigs_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServiceConfigsResponse.class, + com.google.api.servicemanagement.v1.ListServiceConfigsResponse.Builder.class); + } + + public static final int SERVICE_CONFIGS_FIELD_NUMBER = 1; + private java.util.List serviceConfigs_; + /** + * + * + *
+   * The list of service configuration resources.
+   * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + @java.lang.Override + public java.util.List getServiceConfigsList() { + return serviceConfigs_; + } + /** + * + * + *
+   * The list of service configuration resources.
+   * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + @java.lang.Override + public java.util.List + getServiceConfigsOrBuilderList() { + return serviceConfigs_; + } + /** + * + * + *
+   * The list of service configuration resources.
+   * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + @java.lang.Override + public int getServiceConfigsCount() { + return serviceConfigs_.size(); + } + /** + * + * + *
+   * The list of service configuration resources.
+   * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + @java.lang.Override + public com.google.api.Service getServiceConfigs(int index) { + return serviceConfigs_.get(index); + } + /** + * + * + *
+   * The list of service configuration resources.
+   * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + @java.lang.Override + public com.google.api.ServiceOrBuilder getServiceConfigsOrBuilder(int index) { + return serviceConfigs_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The token of the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token of the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < serviceConfigs_.size(); i++) { + output.writeMessage(1, serviceConfigs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < serviceConfigs_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, serviceConfigs_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.ListServiceConfigsResponse)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.ListServiceConfigsResponse other = + (com.google.api.servicemanagement.v1.ListServiceConfigsResponse) obj; + + if (!getServiceConfigsList().equals(other.getServiceConfigsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getServiceConfigsCount() > 0) { + hash = (37 * hash) + SERVICE_CONFIGS_FIELD_NUMBER; + hash = (53 * hash) + getServiceConfigsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.ListServiceConfigsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for ListServiceConfigs method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServiceConfigsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ListServiceConfigsResponse) + com.google.api.servicemanagement.v1.ListServiceConfigsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceConfigsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceConfigsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServiceConfigsResponse.class, + com.google.api.servicemanagement.v1.ListServiceConfigsResponse.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.ListServiceConfigsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getServiceConfigsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (serviceConfigsBuilder_ == null) { + serviceConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + serviceConfigsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceConfigsResponse_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceConfigsResponse + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.ListServiceConfigsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceConfigsResponse build() { + com.google.api.servicemanagement.v1.ListServiceConfigsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceConfigsResponse buildPartial() { + com.google.api.servicemanagement.v1.ListServiceConfigsResponse result = + new com.google.api.servicemanagement.v1.ListServiceConfigsResponse(this); + int from_bitField0_ = bitField0_; + if (serviceConfigsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + serviceConfigs_ = java.util.Collections.unmodifiableList(serviceConfigs_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.serviceConfigs_ = serviceConfigs_; + } else { + result.serviceConfigs_ = serviceConfigsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.ListServiceConfigsResponse) { + return mergeFrom((com.google.api.servicemanagement.v1.ListServiceConfigsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.ListServiceConfigsResponse other) { + if (other + == com.google.api.servicemanagement.v1.ListServiceConfigsResponse.getDefaultInstance()) + return this; + if (serviceConfigsBuilder_ == null) { + if (!other.serviceConfigs_.isEmpty()) { + if (serviceConfigs_.isEmpty()) { + serviceConfigs_ = other.serviceConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServiceConfigsIsMutable(); + serviceConfigs_.addAll(other.serviceConfigs_); + } + onChanged(); + } + } else { + if (!other.serviceConfigs_.isEmpty()) { + if (serviceConfigsBuilder_.isEmpty()) { + serviceConfigsBuilder_.dispose(); + serviceConfigsBuilder_ = null; + serviceConfigs_ = other.serviceConfigs_; + bitField0_ = (bitField0_ & ~0x00000001); + serviceConfigsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getServiceConfigsFieldBuilder() + : null; + } else { + serviceConfigsBuilder_.addAllMessages(other.serviceConfigs_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.ListServiceConfigsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.ListServiceConfigsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List serviceConfigs_ = + java.util.Collections.emptyList(); + + private void ensureServiceConfigsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + serviceConfigs_ = new java.util.ArrayList(serviceConfigs_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Service, com.google.api.Service.Builder, com.google.api.ServiceOrBuilder> + serviceConfigsBuilder_; + + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public java.util.List getServiceConfigsList() { + if (serviceConfigsBuilder_ == null) { + return java.util.Collections.unmodifiableList(serviceConfigs_); + } else { + return serviceConfigsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public int getServiceConfigsCount() { + if (serviceConfigsBuilder_ == null) { + return serviceConfigs_.size(); + } else { + return serviceConfigsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public com.google.api.Service getServiceConfigs(int index) { + if (serviceConfigsBuilder_ == null) { + return serviceConfigs_.get(index); + } else { + return serviceConfigsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public Builder setServiceConfigs(int index, com.google.api.Service value) { + if (serviceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConfigsIsMutable(); + serviceConfigs_.set(index, value); + onChanged(); + } else { + serviceConfigsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public Builder setServiceConfigs(int index, com.google.api.Service.Builder builderForValue) { + if (serviceConfigsBuilder_ == null) { + ensureServiceConfigsIsMutable(); + serviceConfigs_.set(index, builderForValue.build()); + onChanged(); + } else { + serviceConfigsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public Builder addServiceConfigs(com.google.api.Service value) { + if (serviceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConfigsIsMutable(); + serviceConfigs_.add(value); + onChanged(); + } else { + serviceConfigsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public Builder addServiceConfigs(int index, com.google.api.Service value) { + if (serviceConfigsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServiceConfigsIsMutable(); + serviceConfigs_.add(index, value); + onChanged(); + } else { + serviceConfigsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public Builder addServiceConfigs(com.google.api.Service.Builder builderForValue) { + if (serviceConfigsBuilder_ == null) { + ensureServiceConfigsIsMutable(); + serviceConfigs_.add(builderForValue.build()); + onChanged(); + } else { + serviceConfigsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public Builder addServiceConfigs(int index, com.google.api.Service.Builder builderForValue) { + if (serviceConfigsBuilder_ == null) { + ensureServiceConfigsIsMutable(); + serviceConfigs_.add(index, builderForValue.build()); + onChanged(); + } else { + serviceConfigsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public Builder addAllServiceConfigs( + java.lang.Iterable values) { + if (serviceConfigsBuilder_ == null) { + ensureServiceConfigsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, serviceConfigs_); + onChanged(); + } else { + serviceConfigsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public Builder clearServiceConfigs() { + if (serviceConfigsBuilder_ == null) { + serviceConfigs_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + serviceConfigsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public Builder removeServiceConfigs(int index) { + if (serviceConfigsBuilder_ == null) { + ensureServiceConfigsIsMutable(); + serviceConfigs_.remove(index); + onChanged(); + } else { + serviceConfigsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public com.google.api.Service.Builder getServiceConfigsBuilder(int index) { + return getServiceConfigsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public com.google.api.ServiceOrBuilder getServiceConfigsOrBuilder(int index) { + if (serviceConfigsBuilder_ == null) { + return serviceConfigs_.get(index); + } else { + return serviceConfigsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public java.util.List + getServiceConfigsOrBuilderList() { + if (serviceConfigsBuilder_ != null) { + return serviceConfigsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(serviceConfigs_); + } + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public com.google.api.Service.Builder addServiceConfigsBuilder() { + return getServiceConfigsFieldBuilder() + .addBuilder(com.google.api.Service.getDefaultInstance()); + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public com.google.api.Service.Builder addServiceConfigsBuilder(int index) { + return getServiceConfigsFieldBuilder() + .addBuilder(index, com.google.api.Service.getDefaultInstance()); + } + /** + * + * + *
+     * The list of service configuration resources.
+     * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + public java.util.List getServiceConfigsBuilderList() { + return getServiceConfigsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Service, com.google.api.Service.Builder, com.google.api.ServiceOrBuilder> + getServiceConfigsFieldBuilder() { + if (serviceConfigsBuilder_ == null) { + serviceConfigsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.Service, + com.google.api.Service.Builder, + com.google.api.ServiceOrBuilder>( + serviceConfigs_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + serviceConfigs_ = null; + } + return serviceConfigsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token of the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token of the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token of the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The token of the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token of the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.ListServiceConfigsResponse) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ListServiceConfigsResponse) + private static final com.google.api.servicemanagement.v1.ListServiceConfigsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ListServiceConfigsResponse(); + } + + public static com.google.api.servicemanagement.v1.ListServiceConfigsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServiceConfigsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListServiceConfigsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceConfigsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsResponseOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsResponseOrBuilder.java new file mode 100644 index 0000000..7776890 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceConfigsResponseOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface ListServiceConfigsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.ListServiceConfigsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of service configuration resources.
+   * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + java.util.List getServiceConfigsList(); + /** + * + * + *
+   * The list of service configuration resources.
+   * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + com.google.api.Service getServiceConfigs(int index); + /** + * + * + *
+   * The list of service configuration resources.
+   * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + int getServiceConfigsCount(); + /** + * + * + *
+   * The list of service configuration resources.
+   * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + java.util.List getServiceConfigsOrBuilderList(); + /** + * + * + *
+   * The list of service configuration resources.
+   * 
+ * + * repeated .google.api.Service service_configs = 1; + */ + com.google.api.ServiceOrBuilder getServiceConfigsOrBuilder(int index); + + /** + * + * + *
+   * The token of the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token of the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsRequest.java new file mode 100644 index 0000000..5b34253 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsRequest.java @@ -0,0 +1,1151 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for 'ListServiceRollouts'
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServiceRolloutsRequest} + */ +public final class ListServiceRolloutsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ListServiceRolloutsRequest) + ListServiceRolloutsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListServiceRolloutsRequest.newBuilder() to construct. + private ListServiceRolloutsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListServiceRolloutsRequest() { + serviceName_ = ""; + pageToken_ = ""; + filter_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListServiceRolloutsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListServiceRolloutsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceRolloutsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceRolloutsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest.class, + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * The token of the page to retrieve.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token of the page to retrieve.
+   * 
+ * + * string page_token = 2; + * + * @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 PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * The max number of items to include in the response list. Page size is 50
+   * if not specified. Maximum value is 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Required. Use `filter` to return subset of rollouts.
+   * The following filters are supported:
+   *   -- To limit the results to only those in
+   *      [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
+   *      use filter='status=SUCCESS'
+   *   -- To limit the results to those in
+   *      [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
+   *      or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+   * Required. Use `filter` to return subset of rollouts.
+   * The following filters are supported:
+   *   -- To limit the results to only those in
+   *      [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
+   *      use filter='status=SUCCESS'
+   *   -- To limit the results to those in
+   *      [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
+   *      or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, pageToken_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, pageToken_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.ListServiceRolloutsRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest other = + (com.google.api.servicemanagement.v1.ListServiceRolloutsRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for 'ListServiceRollouts'
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServiceRolloutsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ListServiceRolloutsRequest) + com.google.api.servicemanagement.v1.ListServiceRolloutsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceRolloutsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceRolloutsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest.class, + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.ListServiceRolloutsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + pageToken_ = ""; + + pageSize_ = 0; + + filter_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceRolloutsRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceRolloutsRequest + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.ListServiceRolloutsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceRolloutsRequest build() { + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceRolloutsRequest buildPartial() { + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest result = + new com.google.api.servicemanagement.v1.ListServiceRolloutsRequest(this); + result.serviceName_ = serviceName_; + result.pageToken_ = pageToken_; + result.pageSize_ = pageSize_; + result.filter_ = filter_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.ListServiceRolloutsRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.ListServiceRolloutsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.ListServiceRolloutsRequest other) { + if (other + == com.google.api.servicemanagement.v1.ListServiceRolloutsRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.ListServiceRolloutsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.ListServiceRolloutsRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * The token of the page to retrieve.
+     * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token of the page to retrieve.
+     * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token of the page to retrieve.
+     * 
+ * + * string page_token = 2; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The token of the page to retrieve.
+     * 
+ * + * string page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token of the page to retrieve.
+     * 
+ * + * string page_token = 2; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The max number of items to include in the response list. Page size is 50
+     * if not specified. Maximum value is 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The max number of items to include in the response list. Page size is 50
+     * if not specified. Maximum value is 100.
+     * 
+ * + * int32 page_size = 3; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The max number of items to include in the response list. Page size is 50
+     * if not specified. Maximum value is 100.
+     * 
+ * + * int32 page_size = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Required. Use `filter` to return subset of rollouts.
+     * The following filters are supported:
+     *   -- To limit the results to only those in
+     *      [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
+     *      use filter='status=SUCCESS'
+     *   -- To limit the results to those in
+     *      [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
+     *      or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. Use `filter` to return subset of rollouts.
+     * The following filters are supported:
+     *   -- To limit the results to only those in
+     *      [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
+     *      use filter='status=SUCCESS'
+     *   -- To limit the results to those in
+     *      [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
+     *      or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + } + /** + * + * + *
+     * Required. Use `filter` to return subset of rollouts.
+     * The following filters are supported:
+     *   -- To limit the results to only those in
+     *      [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
+     *      use filter='status=SUCCESS'
+     *   -- To limit the results to those in
+     *      [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
+     *      or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @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; + } + /** + * + * + *
+     * Required. Use `filter` to return subset of rollouts.
+     * The following filters are supported:
+     *   -- To limit the results to only those in
+     *      [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
+     *      use filter='status=SUCCESS'
+     *   -- To limit the results to those in
+     *      [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
+     *      or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Use `filter` to return subset of rollouts.
+     * The following filters are supported:
+     *   -- To limit the results to only those in
+     *      [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
+     *      use filter='status=SUCCESS'
+     *   -- To limit the results to those in
+     *      [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
+     *      or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.ListServiceRolloutsRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ListServiceRolloutsRequest) + private static final com.google.api.servicemanagement.v1.ListServiceRolloutsRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ListServiceRolloutsRequest(); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServiceRolloutsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListServiceRolloutsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceRolloutsRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsRequestOrBuilder.java new file mode 100644 index 0000000..b1ef6cd --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsRequestOrBuilder.java @@ -0,0 +1,130 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface ListServiceRolloutsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.ListServiceRolloutsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * The token of the page to retrieve.
+   * 
+ * + * string page_token = 2; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * The token of the page to retrieve.
+   * 
+ * + * string page_token = 2; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * The max number of items to include in the response list. Page size is 50
+   * if not specified. Maximum value is 100.
+   * 
+ * + * int32 page_size = 3; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Required. Use `filter` to return subset of rollouts.
+   * The following filters are supported:
+   *   -- To limit the results to only those in
+   *      [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
+   *      use filter='status=SUCCESS'
+   *   -- To limit the results to those in
+   *      [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
+   *      or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Required. Use `filter` to return subset of rollouts.
+   * The following filters are supported:
+   *   -- To limit the results to only those in
+   *      [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS',
+   *      use filter='status=SUCCESS'
+   *   -- To limit the results to those in
+   *      [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED'
+   *      or 'FAILED', use filter='status=CANCELLED OR status=FAILED'
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsResponse.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsResponse.java new file mode 100644 index 0000000..5a785ba --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsResponse.java @@ -0,0 +1,1137 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Response message for ListServiceRollouts method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServiceRolloutsResponse} + */ +public final class ListServiceRolloutsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ListServiceRolloutsResponse) + ListServiceRolloutsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListServiceRolloutsResponse.newBuilder() to construct. + private ListServiceRolloutsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListServiceRolloutsResponse() { + rollouts_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListServiceRolloutsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListServiceRolloutsResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + rollouts_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + rollouts_.add( + input.readMessage( + com.google.api.servicemanagement.v1.Rollout.parser(), extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + rollouts_ = java.util.Collections.unmodifiableList(rollouts_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceRolloutsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceRolloutsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse.class, + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse.Builder.class); + } + + public static final int ROLLOUTS_FIELD_NUMBER = 1; + private java.util.List rollouts_; + /** + * + * + *
+   * The list of rollout resources.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + @java.lang.Override + public java.util.List getRolloutsList() { + return rollouts_; + } + /** + * + * + *
+   * The list of rollout resources.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + @java.lang.Override + public java.util.List + getRolloutsOrBuilderList() { + return rollouts_; + } + /** + * + * + *
+   * The list of rollout resources.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + @java.lang.Override + public int getRolloutsCount() { + return rollouts_.size(); + } + /** + * + * + *
+   * The list of rollout resources.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout getRollouts(int index) { + return rollouts_.get(index); + } + /** + * + * + *
+   * The list of rollout resources.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.RolloutOrBuilder getRolloutsOrBuilder(int index) { + return rollouts_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * The token of the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * The token of the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < rollouts_.size(); i++) { + output.writeMessage(1, rollouts_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < rollouts_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, rollouts_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.ListServiceRolloutsResponse)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse other = + (com.google.api.servicemanagement.v1.ListServiceRolloutsResponse) obj; + + if (!getRolloutsList().equals(other.getRolloutsList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getRolloutsCount() > 0) { + hash = (37 * hash) + ROLLOUTS_FIELD_NUMBER; + hash = (53 * hash) + getRolloutsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for ListServiceRollouts method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServiceRolloutsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ListServiceRolloutsResponse) + com.google.api.servicemanagement.v1.ListServiceRolloutsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceRolloutsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceRolloutsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse.class, + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.ListServiceRolloutsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getRolloutsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (rolloutsBuilder_ == null) { + rollouts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + rolloutsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServiceRolloutsResponse_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceRolloutsResponse + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.ListServiceRolloutsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceRolloutsResponse build() { + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceRolloutsResponse buildPartial() { + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse result = + new com.google.api.servicemanagement.v1.ListServiceRolloutsResponse(this); + int from_bitField0_ = bitField0_; + if (rolloutsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + rollouts_ = java.util.Collections.unmodifiableList(rollouts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.rollouts_ = rollouts_; + } else { + result.rollouts_ = rolloutsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.ListServiceRolloutsResponse) { + return mergeFrom((com.google.api.servicemanagement.v1.ListServiceRolloutsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse other) { + if (other + == com.google.api.servicemanagement.v1.ListServiceRolloutsResponse.getDefaultInstance()) + return this; + if (rolloutsBuilder_ == null) { + if (!other.rollouts_.isEmpty()) { + if (rollouts_.isEmpty()) { + rollouts_ = other.rollouts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureRolloutsIsMutable(); + rollouts_.addAll(other.rollouts_); + } + onChanged(); + } + } else { + if (!other.rollouts_.isEmpty()) { + if (rolloutsBuilder_.isEmpty()) { + rolloutsBuilder_.dispose(); + rolloutsBuilder_ = null; + rollouts_ = other.rollouts_; + bitField0_ = (bitField0_ & ~0x00000001); + rolloutsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getRolloutsFieldBuilder() + : null; + } else { + rolloutsBuilder_.addAllMessages(other.rollouts_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.ListServiceRolloutsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.ListServiceRolloutsResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List rollouts_ = + java.util.Collections.emptyList(); + + private void ensureRolloutsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + rollouts_ = new java.util.ArrayList(rollouts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout, + com.google.api.servicemanagement.v1.Rollout.Builder, + com.google.api.servicemanagement.v1.RolloutOrBuilder> + rolloutsBuilder_; + + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public java.util.List getRolloutsList() { + if (rolloutsBuilder_ == null) { + return java.util.Collections.unmodifiableList(rollouts_); + } else { + return rolloutsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public int getRolloutsCount() { + if (rolloutsBuilder_ == null) { + return rollouts_.size(); + } else { + return rolloutsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public com.google.api.servicemanagement.v1.Rollout getRollouts(int index) { + if (rolloutsBuilder_ == null) { + return rollouts_.get(index); + } else { + return rolloutsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public Builder setRollouts(int index, com.google.api.servicemanagement.v1.Rollout value) { + if (rolloutsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolloutsIsMutable(); + rollouts_.set(index, value); + onChanged(); + } else { + rolloutsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public Builder setRollouts( + int index, com.google.api.servicemanagement.v1.Rollout.Builder builderForValue) { + if (rolloutsBuilder_ == null) { + ensureRolloutsIsMutable(); + rollouts_.set(index, builderForValue.build()); + onChanged(); + } else { + rolloutsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public Builder addRollouts(com.google.api.servicemanagement.v1.Rollout value) { + if (rolloutsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolloutsIsMutable(); + rollouts_.add(value); + onChanged(); + } else { + rolloutsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public Builder addRollouts(int index, com.google.api.servicemanagement.v1.Rollout value) { + if (rolloutsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureRolloutsIsMutable(); + rollouts_.add(index, value); + onChanged(); + } else { + rolloutsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public Builder addRollouts( + com.google.api.servicemanagement.v1.Rollout.Builder builderForValue) { + if (rolloutsBuilder_ == null) { + ensureRolloutsIsMutable(); + rollouts_.add(builderForValue.build()); + onChanged(); + } else { + rolloutsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public Builder addRollouts( + int index, com.google.api.servicemanagement.v1.Rollout.Builder builderForValue) { + if (rolloutsBuilder_ == null) { + ensureRolloutsIsMutable(); + rollouts_.add(index, builderForValue.build()); + onChanged(); + } else { + rolloutsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public Builder addAllRollouts( + java.lang.Iterable values) { + if (rolloutsBuilder_ == null) { + ensureRolloutsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, rollouts_); + onChanged(); + } else { + rolloutsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public Builder clearRollouts() { + if (rolloutsBuilder_ == null) { + rollouts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + rolloutsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public Builder removeRollouts(int index) { + if (rolloutsBuilder_ == null) { + ensureRolloutsIsMutable(); + rollouts_.remove(index); + onChanged(); + } else { + rolloutsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public com.google.api.servicemanagement.v1.Rollout.Builder getRolloutsBuilder(int index) { + return getRolloutsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public com.google.api.servicemanagement.v1.RolloutOrBuilder getRolloutsOrBuilder(int index) { + if (rolloutsBuilder_ == null) { + return rollouts_.get(index); + } else { + return rolloutsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public java.util.List + getRolloutsOrBuilderList() { + if (rolloutsBuilder_ != null) { + return rolloutsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(rollouts_); + } + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public com.google.api.servicemanagement.v1.Rollout.Builder addRolloutsBuilder() { + return getRolloutsFieldBuilder() + .addBuilder(com.google.api.servicemanagement.v1.Rollout.getDefaultInstance()); + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public com.google.api.servicemanagement.v1.Rollout.Builder addRolloutsBuilder(int index) { + return getRolloutsFieldBuilder() + .addBuilder(index, com.google.api.servicemanagement.v1.Rollout.getDefaultInstance()); + } + /** + * + * + *
+     * The list of rollout resources.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + public java.util.List + getRolloutsBuilderList() { + return getRolloutsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout, + com.google.api.servicemanagement.v1.Rollout.Builder, + com.google.api.servicemanagement.v1.RolloutOrBuilder> + getRolloutsFieldBuilder() { + if (rolloutsBuilder_ == null) { + rolloutsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout, + com.google.api.servicemanagement.v1.Rollout.Builder, + com.google.api.servicemanagement.v1.RolloutOrBuilder>( + rollouts_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + rollouts_ = null; + } + return rolloutsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * The token of the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The token of the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The token of the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The token of the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * The token of the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.ListServiceRolloutsResponse) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ListServiceRolloutsResponse) + private static final com.google.api.servicemanagement.v1.ListServiceRolloutsResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ListServiceRolloutsResponse(); + } + + public static com.google.api.servicemanagement.v1.ListServiceRolloutsResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServiceRolloutsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListServiceRolloutsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServiceRolloutsResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsResponseOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsResponseOrBuilder.java new file mode 100644 index 0000000..a01e903 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServiceRolloutsResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface ListServiceRolloutsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.ListServiceRolloutsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of rollout resources.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + java.util.List getRolloutsList(); + /** + * + * + *
+   * The list of rollout resources.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + com.google.api.servicemanagement.v1.Rollout getRollouts(int index); + /** + * + * + *
+   * The list of rollout resources.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + int getRolloutsCount(); + /** + * + * + *
+   * The list of rollout resources.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + java.util.List + getRolloutsOrBuilderList(); + /** + * + * + *
+   * The list of rollout resources.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.Rollout rollouts = 1; + */ + com.google.api.servicemanagement.v1.RolloutOrBuilder getRolloutsOrBuilder(int index); + + /** + * + * + *
+   * The token of the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * The token of the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesRequest.java new file mode 100644 index 0000000..861e37e --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesRequest.java @@ -0,0 +1,1124 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for `ListServices` method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServicesRequest} + */ +public final class ListServicesRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ListServicesRequest) + ListServicesRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListServicesRequest.newBuilder() to construct. + private ListServicesRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListServicesRequest() { + producerProjectId_ = ""; + pageToken_ = ""; + consumerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListServicesRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListServicesRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + producerProjectId_ = s; + break; + } + case 40: + { + pageSize_ = input.readInt32(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + consumerId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServicesRequest.class, + com.google.api.servicemanagement.v1.ListServicesRequest.Builder.class); + } + + public static final int PRODUCER_PROJECT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object producerProjectId_; + /** + * + * + *
+   * Include services produced by the specified project.
+   * 
+ * + * string producer_project_id = 1; + * + * @return The producerProjectId. + */ + @java.lang.Override + public java.lang.String getProducerProjectId() { + java.lang.Object ref = producerProjectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + producerProjectId_ = s; + return s; + } + } + /** + * + * + *
+   * Include services produced by the specified project.
+   * 
+ * + * string producer_project_id = 1; + * + * @return The bytes for producerProjectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProducerProjectIdBytes() { + java.lang.Object ref = producerProjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + producerProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 5; + private int pageSize_; + /** + * + * + *
+   * The max number of items to include in the response list. Page size is 50
+   * if not specified. Maximum value is 100.
+   * 
+ * + * int32 page_size = 5; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 6; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Token identifying which result to start with; returned by a previous list
+   * call.
+   * 
+ * + * string page_token = 6; + * + * @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; + } + } + /** + * + * + *
+   * Token identifying which result to start with; returned by a previous list
+   * call.
+   * 
+ * + * string page_token = 6; + * + * @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 CONSUMER_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object consumerId_; + /** + * + * + *
+   * Include services consumed by the specified consumer.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - project:<project_id>
+   * 
+ * + * string consumer_id = 7 [deprecated = true]; + * + * @return The consumerId. + */ + @java.lang.Override + @java.lang.Deprecated + public java.lang.String getConsumerId() { + java.lang.Object ref = consumerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + consumerId_ = s; + return s; + } + } + /** + * + * + *
+   * Include services consumed by the specified consumer.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - project:<project_id>
+   * 
+ * + * string consumer_id = 7 [deprecated = true]; + * + * @return The bytes for consumerId. + */ + @java.lang.Override + @java.lang.Deprecated + public com.google.protobuf.ByteString getConsumerIdBytes() { + java.lang.Object ref = consumerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + consumerId_ = 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 (!getProducerProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, producerProjectId_); + } + if (pageSize_ != 0) { + output.writeInt32(5, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, pageToken_); + } + if (!getConsumerIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, consumerId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getProducerProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, producerProjectId_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(5, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, pageToken_); + } + if (!getConsumerIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, consumerId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.ListServicesRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.ListServicesRequest other = + (com.google.api.servicemanagement.v1.ListServicesRequest) obj; + + if (!getProducerProjectId().equals(other.getProducerProjectId())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getConsumerId().equals(other.getConsumerId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRODUCER_PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProducerProjectId().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) + CONSUMER_ID_FIELD_NUMBER; + hash = (53 * hash) + getConsumerId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.ListServicesRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for `ListServices` method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServicesRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ListServicesRequest) + com.google.api.servicemanagement.v1.ListServicesRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServicesRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServicesRequest.class, + com.google.api.servicemanagement.v1.ListServicesRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.ListServicesRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + producerProjectId_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + consumerId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServicesRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServicesRequest getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.ListServicesRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServicesRequest build() { + com.google.api.servicemanagement.v1.ListServicesRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServicesRequest buildPartial() { + com.google.api.servicemanagement.v1.ListServicesRequest result = + new com.google.api.servicemanagement.v1.ListServicesRequest(this); + result.producerProjectId_ = producerProjectId_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.consumerId_ = consumerId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.ListServicesRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.ListServicesRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.ListServicesRequest other) { + if (other == com.google.api.servicemanagement.v1.ListServicesRequest.getDefaultInstance()) + return this; + if (!other.getProducerProjectId().isEmpty()) { + producerProjectId_ = other.producerProjectId_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getConsumerId().isEmpty()) { + consumerId_ = other.consumerId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.ListServicesRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.ListServicesRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object producerProjectId_ = ""; + /** + * + * + *
+     * Include services produced by the specified project.
+     * 
+ * + * string producer_project_id = 1; + * + * @return The producerProjectId. + */ + public java.lang.String getProducerProjectId() { + java.lang.Object ref = producerProjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + producerProjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Include services produced by the specified project.
+     * 
+ * + * string producer_project_id = 1; + * + * @return The bytes for producerProjectId. + */ + public com.google.protobuf.ByteString getProducerProjectIdBytes() { + java.lang.Object ref = producerProjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + producerProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Include services produced by the specified project.
+     * 
+ * + * string producer_project_id = 1; + * + * @param value The producerProjectId to set. + * @return This builder for chaining. + */ + public Builder setProducerProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + producerProjectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Include services produced by the specified project.
+     * 
+ * + * string producer_project_id = 1; + * + * @return This builder for chaining. + */ + public Builder clearProducerProjectId() { + + producerProjectId_ = getDefaultInstance().getProducerProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Include services produced by the specified project.
+     * 
+ * + * string producer_project_id = 1; + * + * @param value The bytes for producerProjectId to set. + * @return This builder for chaining. + */ + public Builder setProducerProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + producerProjectId_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * The max number of items to include in the response list. Page size is 50
+     * if not specified. Maximum value is 100.
+     * 
+ * + * int32 page_size = 5; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * The max number of items to include in the response list. Page size is 50
+     * if not specified. Maximum value is 100.
+     * 
+ * + * int32 page_size = 5; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The max number of items to include in the response list. Page size is 50
+     * if not specified. Maximum value is 100.
+     * 
+ * + * int32 page_size = 5; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Token identifying which result to start with; returned by a previous list
+     * call.
+     * 
+ * + * string page_token = 6; + * + * @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; + } + } + /** + * + * + *
+     * Token identifying which result to start with; returned by a previous list
+     * call.
+     * 
+ * + * string page_token = 6; + * + * @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; + } + } + /** + * + * + *
+     * Token identifying which result to start with; returned by a previous list
+     * call.
+     * 
+ * + * string page_token = 6; + * + * @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; + } + /** + * + * + *
+     * Token identifying which result to start with; returned by a previous list
+     * call.
+     * 
+ * + * string page_token = 6; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token identifying which result to start with; returned by a previous list
+     * call.
+     * 
+ * + * string page_token = 6; + * + * @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 consumerId_ = ""; + /** + * + * + *
+     * Include services consumed by the specified consumer.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - project:<project_id>
+     * 
+ * + * string consumer_id = 7 [deprecated = true]; + * + * @return The consumerId. + */ + @java.lang.Deprecated + public java.lang.String getConsumerId() { + java.lang.Object ref = consumerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + consumerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Include services consumed by the specified consumer.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - project:<project_id>
+     * 
+ * + * string consumer_id = 7 [deprecated = true]; + * + * @return The bytes for consumerId. + */ + @java.lang.Deprecated + public com.google.protobuf.ByteString getConsumerIdBytes() { + java.lang.Object ref = consumerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + consumerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Include services consumed by the specified consumer.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - project:<project_id>
+     * 
+ * + * string consumer_id = 7 [deprecated = true]; + * + * @param value The consumerId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setConsumerId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + consumerId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Include services consumed by the specified consumer.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - project:<project_id>
+     * 
+ * + * string consumer_id = 7 [deprecated = true]; + * + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder clearConsumerId() { + + consumerId_ = getDefaultInstance().getConsumerId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Include services consumed by the specified consumer.
+     * The Google Service Management implementation accepts the following
+     * forms:
+     * - project:<project_id>
+     * 
+ * + * string consumer_id = 7 [deprecated = true]; + * + * @param value The bytes for consumerId to set. + * @return This builder for chaining. + */ + @java.lang.Deprecated + public Builder setConsumerIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + consumerId_ = 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.api.servicemanagement.v1.ListServicesRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ListServicesRequest) + private static final com.google.api.servicemanagement.v1.ListServicesRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ListServicesRequest(); + } + + public static com.google.api.servicemanagement.v1.ListServicesRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListServicesRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServicesRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesRequestOrBuilder.java new file mode 100644 index 0000000..33b4eec --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesRequestOrBuilder.java @@ -0,0 +1,124 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface ListServicesRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.ListServicesRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Include services produced by the specified project.
+   * 
+ * + * string producer_project_id = 1; + * + * @return The producerProjectId. + */ + java.lang.String getProducerProjectId(); + /** + * + * + *
+   * Include services produced by the specified project.
+   * 
+ * + * string producer_project_id = 1; + * + * @return The bytes for producerProjectId. + */ + com.google.protobuf.ByteString getProducerProjectIdBytes(); + + /** + * + * + *
+   * The max number of items to include in the response list. Page size is 50
+   * if not specified. Maximum value is 100.
+   * 
+ * + * int32 page_size = 5; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Token identifying which result to start with; returned by a previous list
+   * call.
+   * 
+ * + * string page_token = 6; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Token identifying which result to start with; returned by a previous list
+   * call.
+   * 
+ * + * string page_token = 6; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Include services consumed by the specified consumer.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - project:<project_id>
+   * 
+ * + * string consumer_id = 7 [deprecated = true]; + * + * @return The consumerId. + */ + @java.lang.Deprecated + java.lang.String getConsumerId(); + /** + * + * + *
+   * Include services consumed by the specified consumer.
+   * The Google Service Management implementation accepts the following
+   * forms:
+   * - project:<project_id>
+   * 
+ * + * string consumer_id = 7 [deprecated = true]; + * + * @return The bytes for consumerId. + */ + @java.lang.Deprecated + com.google.protobuf.ByteString getConsumerIdBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesResponse.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesResponse.java new file mode 100644 index 0000000..2cf001c --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesResponse.java @@ -0,0 +1,1140 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Response message for `ListServices` method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServicesResponse} + */ +public final class ListServicesResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ListServicesResponse) + ListServicesResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListServicesResponse.newBuilder() to construct. + private ListServicesResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListServicesResponse() { + services_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListServicesResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListServicesResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + services_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + services_.add( + input.readMessage( + com.google.api.servicemanagement.v1.ManagedService.parser(), + extensionRegistry)); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + nextPageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + services_ = java.util.Collections.unmodifiableList(services_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServicesResponse.class, + com.google.api.servicemanagement.v1.ListServicesResponse.Builder.class); + } + + public static final int SERVICES_FIELD_NUMBER = 1; + private java.util.List services_; + /** + * + * + *
+   * The returned services will only have the name field set.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + @java.lang.Override + public java.util.List getServicesList() { + return services_; + } + /** + * + * + *
+   * The returned services will only have the name field set.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + @java.lang.Override + public java.util.List + getServicesOrBuilderList() { + return services_; + } + /** + * + * + *
+   * The returned services will only have the name field set.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + @java.lang.Override + public int getServicesCount() { + return services_.size(); + } + /** + * + * + *
+   * The returned services will only have the name field set.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ManagedService getServices(int index) { + return services_.get(index); + } + /** + * + * + *
+   * The returned services will only have the name field set.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ManagedServiceOrBuilder getServicesOrBuilder( + int index) { + return services_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * Token that can be passed to `ListServices` to resume a paginated query.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Token that can be passed to `ListServices` to resume a paginated query.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < services_.size(); i++) { + output.writeMessage(1, services_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (int i = 0; i < services_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, services_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.ListServicesResponse)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.ListServicesResponse other = + (com.google.api.servicemanagement.v1.ListServicesResponse) obj; + + if (!getServicesList().equals(other.getServicesList())) return false; + if (!getNextPageToken().equals(other.getNextPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getServicesCount() > 0) { + hash = (37 * hash) + SERVICES_FIELD_NUMBER; + hash = (53 * hash) + getServicesList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.ListServicesResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for `ListServices` method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ListServicesResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ListServicesResponse) + com.google.api.servicemanagement.v1.ListServicesResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServicesResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ListServicesResponse.class, + com.google.api.servicemanagement.v1.ListServicesResponse.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.ListServicesResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getServicesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + servicesBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_ListServicesResponse_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServicesResponse getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.ListServicesResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServicesResponse build() { + com.google.api.servicemanagement.v1.ListServicesResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServicesResponse buildPartial() { + com.google.api.servicemanagement.v1.ListServicesResponse result = + new com.google.api.servicemanagement.v1.ListServicesResponse(this); + int from_bitField0_ = bitField0_; + if (servicesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + services_ = java.util.Collections.unmodifiableList(services_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.services_ = services_; + } else { + result.services_ = servicesBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.ListServicesResponse) { + return mergeFrom((com.google.api.servicemanagement.v1.ListServicesResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.ListServicesResponse other) { + if (other == com.google.api.servicemanagement.v1.ListServicesResponse.getDefaultInstance()) + return this; + if (servicesBuilder_ == null) { + if (!other.services_.isEmpty()) { + if (services_.isEmpty()) { + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureServicesIsMutable(); + services_.addAll(other.services_); + } + onChanged(); + } + } else { + if (!other.services_.isEmpty()) { + if (servicesBuilder_.isEmpty()) { + servicesBuilder_.dispose(); + servicesBuilder_ = null; + services_ = other.services_; + bitField0_ = (bitField0_ & ~0x00000001); + servicesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getServicesFieldBuilder() + : null; + } else { + servicesBuilder_.addAllMessages(other.services_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.ListServicesResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.ListServicesResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List services_ = + java.util.Collections.emptyList(); + + private void ensureServicesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + services_ = + new java.util.ArrayList(services_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.ManagedService, + com.google.api.servicemanagement.v1.ManagedService.Builder, + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder> + servicesBuilder_; + + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public java.util.List getServicesList() { + if (servicesBuilder_ == null) { + return java.util.Collections.unmodifiableList(services_); + } else { + return servicesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public int getServicesCount() { + if (servicesBuilder_ == null) { + return services_.size(); + } else { + return servicesBuilder_.getCount(); + } + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public com.google.api.servicemanagement.v1.ManagedService getServices(int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public Builder setServices( + int index, com.google.api.servicemanagement.v1.ManagedService value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.set(index, value); + onChanged(); + } else { + servicesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public Builder setServices( + int index, com.google.api.servicemanagement.v1.ManagedService.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.set(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public Builder addServices(com.google.api.servicemanagement.v1.ManagedService value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(value); + onChanged(); + } else { + servicesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public Builder addServices( + int index, com.google.api.servicemanagement.v1.ManagedService value) { + if (servicesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureServicesIsMutable(); + services_.add(index, value); + onChanged(); + } else { + servicesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public Builder addServices( + com.google.api.servicemanagement.v1.ManagedService.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public Builder addServices( + int index, com.google.api.servicemanagement.v1.ManagedService.Builder builderForValue) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.add(index, builderForValue.build()); + onChanged(); + } else { + servicesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public Builder addAllServices( + java.lang.Iterable values) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, services_); + onChanged(); + } else { + servicesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public Builder clearServices() { + if (servicesBuilder_ == null) { + services_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + servicesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public Builder removeServices(int index) { + if (servicesBuilder_ == null) { + ensureServicesIsMutable(); + services_.remove(index); + onChanged(); + } else { + servicesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public com.google.api.servicemanagement.v1.ManagedService.Builder getServicesBuilder( + int index) { + return getServicesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public com.google.api.servicemanagement.v1.ManagedServiceOrBuilder getServicesOrBuilder( + int index) { + if (servicesBuilder_ == null) { + return services_.get(index); + } else { + return servicesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public java.util.List + getServicesOrBuilderList() { + if (servicesBuilder_ != null) { + return servicesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(services_); + } + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public com.google.api.servicemanagement.v1.ManagedService.Builder addServicesBuilder() { + return getServicesFieldBuilder() + .addBuilder(com.google.api.servicemanagement.v1.ManagedService.getDefaultInstance()); + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public com.google.api.servicemanagement.v1.ManagedService.Builder addServicesBuilder( + int index) { + return getServicesFieldBuilder() + .addBuilder( + index, com.google.api.servicemanagement.v1.ManagedService.getDefaultInstance()); + } + /** + * + * + *
+     * The returned services will only have the name field set.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + public java.util.List + getServicesBuilderList() { + return getServicesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.ManagedService, + com.google.api.servicemanagement.v1.ManagedService.Builder, + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder> + getServicesFieldBuilder() { + if (servicesBuilder_ == null) { + servicesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.ManagedService, + com.google.api.servicemanagement.v1.ManagedService.Builder, + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder>( + services_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + services_ = null; + } + return servicesBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * Token that can be passed to `ListServices` to resume a paginated query.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Token that can be passed to `ListServices` to resume a paginated query.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Token that can be passed to `ListServices` to resume a paginated query.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Token that can be passed to `ListServices` to resume a paginated query.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Token that can be passed to `ListServices` to resume a paginated query.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.ListServicesResponse) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ListServicesResponse) + private static final com.google.api.servicemanagement.v1.ListServicesResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ListServicesResponse(); + } + + public static com.google.api.servicemanagement.v1.ListServicesResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListServicesResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListServicesResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ListServicesResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesResponseOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesResponseOrBuilder.java new file mode 100644 index 0000000..514b68e --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ListServicesResponseOrBuilder.java @@ -0,0 +1,102 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface ListServicesResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.ListServicesResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The returned services will only have the name field set.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + java.util.List getServicesList(); + /** + * + * + *
+   * The returned services will only have the name field set.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + com.google.api.servicemanagement.v1.ManagedService getServices(int index); + /** + * + * + *
+   * The returned services will only have the name field set.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + int getServicesCount(); + /** + * + * + *
+   * The returned services will only have the name field set.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + java.util.List + getServicesOrBuilderList(); + /** + * + * + *
+   * The returned services will only have the name field set.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.ManagedService services = 1; + */ + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder getServicesOrBuilder(int index); + + /** + * + * + *
+   * Token that can be passed to `ListServices` to resume a paginated query.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * Token that can be passed to `ListServices` to resume a paginated query.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ManagedService.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ManagedService.java new file mode 100644 index 0000000..1ff7580 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ManagedService.java @@ -0,0 +1,824 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * The full representation of a Service that is managed by
+ * Google Service Management.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ManagedService} + */ +public final class ManagedService extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.ManagedService) + ManagedServiceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ManagedService.newBuilder() to construct. + private ManagedService(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ManagedService() { + serviceName_ = ""; + producerProjectId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ManagedService(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ManagedService( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + producerProjectId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ManagedService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ManagedService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ManagedService.class, + com.google.api.servicemanagement.v1.ManagedService.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * The name of the service. See the [overview](/service-management/overview)
+   * for naming requirements.
+   * 
+ * + * string service_name = 2; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the service. See the [overview](/service-management/overview)
+   * for naming requirements.
+   * 
+ * + * string service_name = 2; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCER_PROJECT_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object producerProjectId_; + /** + * + * + *
+   * ID of the project that produces and owns this service.
+   * 
+ * + * string producer_project_id = 3; + * + * @return The producerProjectId. + */ + @java.lang.Override + public java.lang.String getProducerProjectId() { + java.lang.Object ref = producerProjectId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + producerProjectId_ = s; + return s; + } + } + /** + * + * + *
+   * ID of the project that produces and owns this service.
+   * 
+ * + * string producer_project_id = 3; + * + * @return The bytes for producerProjectId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProducerProjectIdBytes() { + java.lang.Object ref = producerProjectId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + producerProjectId_ = 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 (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, serviceName_); + } + if (!getProducerProjectIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, producerProjectId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, serviceName_); + } + if (!getProducerProjectIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, producerProjectId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.ManagedService)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.ManagedService other = + (com.google.api.servicemanagement.v1.ManagedService) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (!getProducerProjectId().equals(other.getProducerProjectId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (37 * hash) + PRODUCER_PROJECT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProducerProjectId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.ManagedService parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ManagedService parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ManagedService parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ManagedService parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ManagedService parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.ManagedService parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ManagedService parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ManagedService parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ManagedService parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ManagedService parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.ManagedService parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.ManagedService parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.api.servicemanagement.v1.ManagedService prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * The full representation of a Service that is managed by
+   * Google Service Management.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.ManagedService} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.ManagedService) + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ManagedService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ManagedService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.ManagedService.class, + com.google.api.servicemanagement.v1.ManagedService.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.ManagedService.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + producerProjectId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_ManagedService_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ManagedService getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.ManagedService.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ManagedService build() { + com.google.api.servicemanagement.v1.ManagedService result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ManagedService buildPartial() { + com.google.api.servicemanagement.v1.ManagedService result = + new com.google.api.servicemanagement.v1.ManagedService(this); + result.serviceName_ = serviceName_; + result.producerProjectId_ = producerProjectId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.ManagedService) { + return mergeFrom((com.google.api.servicemanagement.v1.ManagedService) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.ManagedService other) { + if (other == com.google.api.servicemanagement.v1.ManagedService.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (!other.getProducerProjectId().isEmpty()) { + producerProjectId_ = other.producerProjectId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.ManagedService parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.ManagedService) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * The name of the service. See the [overview](/service-management/overview)
+     * for naming requirements.
+     * 
+ * + * string service_name = 2; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the service. See the [overview](/service-management/overview)
+     * for naming requirements.
+     * 
+ * + * string service_name = 2; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the service. See the [overview](/service-management/overview)
+     * for naming requirements.
+     * 
+ * + * string service_name = 2; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the service. See the [overview](/service-management/overview)
+     * for naming requirements.
+     * 
+ * + * string service_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the service. See the [overview](/service-management/overview)
+     * for naming requirements.
+     * 
+ * + * string service_name = 2; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private java.lang.Object producerProjectId_ = ""; + /** + * + * + *
+     * ID of the project that produces and owns this service.
+     * 
+ * + * string producer_project_id = 3; + * + * @return The producerProjectId. + */ + public java.lang.String getProducerProjectId() { + java.lang.Object ref = producerProjectId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + producerProjectId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * ID of the project that produces and owns this service.
+     * 
+ * + * string producer_project_id = 3; + * + * @return The bytes for producerProjectId. + */ + public com.google.protobuf.ByteString getProducerProjectIdBytes() { + java.lang.Object ref = producerProjectId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + producerProjectId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * ID of the project that produces and owns this service.
+     * 
+ * + * string producer_project_id = 3; + * + * @param value The producerProjectId to set. + * @return This builder for chaining. + */ + public Builder setProducerProjectId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + producerProjectId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the project that produces and owns this service.
+     * 
+ * + * string producer_project_id = 3; + * + * @return This builder for chaining. + */ + public Builder clearProducerProjectId() { + + producerProjectId_ = getDefaultInstance().getProducerProjectId(); + onChanged(); + return this; + } + /** + * + * + *
+     * ID of the project that produces and owns this service.
+     * 
+ * + * string producer_project_id = 3; + * + * @param value The bytes for producerProjectId to set. + * @return This builder for chaining. + */ + public Builder setProducerProjectIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + producerProjectId_ = 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.api.servicemanagement.v1.ManagedService) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.ManagedService) + private static final com.google.api.servicemanagement.v1.ManagedService DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.ManagedService(); + } + + public static com.google.api.servicemanagement.v1.ManagedService getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ManagedService parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ManagedService(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.ManagedService getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ManagedServiceOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ManagedServiceOrBuilder.java new file mode 100644 index 0000000..2593b35 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ManagedServiceOrBuilder.java @@ -0,0 +1,77 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +public interface ManagedServiceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.ManagedService) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the service. See the [overview](/service-management/overview)
+   * for naming requirements.
+   * 
+ * + * string service_name = 2; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * The name of the service. See the [overview](/service-management/overview)
+   * for naming requirements.
+   * 
+ * + * string service_name = 2; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * ID of the project that produces and owns this service.
+   * 
+ * + * string producer_project_id = 3; + * + * @return The producerProjectId. + */ + java.lang.String getProducerProjectId(); + /** + * + * + *
+   * ID of the project that produces and owns this service.
+   * 
+ * + * string producer_project_id = 3; + * + * @return The bytes for producerProjectId. + */ + com.google.protobuf.ByteString getProducerProjectIdBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/OperationMetadata.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/OperationMetadata.java new file mode 100644 index 0000000..bcca2a8 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/OperationMetadata.java @@ -0,0 +1,2684 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * The metadata associated with a long running operation resource.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.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() { + resourceNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + steps_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + resourceNames_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + resourceNames_.add(s); + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + steps_ = + new java.util.ArrayList< + com.google.api.servicemanagement.v1.OperationMetadata.Step>(); + mutable_bitField0_ |= 0x00000002; + } + steps_.add( + input.readMessage( + com.google.api.servicemanagement.v1.OperationMetadata.Step.parser(), + extensionRegistry)); + break; + } + case 24: + { + progressPercentage_ = input.readInt32(); + break; + } + case 34: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + resourceNames_ = resourceNames_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.OperationMetadata.class, + com.google.api.servicemanagement.v1.OperationMetadata.Builder.class); + } + + /** + * + * + *
+   * Code describes the status of the operation (or one of its steps).
+   * 
+ * + * Protobuf enum {@code google.api.servicemanagement.v1.OperationMetadata.Status} + */ + public enum Status implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Unspecifed code.
+     * 
+ * + * STATUS_UNSPECIFIED = 0; + */ + STATUS_UNSPECIFIED(0), + /** + * + * + *
+     * The operation or step has completed without errors.
+     * 
+ * + * DONE = 1; + */ + DONE(1), + /** + * + * + *
+     * The operation or step has not started yet.
+     * 
+ * + * NOT_STARTED = 2; + */ + NOT_STARTED(2), + /** + * + * + *
+     * The operation or step is in progress.
+     * 
+ * + * IN_PROGRESS = 3; + */ + IN_PROGRESS(3), + /** + * + * + *
+     * The operation or step has completed with errors. If the operation is
+     * rollbackable, the rollback completed with errors too.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + * + * + *
+     * The operation or step has completed with cancellation.
+     * 
+ * + * CANCELLED = 5; + */ + CANCELLED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Unspecifed code.
+     * 
+ * + * STATUS_UNSPECIFIED = 0; + */ + public static final int STATUS_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The operation or step has completed without errors.
+     * 
+ * + * DONE = 1; + */ + public static final int DONE_VALUE = 1; + /** + * + * + *
+     * The operation or step has not started yet.
+     * 
+ * + * NOT_STARTED = 2; + */ + public static final int NOT_STARTED_VALUE = 2; + /** + * + * + *
+     * The operation or step is in progress.
+     * 
+ * + * IN_PROGRESS = 3; + */ + public static final int IN_PROGRESS_VALUE = 3; + /** + * + * + *
+     * The operation or step has completed with errors. If the operation is
+     * rollbackable, the rollback completed with errors too.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + /** + * + * + *
+     * The operation or step has completed with cancellation.
+     * 
+ * + * CANCELLED = 5; + */ + public static final int CANCELLED_VALUE = 5; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Status 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 Status forNumber(int value) { + switch (value) { + case 0: + return STATUS_UNSPECIFIED; + case 1: + return DONE; + case 2: + return NOT_STARTED; + case 3: + return IN_PROGRESS; + case 4: + return FAILED; + case 5: + return CANCELLED; + 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 Status findValueByNumber(int number) { + return Status.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.api.servicemanagement.v1.OperationMetadata.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final Status[] VALUES = values(); + + public static Status 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 Status(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.servicemanagement.v1.OperationMetadata.Status) + } + + public interface StepOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.OperationMetadata.Step) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * The short description of the step.
+     * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+     * The short description of the step.
+     * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+     * The status code.
+     * 
+ * + * .google.api.servicemanagement.v1.OperationMetadata.Status status = 4; + * + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * + * + *
+     * The status code.
+     * 
+ * + * .google.api.servicemanagement.v1.OperationMetadata.Status status = 4; + * + * @return The status. + */ + com.google.api.servicemanagement.v1.OperationMetadata.Status getStatus(); + } + /** + * + * + *
+   * Represents the status of one operation step.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.OperationMetadata.Step} + */ + public static final class Step extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.OperationMetadata.Step) + StepOrBuilder { + private static final long serialVersionUID = 0L; + // Use Step.newBuilder() to construct. + private Step(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Step() { + description_ = ""; + status_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Step(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Step( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_OperationMetadata_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_OperationMetadata_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.OperationMetadata.Step.class, + com.google.api.servicemanagement.v1.OperationMetadata.Step.Builder.class); + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+     * The short description of the step.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * The short description of the step.
+     * 
+ * + * 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 STATUS_FIELD_NUMBER = 4; + private int status_; + /** + * + * + *
+     * The status code.
+     * 
+ * + * .google.api.servicemanagement.v1.OperationMetadata.Status status = 4; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+     * The status code.
+     * 
+ * + * .google.api.servicemanagement.v1.OperationMetadata.Status status = 4; + * + * @return The status. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata.Status getStatus() { + @SuppressWarnings("deprecation") + com.google.api.servicemanagement.v1.OperationMetadata.Status result = + com.google.api.servicemanagement.v1.OperationMetadata.Status.valueOf(status_); + return result == null + ? com.google.api.servicemanagement.v1.OperationMetadata.Status.UNRECOGNIZED + : result; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (status_ + != com.google.api.servicemanagement.v1.OperationMetadata.Status.STATUS_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, status_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (status_ + != com.google.api.servicemanagement.v1.OperationMetadata.Status.STATUS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, status_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.OperationMetadata.Step)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.OperationMetadata.Step other = + (com.google.api.servicemanagement.v1.OperationMetadata.Step) obj; + + if (!getDescription().equals(other.getDescription())) return false; + if (status_ != other.status_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.OperationMetadata.Step prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 status of one operation step.
+     * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.OperationMetadata.Step} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.OperationMetadata.Step) + com.google.api.servicemanagement.v1.OperationMetadata.StepOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_OperationMetadata_Step_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_OperationMetadata_Step_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.OperationMetadata.Step.class, + com.google.api.servicemanagement.v1.OperationMetadata.Step.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.OperationMetadata.Step.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + description_ = ""; + + status_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_OperationMetadata_Step_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata.Step + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.OperationMetadata.Step.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata.Step build() { + com.google.api.servicemanagement.v1.OperationMetadata.Step result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata.Step buildPartial() { + com.google.api.servicemanagement.v1.OperationMetadata.Step result = + new com.google.api.servicemanagement.v1.OperationMetadata.Step(this); + result.description_ = description_; + result.status_ = status_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.OperationMetadata.Step) { + return mergeFrom((com.google.api.servicemanagement.v1.OperationMetadata.Step) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.OperationMetadata.Step other) { + if (other + == com.google.api.servicemanagement.v1.OperationMetadata.Step.getDefaultInstance()) + return this; + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.OperationMetadata.Step parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.OperationMetadata.Step) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+       * The short description of the step.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * The short description of the step.
+       * 
+ * + * 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; + } + } + /** + * + * + *
+       * The short description of the step.
+       * 
+ * + * 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; + } + /** + * + * + *
+       * The short description of the step.
+       * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+       * The short description of the step.
+       * 
+ * + * 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 status_ = 0; + /** + * + * + *
+       * The status code.
+       * 
+ * + * .google.api.servicemanagement.v1.OperationMetadata.Status status = 4; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+       * The status code.
+       * 
+ * + * .google.api.servicemanagement.v1.OperationMetadata.Status status = 4; + * + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * The status code.
+       * 
+ * + * .google.api.servicemanagement.v1.OperationMetadata.Status status = 4; + * + * @return The status. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata.Status getStatus() { + @SuppressWarnings("deprecation") + com.google.api.servicemanagement.v1.OperationMetadata.Status result = + com.google.api.servicemanagement.v1.OperationMetadata.Status.valueOf(status_); + return result == null + ? com.google.api.servicemanagement.v1.OperationMetadata.Status.UNRECOGNIZED + : result; + } + /** + * + * + *
+       * The status code.
+       * 
+ * + * .google.api.servicemanagement.v1.OperationMetadata.Status status = 4; + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(com.google.api.servicemanagement.v1.OperationMetadata.Status value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * The status code.
+       * 
+ * + * .google.api.servicemanagement.v1.OperationMetadata.Status status = 4; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.OperationMetadata.Step) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.OperationMetadata.Step) + private static final com.google.api.servicemanagement.v1.OperationMetadata.Step + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.OperationMetadata.Step(); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata.Step getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Step parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Step(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata.Step getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int RESOURCE_NAMES_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList resourceNames_; + /** + * + * + *
+   * The full name of the resources that this operation is directly
+   * associated with.
+   * 
+ * + * repeated string resource_names = 1; + * + * @return A list containing the resourceNames. + */ + public com.google.protobuf.ProtocolStringList getResourceNamesList() { + return resourceNames_; + } + /** + * + * + *
+   * The full name of the resources that this operation is directly
+   * associated with.
+   * 
+ * + * repeated string resource_names = 1; + * + * @return The count of resourceNames. + */ + public int getResourceNamesCount() { + return resourceNames_.size(); + } + /** + * + * + *
+   * The full name of the resources that this operation is directly
+   * associated with.
+   * 
+ * + * repeated string resource_names = 1; + * + * @param index The index of the element to return. + * @return The resourceNames at the given index. + */ + public java.lang.String getResourceNames(int index) { + return resourceNames_.get(index); + } + /** + * + * + *
+   * The full name of the resources that this operation is directly
+   * associated with.
+   * 
+ * + * repeated string resource_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the resourceNames at the given index. + */ + public com.google.protobuf.ByteString getResourceNamesBytes(int index) { + return resourceNames_.getByteString(index); + } + + public static final int STEPS_FIELD_NUMBER = 2; + private java.util.List steps_; + /** + * + * + *
+   * Detailed status information for each step. The order is undetermined.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + @java.lang.Override + public java.util.List getStepsList() { + return steps_; + } + /** + * + * + *
+   * Detailed status information for each step. The order is undetermined.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + @java.lang.Override + public java.util.List< + ? extends com.google.api.servicemanagement.v1.OperationMetadata.StepOrBuilder> + getStepsOrBuilderList() { + return steps_; + } + /** + * + * + *
+   * Detailed status information for each step. The order is undetermined.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + @java.lang.Override + public int getStepsCount() { + return steps_.size(); + } + /** + * + * + *
+   * Detailed status information for each step. The order is undetermined.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata.Step getSteps(int index) { + return steps_.get(index); + } + /** + * + * + *
+   * Detailed status information for each step. The order is undetermined.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata.StepOrBuilder getStepsOrBuilder( + int index) { + return steps_.get(index); + } + + public static final int PROGRESS_PERCENTAGE_FIELD_NUMBER = 3; + private int progressPercentage_; + /** + * + * + *
+   * Percentage of completion of this operation, ranging from 0 to 100.
+   * 
+ * + * int32 progress_percentage = 3; + * + * @return The progressPercentage. + */ + @java.lang.Override + public int getProgressPercentage() { + return progressPercentage_; + } + + public static final int START_TIME_FIELD_NUMBER = 4; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + for (int i = 0; i < resourceNames_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, resourceNames_.getRaw(i)); + } + for (int i = 0; i < steps_.size(); i++) { + output.writeMessage(2, steps_.get(i)); + } + if (progressPercentage_ != 0) { + output.writeInt32(3, progressPercentage_); + } + if (startTime_ != null) { + output.writeMessage(4, getStartTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < resourceNames_.size(); i++) { + dataSize += computeStringSizeNoTag(resourceNames_.getRaw(i)); + } + size += dataSize; + size += 1 * getResourceNamesList().size(); + } + for (int i = 0; i < steps_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, steps_.get(i)); + } + if (progressPercentage_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, progressPercentage_); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getStartTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.OperationMetadata other = + (com.google.api.servicemanagement.v1.OperationMetadata) obj; + + if (!getResourceNamesList().equals(other.getResourceNamesList())) return false; + if (!getStepsList().equals(other.getStepsList())) return false; + if (getProgressPercentage() != other.getProgressPercentage()) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getResourceNamesCount() > 0) { + hash = (37 * hash) + RESOURCE_NAMES_FIELD_NUMBER; + hash = (53 * hash) + getResourceNamesList().hashCode(); + } + if (getStepsCount() > 0) { + hash = (37 * hash) + STEPS_FIELD_NUMBER; + hash = (53 * hash) + getStepsList().hashCode(); + } + hash = (37 * hash) + PROGRESS_PERCENTAGE_FIELD_NUMBER; + hash = (53 * hash) + getProgressPercentage(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.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.api.servicemanagement.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.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.api.servicemanagement.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.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.api.servicemanagement.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.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.api.servicemanagement.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.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.api.servicemanagement.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; + } + /** + * + * + *
+   * The metadata associated with a long running operation resource.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.OperationMetadata) + com.google.api.servicemanagement.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.OperationMetadata.class, + com.google.api.servicemanagement.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getStepsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + resourceNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + stepsBuilder_.clear(); + } + progressPercentage_ = 0; + + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata build() { + com.google.api.servicemanagement.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata buildPartial() { + com.google.api.servicemanagement.v1.OperationMetadata result = + new com.google.api.servicemanagement.v1.OperationMetadata(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + resourceNames_ = resourceNames_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.resourceNames_ = resourceNames_; + if (stepsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + steps_ = java.util.Collections.unmodifiableList(steps_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.steps_ = steps_; + } else { + result.steps_ = stepsBuilder_.build(); + } + result.progressPercentage_ = progressPercentage_; + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.OperationMetadata) { + return mergeFrom((com.google.api.servicemanagement.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.OperationMetadata other) { + if (other == com.google.api.servicemanagement.v1.OperationMetadata.getDefaultInstance()) + return this; + if (!other.resourceNames_.isEmpty()) { + if (resourceNames_.isEmpty()) { + resourceNames_ = other.resourceNames_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureResourceNamesIsMutable(); + resourceNames_.addAll(other.resourceNames_); + } + onChanged(); + } + if (stepsBuilder_ == null) { + if (!other.steps_.isEmpty()) { + if (steps_.isEmpty()) { + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureStepsIsMutable(); + steps_.addAll(other.steps_); + } + onChanged(); + } + } else { + if (!other.steps_.isEmpty()) { + if (stepsBuilder_.isEmpty()) { + stepsBuilder_.dispose(); + stepsBuilder_ = null; + steps_ = other.steps_; + bitField0_ = (bitField0_ & ~0x00000002); + stepsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getStepsFieldBuilder() + : null; + } else { + stepsBuilder_.addAllMessages(other.steps_); + } + } + } + if (other.getProgressPercentage() != 0) { + setProgressPercentage(other.getProgressPercentage()); + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList resourceNames_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureResourceNamesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + resourceNames_ = new com.google.protobuf.LazyStringArrayList(resourceNames_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * The full name of the resources that this operation is directly
+     * associated with.
+     * 
+ * + * repeated string resource_names = 1; + * + * @return A list containing the resourceNames. + */ + public com.google.protobuf.ProtocolStringList getResourceNamesList() { + return resourceNames_.getUnmodifiableView(); + } + /** + * + * + *
+     * The full name of the resources that this operation is directly
+     * associated with.
+     * 
+ * + * repeated string resource_names = 1; + * + * @return The count of resourceNames. + */ + public int getResourceNamesCount() { + return resourceNames_.size(); + } + /** + * + * + *
+     * The full name of the resources that this operation is directly
+     * associated with.
+     * 
+ * + * repeated string resource_names = 1; + * + * @param index The index of the element to return. + * @return The resourceNames at the given index. + */ + public java.lang.String getResourceNames(int index) { + return resourceNames_.get(index); + } + /** + * + * + *
+     * The full name of the resources that this operation is directly
+     * associated with.
+     * 
+ * + * repeated string resource_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the resourceNames at the given index. + */ + public com.google.protobuf.ByteString getResourceNamesBytes(int index) { + return resourceNames_.getByteString(index); + } + /** + * + * + *
+     * The full name of the resources that this operation is directly
+     * associated with.
+     * 
+ * + * repeated string resource_names = 1; + * + * @param index The index to set the value at. + * @param value The resourceNames to set. + * @return This builder for chaining. + */ + public Builder setResourceNames(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceNamesIsMutable(); + resourceNames_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the resources that this operation is directly
+     * associated with.
+     * 
+ * + * repeated string resource_names = 1; + * + * @param value The resourceNames to add. + * @return This builder for chaining. + */ + public Builder addResourceNames(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureResourceNamesIsMutable(); + resourceNames_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the resources that this operation is directly
+     * associated with.
+     * 
+ * + * repeated string resource_names = 1; + * + * @param values The resourceNames to add. + * @return This builder for chaining. + */ + public Builder addAllResourceNames(java.lang.Iterable values) { + ensureResourceNamesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, resourceNames_); + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the resources that this operation is directly
+     * associated with.
+     * 
+ * + * repeated string resource_names = 1; + * + * @return This builder for chaining. + */ + public Builder clearResourceNames() { + resourceNames_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * The full name of the resources that this operation is directly
+     * associated with.
+     * 
+ * + * repeated string resource_names = 1; + * + * @param value The bytes of the resourceNames to add. + * @return This builder for chaining. + */ + public Builder addResourceNamesBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureResourceNamesIsMutable(); + resourceNames_.add(value); + onChanged(); + return this; + } + + private java.util.List steps_ = + java.util.Collections.emptyList(); + + private void ensureStepsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + steps_ = + new java.util.ArrayList( + steps_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.OperationMetadata.Step, + com.google.api.servicemanagement.v1.OperationMetadata.Step.Builder, + com.google.api.servicemanagement.v1.OperationMetadata.StepOrBuilder> + stepsBuilder_; + + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public java.util.List + getStepsList() { + if (stepsBuilder_ == null) { + return java.util.Collections.unmodifiableList(steps_); + } else { + return stepsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public int getStepsCount() { + if (stepsBuilder_ == null) { + return steps_.size(); + } else { + return stepsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public com.google.api.servicemanagement.v1.OperationMetadata.Step getSteps(int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public Builder setSteps( + int index, com.google.api.servicemanagement.v1.OperationMetadata.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.set(index, value); + onChanged(); + } else { + stepsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public Builder setSteps( + int index, + com.google.api.servicemanagement.v1.OperationMetadata.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.set(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public Builder addSteps(com.google.api.servicemanagement.v1.OperationMetadata.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(value); + onChanged(); + } else { + stepsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public Builder addSteps( + int index, com.google.api.servicemanagement.v1.OperationMetadata.Step value) { + if (stepsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureStepsIsMutable(); + steps_.add(index, value); + onChanged(); + } else { + stepsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public Builder addSteps( + com.google.api.servicemanagement.v1.OperationMetadata.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public Builder addSteps( + int index, + com.google.api.servicemanagement.v1.OperationMetadata.Step.Builder builderForValue) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.add(index, builderForValue.build()); + onChanged(); + } else { + stepsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public Builder addAllSteps( + java.lang.Iterable + values) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, steps_); + onChanged(); + } else { + stepsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public Builder clearSteps() { + if (stepsBuilder_ == null) { + steps_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + stepsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public Builder removeSteps(int index) { + if (stepsBuilder_ == null) { + ensureStepsIsMutable(); + steps_.remove(index); + onChanged(); + } else { + stepsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public com.google.api.servicemanagement.v1.OperationMetadata.Step.Builder getStepsBuilder( + int index) { + return getStepsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public com.google.api.servicemanagement.v1.OperationMetadata.StepOrBuilder getStepsOrBuilder( + int index) { + if (stepsBuilder_ == null) { + return steps_.get(index); + } else { + return stepsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public java.util.List< + ? extends com.google.api.servicemanagement.v1.OperationMetadata.StepOrBuilder> + getStepsOrBuilderList() { + if (stepsBuilder_ != null) { + return stepsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(steps_); + } + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public com.google.api.servicemanagement.v1.OperationMetadata.Step.Builder addStepsBuilder() { + return getStepsFieldBuilder() + .addBuilder( + com.google.api.servicemanagement.v1.OperationMetadata.Step.getDefaultInstance()); + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public com.google.api.servicemanagement.v1.OperationMetadata.Step.Builder addStepsBuilder( + int index) { + return getStepsFieldBuilder() + .addBuilder( + index, + com.google.api.servicemanagement.v1.OperationMetadata.Step.getDefaultInstance()); + } + /** + * + * + *
+     * Detailed status information for each step. The order is undetermined.
+     * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + public java.util.List + getStepsBuilderList() { + return getStepsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.OperationMetadata.Step, + com.google.api.servicemanagement.v1.OperationMetadata.Step.Builder, + com.google.api.servicemanagement.v1.OperationMetadata.StepOrBuilder> + getStepsFieldBuilder() { + if (stepsBuilder_ == null) { + stepsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.api.servicemanagement.v1.OperationMetadata.Step, + com.google.api.servicemanagement.v1.OperationMetadata.Step.Builder, + com.google.api.servicemanagement.v1.OperationMetadata.StepOrBuilder>( + steps_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + steps_ = null; + } + return stepsBuilder_; + } + + private int progressPercentage_; + /** + * + * + *
+     * Percentage of completion of this operation, ranging from 0 to 100.
+     * 
+ * + * int32 progress_percentage = 3; + * + * @return The progressPercentage. + */ + @java.lang.Override + public int getProgressPercentage() { + return progressPercentage_; + } + /** + * + * + *
+     * Percentage of completion of this operation, ranging from 0 to 100.
+     * 
+ * + * int32 progress_percentage = 3; + * + * @param value The progressPercentage to set. + * @return This builder for chaining. + */ + public Builder setProgressPercentage(int value) { + + progressPercentage_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Percentage of completion of this operation, ranging from 0 to 100.
+     * 
+ * + * int32 progress_percentage = 3; + * + * @return This builder for chaining. + */ + public Builder clearProgressPercentage() { + + progressPercentage_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * The start time of the operation.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.OperationMetadata) + private static final com.google.api.servicemanagement.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.OperationMetadata(); + } + + public static com.google.api.servicemanagement.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/OperationMetadataOrBuilder.java new file mode 100644 index 0000000..08f1c09 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,180 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The full name of the resources that this operation is directly
+   * associated with.
+   * 
+ * + * repeated string resource_names = 1; + * + * @return A list containing the resourceNames. + */ + java.util.List getResourceNamesList(); + /** + * + * + *
+   * The full name of the resources that this operation is directly
+   * associated with.
+   * 
+ * + * repeated string resource_names = 1; + * + * @return The count of resourceNames. + */ + int getResourceNamesCount(); + /** + * + * + *
+   * The full name of the resources that this operation is directly
+   * associated with.
+   * 
+ * + * repeated string resource_names = 1; + * + * @param index The index of the element to return. + * @return The resourceNames at the given index. + */ + java.lang.String getResourceNames(int index); + /** + * + * + *
+   * The full name of the resources that this operation is directly
+   * associated with.
+   * 
+ * + * repeated string resource_names = 1; + * + * @param index The index of the value to return. + * @return The bytes of the resourceNames at the given index. + */ + com.google.protobuf.ByteString getResourceNamesBytes(int index); + + /** + * + * + *
+   * Detailed status information for each step. The order is undetermined.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + java.util.List getStepsList(); + /** + * + * + *
+   * Detailed status information for each step. The order is undetermined.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + com.google.api.servicemanagement.v1.OperationMetadata.Step getSteps(int index); + /** + * + * + *
+   * Detailed status information for each step. The order is undetermined.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + int getStepsCount(); + /** + * + * + *
+   * Detailed status information for each step. The order is undetermined.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + java.util.List + getStepsOrBuilderList(); + /** + * + * + *
+   * Detailed status information for each step. The order is undetermined.
+   * 
+ * + * repeated .google.api.servicemanagement.v1.OperationMetadata.Step steps = 2; + */ + com.google.api.servicemanagement.v1.OperationMetadata.StepOrBuilder getStepsOrBuilder(int index); + + /** + * + * + *
+   * Percentage of completion of this operation, ranging from 0 to 100.
+   * 
+ * + * int32 progress_percentage = 3; + * + * @return The progressPercentage. + */ + int getProgressPercentage(); + + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * The start time of the operation.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 4; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ResourcesProto.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ResourcesProto.java new file mode 100644 index 0000000..1dfd158 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ResourcesProto.java @@ -0,0 +1,291 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +public final class ResourcesProto { + private ResourcesProto() {} + + 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_api_servicemanagement_v1_ManagedService_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_ManagedService_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_OperationMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_OperationMetadata_Step_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_OperationMetadata_Step_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_Diagnostic_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_Diagnostic_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_ConfigSource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_ConfigSource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_ConfigFile_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_ConfigFile_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_ConfigRef_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_ConfigRef_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_ChangeReport_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_ChangeReport_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_Rollout_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_Rollout_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_PercentagesEntry_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_PercentagesEntry_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_Rollout_DeleteServiceStrategy_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_Rollout_DeleteServiceStrategy_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/api/servicemanagement/v1/resour" + + "ces.proto\022\037google.api.servicemanagement." + + "v1\032\034google/api/annotations.proto\032\036google" + + "/api/config_change.proto\032\037google/api/fie" + + "ld_behavior.proto\032\027google/api/metric.pro" + + "to\032\026google/api/quota.proto\032\030google/api/s" + + "ervice.proto\032#google/longrunning/operati" + + "ons.proto\032\031google/protobuf/any.proto\032 go" + + "ogle/protobuf/field_mask.proto\032\037google/p" + + "rotobuf/timestamp.proto\032\027google/rpc/stat" + + "us.proto\"C\n\016ManagedService\022\024\n\014service_na" + + "me\030\002 \001(\t\022\033\n\023producer_project_id\030\003 \001(\t\"\221\003" + + "\n\021OperationMetadata\022\026\n\016resource_names\030\001 " + + "\003(\t\022F\n\005steps\030\002 \003(\01327.google.api.servicem" + + "anagement.v1.OperationMetadata.Step\022\033\n\023p" + + "rogress_percentage\030\003 \001(\005\022.\n\nstart_time\030\004" + + " \001(\0132\032.google.protobuf.Timestamp\032f\n\004Step" + + "\022\023\n\013description\030\002 \001(\t\022I\n\006status\030\004 \001(\01629." + + "google.api.servicemanagement.v1.Operatio" + + "nMetadata.Status\"g\n\006Status\022\026\n\022STATUS_UNS" + + "PECIFIED\020\000\022\010\n\004DONE\020\001\022\017\n\013NOT_STARTED\020\002\022\017\n" + + "\013IN_PROGRESS\020\003\022\n\n\006FAILED\020\004\022\r\n\tCANCELLED\020" + + "\005\"\217\001\n\nDiagnostic\022\020\n\010location\030\001 \001(\t\022>\n\004ki" + + "nd\030\002 \001(\01620.google.api.servicemanagement." + + "v1.Diagnostic.Kind\022\017\n\007message\030\003 \001(\t\"\036\n\004K" + + "ind\022\013\n\007WARNING\020\000\022\t\n\005ERROR\020\001\"V\n\014ConfigSou" + + "rce\022\n\n\002id\030\005 \001(\t\022:\n\005files\030\002 \003(\0132+.google." + + "api.servicemanagement.v1.ConfigFile\"\225\002\n\n" + + "ConfigFile\022\021\n\tfile_path\030\001 \001(\t\022\025\n\rfile_co" + + "ntents\030\003 \001(\014\022G\n\tfile_type\030\004 \001(\01624.google" + + ".api.servicemanagement.v1.ConfigFile.Fil" + + "eType\"\223\001\n\010FileType\022\031\n\025FILE_TYPE_UNSPECIF" + + "IED\020\000\022\027\n\023SERVICE_CONFIG_YAML\020\001\022\021\n\rOPEN_A" + + "PI_JSON\020\002\022\021\n\rOPEN_API_YAML\020\003\022\035\n\031FILE_DES" + + "CRIPTOR_SET_PROTO\020\004\022\016\n\nPROTO_FILE\020\006\"\031\n\tC" + + "onfigRef\022\014\n\004name\030\001 \001(\t\"@\n\014ChangeReport\0220" + + "\n\016config_changes\030\001 \003(\0132\030.google.api.Conf" + + "igChange\"\371\005\n\007Rollout\022\027\n\nrollout_id\030\001 \001(\t" + + "B\003\340A\001\022/\n\013create_time\030\002 \001(\0132\032.google.prot" + + "obuf.Timestamp\022\022\n\ncreated_by\030\003 \001(\t\022F\n\006st" + + "atus\030\004 \001(\01626.google.api.servicemanagemen" + + "t.v1.Rollout.RolloutStatus\022c\n\030traffic_pe" + + "rcent_strategy\030\005 \001(\0132?.google.api.servic" + + "emanagement.v1.Rollout.TrafficPercentStr" + + "ategyH\000\022b\n\027delete_service_strategy\030\310\001 \001(" + + "\0132>.google.api.servicemanagement.v1.Roll" + + "out.DeleteServiceStrategyH\000\022\024\n\014service_n" + + "ame\030\010 \001(\t\032\263\001\n\026TrafficPercentStrategy\022e\n\013" + + "percentages\030\001 \003(\0132P.google.api.servicema" + + "nagement.v1.Rollout.TrafficPercentStrate" + + "gy.PercentagesEntry\0322\n\020PercentagesEntry\022" + + "\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\001:\0028\001\032\027\n\025Delet" + + "eServiceStrategy\"\215\001\n\rRolloutStatus\022\036\n\032RO" + + "LLOUT_STATUS_UNSPECIFIED\020\000\022\017\n\013IN_PROGRES" + + "S\020\001\022\013\n\007SUCCESS\020\002\022\r\n\tCANCELLED\020\003\022\n\n\006FAILE" + + "D\020\004\022\013\n\007PENDING\020\005\022\026\n\022FAILED_ROLLED_BACK\020\006" + + "B\n\n\010strategyB\377\001\n#com.google.api.servicem" + + "anagement.v1B\016ResourcesProtoP\001ZPgoogle.g" + + "olang.org/genproto/googleapis/api/servic" + + "emanagement/v1;servicemanagement\242\002\004GASM\252" + + "\002!Google.Cloud.ServiceManagement.V1\312\002!Go" + + "ogle\\Cloud\\ServiceManagement\\V1\352\002$Google" + + "::Cloud::ServiceManagement::V1b\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ConfigChangeProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.MetricProto.getDescriptor(), + com.google.api.QuotaProto.getDescriptor(), + com.google.api.ServiceProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_api_servicemanagement_v1_ManagedService_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_servicemanagement_v1_ManagedService_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_ManagedService_descriptor, + new java.lang.String[] { + "ServiceName", "ProducerProjectId", + }); + internal_static_google_api_servicemanagement_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_servicemanagement_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "ResourceNames", "Steps", "ProgressPercentage", "StartTime", + }); + internal_static_google_api_servicemanagement_v1_OperationMetadata_Step_descriptor = + internal_static_google_api_servicemanagement_v1_OperationMetadata_descriptor + .getNestedTypes() + .get(0); + internal_static_google_api_servicemanagement_v1_OperationMetadata_Step_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_OperationMetadata_Step_descriptor, + new java.lang.String[] { + "Description", "Status", + }); + internal_static_google_api_servicemanagement_v1_Diagnostic_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_api_servicemanagement_v1_Diagnostic_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_Diagnostic_descriptor, + new java.lang.String[] { + "Location", "Kind", "Message", + }); + internal_static_google_api_servicemanagement_v1_ConfigSource_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_api_servicemanagement_v1_ConfigSource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_ConfigSource_descriptor, + new java.lang.String[] { + "Id", "Files", + }); + internal_static_google_api_servicemanagement_v1_ConfigFile_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_api_servicemanagement_v1_ConfigFile_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_ConfigFile_descriptor, + new java.lang.String[] { + "FilePath", "FileContents", "FileType", + }); + internal_static_google_api_servicemanagement_v1_ConfigRef_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_api_servicemanagement_v1_ConfigRef_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_ConfigRef_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_api_servicemanagement_v1_ChangeReport_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_api_servicemanagement_v1_ChangeReport_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_ChangeReport_descriptor, + new java.lang.String[] { + "ConfigChanges", + }); + internal_static_google_api_servicemanagement_v1_Rollout_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_api_servicemanagement_v1_Rollout_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_Rollout_descriptor, + new java.lang.String[] { + "RolloutId", + "CreateTime", + "CreatedBy", + "Status", + "TrafficPercentStrategy", + "DeleteServiceStrategy", + "ServiceName", + "Strategy", + }); + internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_descriptor = + internal_static_google_api_servicemanagement_v1_Rollout_descriptor.getNestedTypes().get(0); + internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_descriptor, + new java.lang.String[] { + "Percentages", + }); + internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_PercentagesEntry_descriptor = + internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_descriptor + .getNestedTypes() + .get(0); + internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_PercentagesEntry_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_PercentagesEntry_descriptor, + new java.lang.String[] { + "Key", "Value", + }); + internal_static_google_api_servicemanagement_v1_Rollout_DeleteServiceStrategy_descriptor = + internal_static_google_api_servicemanagement_v1_Rollout_descriptor.getNestedTypes().get(1); + internal_static_google_api_servicemanagement_v1_Rollout_DeleteServiceStrategy_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_Rollout_DeleteServiceStrategy_descriptor, + new java.lang.String[] {}); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ConfigChangeProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.MetricProto.getDescriptor(); + com.google.api.QuotaProto.getDescriptor(); + com.google.api.ServiceProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/Rollout.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/Rollout.java new file mode 100644 index 0000000..ce3135d --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/Rollout.java @@ -0,0 +1,3913 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * A rollout resource that defines how service configuration versions are pushed
+ * to control plane systems. Typically, you create a new version of the
+ * service config, and then create a Rollout to push the service config.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.Rollout} + */ +public final class Rollout extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.Rollout) + RolloutOrBuilder { + private static final long serialVersionUID = 0L; + // Use Rollout.newBuilder() to construct. + private Rollout(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Rollout() { + rolloutId_ = ""; + createdBy_ = ""; + status_ = 0; + serviceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Rollout(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Rollout( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + rolloutId_ = s; + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + createdBy_ = s; + break; + } + case 32: + { + int rawValue = input.readEnum(); + + status_ = rawValue; + break; + } + case 42: + { + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.Builder + subBuilder = null; + if (strategyCase_ == 5) { + subBuilder = + ((com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) strategy_) + .toBuilder(); + } + strategy_ = + input.readMessage( + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) strategy_); + strategy_ = subBuilder.buildPartial(); + } + strategyCase_ = 5; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 1602: + { + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.Builder subBuilder = + null; + if (strategyCase_ == 200) { + subBuilder = + ((com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) strategy_) + .toBuilder(); + } + strategy_ = + input.readMessage( + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) strategy_); + strategy_ = subBuilder.buildPartial(); + } + strategyCase_ = 200; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.Rollout.class, + com.google.api.servicemanagement.v1.Rollout.Builder.class); + } + + /** + * + * + *
+   * Status of a Rollout.
+   * 
+ * + * Protobuf enum {@code google.api.servicemanagement.v1.Rollout.RolloutStatus} + */ + public enum RolloutStatus implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * No status specified.
+     * 
+ * + * ROLLOUT_STATUS_UNSPECIFIED = 0; + */ + ROLLOUT_STATUS_UNSPECIFIED(0), + /** + * + * + *
+     * The Rollout is in progress.
+     * 
+ * + * IN_PROGRESS = 1; + */ + IN_PROGRESS(1), + /** + * + * + *
+     * The Rollout has completed successfully.
+     * 
+ * + * SUCCESS = 2; + */ + SUCCESS(2), + /** + * + * + *
+     * The Rollout has been cancelled. This can happen if you have overlapping
+     * Rollout pushes, and the previous ones will be cancelled.
+     * 
+ * + * CANCELLED = 3; + */ + CANCELLED(3), + /** + * + * + *
+     * The Rollout has failed and the rollback attempt has failed too.
+     * 
+ * + * FAILED = 4; + */ + FAILED(4), + /** + * + * + *
+     * The Rollout has not started yet and is pending for execution.
+     * 
+ * + * PENDING = 5; + */ + PENDING(5), + /** + * + * + *
+     * The Rollout has failed and rolled back to the previous successful
+     * Rollout.
+     * 
+ * + * FAILED_ROLLED_BACK = 6; + */ + FAILED_ROLLED_BACK(6), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * No status specified.
+     * 
+ * + * ROLLOUT_STATUS_UNSPECIFIED = 0; + */ + public static final int ROLLOUT_STATUS_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The Rollout is in progress.
+     * 
+ * + * IN_PROGRESS = 1; + */ + public static final int IN_PROGRESS_VALUE = 1; + /** + * + * + *
+     * The Rollout has completed successfully.
+     * 
+ * + * SUCCESS = 2; + */ + public static final int SUCCESS_VALUE = 2; + /** + * + * + *
+     * The Rollout has been cancelled. This can happen if you have overlapping
+     * Rollout pushes, and the previous ones will be cancelled.
+     * 
+ * + * CANCELLED = 3; + */ + public static final int CANCELLED_VALUE = 3; + /** + * + * + *
+     * The Rollout has failed and the rollback attempt has failed too.
+     * 
+ * + * FAILED = 4; + */ + public static final int FAILED_VALUE = 4; + /** + * + * + *
+     * The Rollout has not started yet and is pending for execution.
+     * 
+ * + * PENDING = 5; + */ + public static final int PENDING_VALUE = 5; + /** + * + * + *
+     * The Rollout has failed and rolled back to the previous successful
+     * Rollout.
+     * 
+ * + * FAILED_ROLLED_BACK = 6; + */ + public static final int FAILED_ROLLED_BACK_VALUE = 6; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static RolloutStatus 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 RolloutStatus forNumber(int value) { + switch (value) { + case 0: + return ROLLOUT_STATUS_UNSPECIFIED; + case 1: + return IN_PROGRESS; + case 2: + return SUCCESS; + case 3: + return CANCELLED; + case 4: + return FAILED; + case 5: + return PENDING; + case 6: + return FAILED_ROLLED_BACK; + 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 RolloutStatus findValueByNumber(int number) { + return RolloutStatus.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.api.servicemanagement.v1.Rollout.getDescriptor().getEnumTypes().get(0); + } + + private static final RolloutStatus[] VALUES = values(); + + public static RolloutStatus 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 RolloutStatus(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.api.servicemanagement.v1.Rollout.RolloutStatus) + } + + public interface TrafficPercentStrategyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Maps service configuration IDs to their corresponding traffic percentage.
+     * Key is the service configuration ID, Value is the traffic percentage
+     * which must be greater than 0.0 and the sum must equal to 100.0.
+     * 
+ * + * map<string, double> percentages = 1; + */ + int getPercentagesCount(); + /** + * + * + *
+     * Maps service configuration IDs to their corresponding traffic percentage.
+     * Key is the service configuration ID, Value is the traffic percentage
+     * which must be greater than 0.0 and the sum must equal to 100.0.
+     * 
+ * + * map<string, double> percentages = 1; + */ + boolean containsPercentages(java.lang.String key); + /** Use {@link #getPercentagesMap()} instead. */ + @java.lang.Deprecated + java.util.Map getPercentages(); + /** + * + * + *
+     * Maps service configuration IDs to their corresponding traffic percentage.
+     * Key is the service configuration ID, Value is the traffic percentage
+     * which must be greater than 0.0 and the sum must equal to 100.0.
+     * 
+ * + * map<string, double> percentages = 1; + */ + java.util.Map getPercentagesMap(); + /** + * + * + *
+     * Maps service configuration IDs to their corresponding traffic percentage.
+     * Key is the service configuration ID, Value is the traffic percentage
+     * which must be greater than 0.0 and the sum must equal to 100.0.
+     * 
+ * + * map<string, double> percentages = 1; + */ + double getPercentagesOrDefault(java.lang.String key, double defaultValue); + /** + * + * + *
+     * Maps service configuration IDs to their corresponding traffic percentage.
+     * Key is the service configuration ID, Value is the traffic percentage
+     * which must be greater than 0.0 and the sum must equal to 100.0.
+     * 
+ * + * map<string, double> percentages = 1; + */ + double getPercentagesOrThrow(java.lang.String key); + } + /** + * + * + *
+   * Strategy that specifies how clients of Google Service Controller want to
+   * send traffic to use different config versions. This is generally
+   * used by API proxy to split traffic based on your configured percentage for
+   * each config version.
+   * One example of how to gradually rollout a new service configuration using
+   * this
+   * strategy:
+   * Day 1
+   *     Rollout {
+   *       id: "example.googleapis.com/rollout_20160206"
+   *       traffic_percent_strategy {
+   *         percentages: {
+   *           "example.googleapis.com/20160201": 70.00
+   *           "example.googleapis.com/20160206": 30.00
+   *         }
+   *       }
+   *     }
+   * Day 2
+   *     Rollout {
+   *       id: "example.googleapis.com/rollout_20160207"
+   *       traffic_percent_strategy: {
+   *         percentages: {
+   *           "example.googleapis.com/20160206": 100.00
+   *         }
+   *       }
+   *     }
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy} + */ + public static final class TrafficPercentStrategy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) + TrafficPercentStrategyOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrafficPercentStrategy.newBuilder() to construct. + private TrafficPercentStrategy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrafficPercentStrategy() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrafficPercentStrategy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TrafficPercentStrategy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + percentages_ = + com.google.protobuf.MapField.newMapField( + PercentagesDefaultEntryHolder.defaultEntry); + mutable_bitField0_ |= 0x00000001; + } + com.google.protobuf.MapEntry percentages__ = + input.readMessage( + PercentagesDefaultEntryHolder.defaultEntry.getParserForType(), + extensionRegistry); + percentages_.getMutableMap().put(percentages__.getKey(), percentages__.getValue()); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + @java.lang.Override + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetPercentages(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.class, + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.Builder.class); + } + + public static final int PERCENTAGES_FIELD_NUMBER = 1; + + private static final class PercentagesDefaultEntryHolder { + static final com.google.protobuf.MapEntry defaultEntry = + com.google.protobuf.MapEntry.newDefaultInstance( + com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_PercentagesEntry_descriptor, + com.google.protobuf.WireFormat.FieldType.STRING, + "", + com.google.protobuf.WireFormat.FieldType.DOUBLE, + 0D); + } + + private com.google.protobuf.MapField percentages_; + + private com.google.protobuf.MapField + internalGetPercentages() { + if (percentages_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PercentagesDefaultEntryHolder.defaultEntry); + } + return percentages_; + } + + public int getPercentagesCount() { + return internalGetPercentages().getMap().size(); + } + /** + * + * + *
+     * Maps service configuration IDs to their corresponding traffic percentage.
+     * Key is the service configuration ID, Value is the traffic percentage
+     * which must be greater than 0.0 and the sum must equal to 100.0.
+     * 
+ * + * map<string, double> percentages = 1; + */ + @java.lang.Override + public boolean containsPercentages(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetPercentages().getMap().containsKey(key); + } + /** Use {@link #getPercentagesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPercentages() { + return getPercentagesMap(); + } + /** + * + * + *
+     * Maps service configuration IDs to their corresponding traffic percentage.
+     * Key is the service configuration ID, Value is the traffic percentage
+     * which must be greater than 0.0 and the sum must equal to 100.0.
+     * 
+ * + * map<string, double> percentages = 1; + */ + @java.lang.Override + public java.util.Map getPercentagesMap() { + return internalGetPercentages().getMap(); + } + /** + * + * + *
+     * Maps service configuration IDs to their corresponding traffic percentage.
+     * Key is the service configuration ID, Value is the traffic percentage
+     * which must be greater than 0.0 and the sum must equal to 100.0.
+     * 
+ * + * map<string, double> percentages = 1; + */ + @java.lang.Override + public double getPercentagesOrDefault(java.lang.String key, double defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPercentages().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+     * Maps service configuration IDs to their corresponding traffic percentage.
+     * Key is the service configuration ID, Value is the traffic percentage
+     * which must be greater than 0.0 and the sum must equal to 100.0.
+     * 
+ * + * map<string, double> percentages = 1; + */ + @java.lang.Override + public double getPercentagesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPercentages().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + com.google.protobuf.GeneratedMessageV3.serializeStringMapTo( + output, internalGetPercentages(), PercentagesDefaultEntryHolder.defaultEntry, 1); + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + for (java.util.Map.Entry entry : + internalGetPercentages().getMap().entrySet()) { + com.google.protobuf.MapEntry percentages__ = + PercentagesDefaultEntryHolder.defaultEntry + .newBuilderForType() + .setKey(entry.getKey()) + .setValue(entry.getValue()) + .build(); + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, percentages__); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy other = + (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) obj; + + if (!internalGetPercentages().equals(other.internalGetPercentages())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (!internalGetPercentages().getMap().isEmpty()) { + hash = (37 * hash) + PERCENTAGES_FIELD_NUMBER; + hash = (53 * hash) + internalGetPercentages().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Strategy that specifies how clients of Google Service Controller want to
+     * send traffic to use different config versions. This is generally
+     * used by API proxy to split traffic based on your configured percentage for
+     * each config version.
+     * One example of how to gradually rollout a new service configuration using
+     * this
+     * strategy:
+     * Day 1
+     *     Rollout {
+     *       id: "example.googleapis.com/rollout_20160206"
+     *       traffic_percent_strategy {
+     *         percentages: {
+     *           "example.googleapis.com/20160201": 70.00
+     *           "example.googleapis.com/20160206": 30.00
+     *         }
+     *       }
+     *     }
+     * Day 2
+     *     Rollout {
+     *       id: "example.googleapis.com/rollout_20160207"
+     *       traffic_percent_strategy: {
+     *         percentages: {
+     *           "example.googleapis.com/20160206": 100.00
+     *         }
+     *       }
+     *     }
+     * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_descriptor; + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMapField(int number) { + switch (number) { + case 1: + return internalGetPercentages(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @SuppressWarnings({"rawtypes"}) + protected com.google.protobuf.MapField internalGetMutableMapField(int number) { + switch (number) { + case 1: + return internalGetMutablePercentages(); + default: + throw new RuntimeException("Invalid map field number: " + number); + } + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.class, + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.Builder.class); + } + + // Construct using + // com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + internalGetMutablePercentages().clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_TrafficPercentStrategy_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy build() { + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy buildPartial() { + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy result = + new com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy(this); + int from_bitField0_ = bitField0_; + result.percentages_ = internalGetPercentages(); + result.percentages_.makeImmutable(); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) { + return mergeFrom( + (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy other) { + if (other + == com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + .getDefaultInstance()) return this; + internalGetMutablePercentages().mergeFrom(other.internalGetPercentages()); + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.MapField percentages_; + + private com.google.protobuf.MapField + internalGetPercentages() { + if (percentages_ == null) { + return com.google.protobuf.MapField.emptyMapField( + PercentagesDefaultEntryHolder.defaultEntry); + } + return percentages_; + } + + private com.google.protobuf.MapField + internalGetMutablePercentages() { + onChanged(); + ; + if (percentages_ == null) { + percentages_ = + com.google.protobuf.MapField.newMapField(PercentagesDefaultEntryHolder.defaultEntry); + } + if (!percentages_.isMutable()) { + percentages_ = percentages_.copy(); + } + return percentages_; + } + + public int getPercentagesCount() { + return internalGetPercentages().getMap().size(); + } + /** + * + * + *
+       * Maps service configuration IDs to their corresponding traffic percentage.
+       * Key is the service configuration ID, Value is the traffic percentage
+       * which must be greater than 0.0 and the sum must equal to 100.0.
+       * 
+ * + * map<string, double> percentages = 1; + */ + @java.lang.Override + public boolean containsPercentages(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + return internalGetPercentages().getMap().containsKey(key); + } + /** Use {@link #getPercentagesMap()} instead. */ + @java.lang.Override + @java.lang.Deprecated + public java.util.Map getPercentages() { + return getPercentagesMap(); + } + /** + * + * + *
+       * Maps service configuration IDs to their corresponding traffic percentage.
+       * Key is the service configuration ID, Value is the traffic percentage
+       * which must be greater than 0.0 and the sum must equal to 100.0.
+       * 
+ * + * map<string, double> percentages = 1; + */ + @java.lang.Override + public java.util.Map getPercentagesMap() { + return internalGetPercentages().getMap(); + } + /** + * + * + *
+       * Maps service configuration IDs to their corresponding traffic percentage.
+       * Key is the service configuration ID, Value is the traffic percentage
+       * which must be greater than 0.0 and the sum must equal to 100.0.
+       * 
+ * + * map<string, double> percentages = 1; + */ + @java.lang.Override + public double getPercentagesOrDefault(java.lang.String key, double defaultValue) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPercentages().getMap(); + return map.containsKey(key) ? map.get(key) : defaultValue; + } + /** + * + * + *
+       * Maps service configuration IDs to their corresponding traffic percentage.
+       * Key is the service configuration ID, Value is the traffic percentage
+       * which must be greater than 0.0 and the sum must equal to 100.0.
+       * 
+ * + * map<string, double> percentages = 1; + */ + @java.lang.Override + public double getPercentagesOrThrow(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + java.util.Map map = internalGetPercentages().getMap(); + if (!map.containsKey(key)) { + throw new java.lang.IllegalArgumentException(); + } + return map.get(key); + } + + public Builder clearPercentages() { + internalGetMutablePercentages().getMutableMap().clear(); + return this; + } + /** + * + * + *
+       * Maps service configuration IDs to their corresponding traffic percentage.
+       * Key is the service configuration ID, Value is the traffic percentage
+       * which must be greater than 0.0 and the sum must equal to 100.0.
+       * 
+ * + * map<string, double> percentages = 1; + */ + public Builder removePercentages(java.lang.String key) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + internalGetMutablePercentages().getMutableMap().remove(key); + return this; + } + /** Use alternate mutation accessors instead. */ + @java.lang.Deprecated + public java.util.Map getMutablePercentages() { + return internalGetMutablePercentages().getMutableMap(); + } + /** + * + * + *
+       * Maps service configuration IDs to their corresponding traffic percentage.
+       * Key is the service configuration ID, Value is the traffic percentage
+       * which must be greater than 0.0 and the sum must equal to 100.0.
+       * 
+ * + * map<string, double> percentages = 1; + */ + public Builder putPercentages(java.lang.String key, double value) { + if (key == null) { + throw new java.lang.NullPointerException(); + } + + internalGetMutablePercentages().getMutableMap().put(key, value); + return this; + } + /** + * + * + *
+       * Maps service configuration IDs to their corresponding traffic percentage.
+       * Key is the service configuration ID, Value is the traffic percentage
+       * which must be greater than 0.0 and the sum must equal to 100.0.
+       * 
+ * + * map<string, double> percentages = 1; + */ + public Builder putAllPercentages(java.util.Map values) { + internalGetMutablePercentages().getMutableMap().putAll(values); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) + private static final com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy(); + } + + public static com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrafficPercentStrategy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TrafficPercentStrategy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface DeleteServiceStrategyOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) + com.google.protobuf.MessageOrBuilder {} + /** + * + * + *
+   * Strategy used to delete a service. This strategy is a placeholder only
+   * used by the system generated rollout to delete a service.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy} + */ + public static final class DeleteServiceStrategy extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) + DeleteServiceStrategyOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteServiceStrategy.newBuilder() to construct. + private DeleteServiceStrategy(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteServiceStrategy() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteServiceStrategy(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteServiceStrategy( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_DeleteServiceStrategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_DeleteServiceStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.class, + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.Builder.class); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy other = + (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) obj; + + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * Strategy used to delete a service. This strategy is a placeholder only
+     * used by the system generated rollout to delete a service.
+     * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategyOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_DeleteServiceStrategy_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_DeleteServiceStrategy_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.class, + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.Builder.class); + } + + // Construct using + // com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_DeleteServiceStrategy_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy build() { + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy buildPartial() { + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy result = + new com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy(this); + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) { + return mergeFrom( + (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy other) { + if (other + == com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + .getDefaultInstance()) return this; + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) + private static final com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy(); + } + + public static com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteServiceStrategy parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteServiceStrategy(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int strategyCase_ = 0; + private java.lang.Object strategy_; + + public enum StrategyCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + TRAFFIC_PERCENT_STRATEGY(5), + DELETE_SERVICE_STRATEGY(200), + STRATEGY_NOT_SET(0); + private final int value; + + private StrategyCase(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 StrategyCase valueOf(int value) { + return forNumber(value); + } + + public static StrategyCase forNumber(int value) { + switch (value) { + case 5: + return TRAFFIC_PERCENT_STRATEGY; + case 200: + return DELETE_SERVICE_STRATEGY; + case 0: + return STRATEGY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public StrategyCase getStrategyCase() { + return StrategyCase.forNumber(strategyCase_); + } + + public static final int ROLLOUT_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object rolloutId_; + /** + * + * + *
+   * Optional. Unique identifier of this Rollout. Must be no longer than 63 characters
+   * and only lower case letters, digits, '.', '_' and '-' are allowed.
+   * If not specified by client, the server will generate one. The generated id
+   * will have the form of <date><revision number>, where "date" is the create
+   * date in ISO 8601 format.  "revision number" is a monotonically increasing
+   * positive number that is reset every day for each service.
+   * An example of the generated rollout_id is '2016-02-16r1'
+   * 
+ * + * string rollout_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rolloutId. + */ + @java.lang.Override + public java.lang.String getRolloutId() { + java.lang.Object ref = rolloutId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Unique identifier of this Rollout. Must be no longer than 63 characters
+   * and only lower case letters, digits, '.', '_' and '-' are allowed.
+   * If not specified by client, the server will generate one. The generated id
+   * will have the form of <date><revision number>, where "date" is the create
+   * date in ISO 8601 format.  "revision number" is a monotonically increasing
+   * positive number that is reset every day for each service.
+   * An example of the generated rollout_id is '2016-02-16r1'
+   * 
+ * + * string rollout_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rolloutId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRolloutIdBytes() { + java.lang.Object ref = rolloutId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Creation time of the rollout. Readonly.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Creation time of the rollout. Readonly.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Creation time of the rollout. Readonly.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int CREATED_BY_FIELD_NUMBER = 3; + private volatile java.lang.Object createdBy_; + /** + * + * + *
+   * The user who created the Rollout. Readonly.
+   * 
+ * + * string created_by = 3; + * + * @return The createdBy. + */ + @java.lang.Override + public java.lang.String getCreatedBy() { + java.lang.Object ref = createdBy_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + createdBy_ = s; + return s; + } + } + /** + * + * + *
+   * The user who created the Rollout. Readonly.
+   * 
+ * + * string created_by = 3; + * + * @return The bytes for createdBy. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCreatedByBytes() { + java.lang.Object ref = createdBy_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + createdBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int STATUS_FIELD_NUMBER = 4; + private int status_; + /** + * + * + *
+   * The status of this rollout. Readonly. In case of a failed rollout,
+   * the system will automatically rollback to the current Rollout
+   * version. Readonly.
+   * 
+ * + * .google.api.servicemanagement.v1.Rollout.RolloutStatus status = 4; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+   * The status of this rollout. Readonly. In case of a failed rollout,
+   * the system will automatically rollback to the current Rollout
+   * version. Readonly.
+   * 
+ * + * .google.api.servicemanagement.v1.Rollout.RolloutStatus status = 4; + * + * @return The status. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.RolloutStatus getStatus() { + @SuppressWarnings("deprecation") + com.google.api.servicemanagement.v1.Rollout.RolloutStatus result = + com.google.api.servicemanagement.v1.Rollout.RolloutStatus.valueOf(status_); + return result == null + ? com.google.api.servicemanagement.v1.Rollout.RolloutStatus.UNRECOGNIZED + : result; + } + + public static final int TRAFFIC_PERCENT_STRATEGY_FIELD_NUMBER = 5; + /** + * + * + *
+   * Google Service Control selects service configurations based on
+   * traffic percentage.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + * + * @return Whether the trafficPercentStrategy field is set. + */ + @java.lang.Override + public boolean hasTrafficPercentStrategy() { + return strategyCase_ == 5; + } + /** + * + * + *
+   * Google Service Control selects service configurations based on
+   * traffic percentage.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + * + * @return The trafficPercentStrategy. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + getTrafficPercentStrategy() { + if (strategyCase_ == 5) { + return (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) strategy_; + } + return com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.getDefaultInstance(); + } + /** + * + * + *
+   * Google Service Control selects service configurations based on
+   * traffic percentage.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategyOrBuilder + getTrafficPercentStrategyOrBuilder() { + if (strategyCase_ == 5) { + return (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) strategy_; + } + return com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.getDefaultInstance(); + } + + public static final int DELETE_SERVICE_STRATEGY_FIELD_NUMBER = 200; + /** + * + * + *
+   * The strategy associated with a rollout to delete a `ManagedService`.
+   * Readonly.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + * + * @return Whether the deleteServiceStrategy field is set. + */ + @java.lang.Override + public boolean hasDeleteServiceStrategy() { + return strategyCase_ == 200; + } + /** + * + * + *
+   * The strategy associated with a rollout to delete a `ManagedService`.
+   * Readonly.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + * + * @return The deleteServiceStrategy. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + getDeleteServiceStrategy() { + if (strategyCase_ == 200) { + return (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) strategy_; + } + return com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.getDefaultInstance(); + } + /** + * + * + *
+   * The strategy associated with a rollout to delete a `ManagedService`.
+   * Readonly.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategyOrBuilder + getDeleteServiceStrategyOrBuilder() { + if (strategyCase_ == 200) { + return (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) strategy_; + } + return com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.getDefaultInstance(); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 8; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * The name of the service associated with this Rollout.
+   * 
+ * + * string service_name = 8; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the service associated with this Rollout.
+   * 
+ * + * string service_name = 8; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = 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 (!getRolloutIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, rolloutId_); + } + if (createTime_ != null) { + output.writeMessage(2, getCreateTime()); + } + if (!getCreatedByBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, createdBy_); + } + if (status_ + != com.google.api.servicemanagement.v1.Rollout.RolloutStatus.ROLLOUT_STATUS_UNSPECIFIED + .getNumber()) { + output.writeEnum(4, status_); + } + if (strategyCase_ == 5) { + output.writeMessage( + 5, (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) strategy_); + } + if (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, serviceName_); + } + if (strategyCase_ == 200) { + output.writeMessage( + 200, (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) strategy_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getRolloutIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, rolloutId_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); + } + if (!getCreatedByBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, createdBy_); + } + if (status_ + != com.google.api.servicemanagement.v1.Rollout.RolloutStatus.ROLLOUT_STATUS_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, status_); + } + if (strategyCase_ == 5) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 5, (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) strategy_); + } + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, serviceName_); + } + if (strategyCase_ == 200) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 200, (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) strategy_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.Rollout)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.Rollout other = + (com.google.api.servicemanagement.v1.Rollout) obj; + + if (!getRolloutId().equals(other.getRolloutId())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (!getCreatedBy().equals(other.getCreatedBy())) return false; + if (status_ != other.status_) return false; + if (!getServiceName().equals(other.getServiceName())) return false; + if (!getStrategyCase().equals(other.getStrategyCase())) return false; + switch (strategyCase_) { + case 5: + if (!getTrafficPercentStrategy().equals(other.getTrafficPercentStrategy())) return false; + break; + case 200: + if (!getDeleteServiceStrategy().equals(other.getDeleteServiceStrategy())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ROLLOUT_ID_FIELD_NUMBER; + hash = (53 * hash) + getRolloutId().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + hash = (37 * hash) + CREATED_BY_FIELD_NUMBER; + hash = (53 * hash) + getCreatedBy().hashCode(); + hash = (37 * hash) + STATUS_FIELD_NUMBER; + hash = (53 * hash) + status_; + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + switch (strategyCase_) { + case 5: + hash = (37 * hash) + TRAFFIC_PERCENT_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + getTrafficPercentStrategy().hashCode(); + break; + case 200: + hash = (37 * hash) + DELETE_SERVICE_STRATEGY_FIELD_NUMBER; + hash = (53 * hash) + getDeleteServiceStrategy().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.Rollout parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Rollout parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Rollout parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.Rollout parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Rollout parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Rollout parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.Rollout parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.Rollout parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.api.servicemanagement.v1.Rollout prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * A rollout resource that defines how service configuration versions are pushed
+   * to control plane systems. Typically, you create a new version of the
+   * service config, and then create a Rollout to push the service config.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.Rollout} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.Rollout) + com.google.api.servicemanagement.v1.RolloutOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.Rollout.class, + com.google.api.servicemanagement.v1.Rollout.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.Rollout.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + rolloutId_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + createdBy_ = ""; + + status_ = 0; + + serviceName_ = ""; + + strategyCase_ = 0; + strategy_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ResourcesProto + .internal_static_google_api_servicemanagement_v1_Rollout_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.Rollout.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout build() { + com.google.api.servicemanagement.v1.Rollout result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout buildPartial() { + com.google.api.servicemanagement.v1.Rollout result = + new com.google.api.servicemanagement.v1.Rollout(this); + result.rolloutId_ = rolloutId_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + result.createdBy_ = createdBy_; + result.status_ = status_; + if (strategyCase_ == 5) { + if (trafficPercentStrategyBuilder_ == null) { + result.strategy_ = strategy_; + } else { + result.strategy_ = trafficPercentStrategyBuilder_.build(); + } + } + if (strategyCase_ == 200) { + if (deleteServiceStrategyBuilder_ == null) { + result.strategy_ = strategy_; + } else { + result.strategy_ = deleteServiceStrategyBuilder_.build(); + } + } + result.serviceName_ = serviceName_; + result.strategyCase_ = strategyCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.Rollout) { + return mergeFrom((com.google.api.servicemanagement.v1.Rollout) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.Rollout other) { + if (other == com.google.api.servicemanagement.v1.Rollout.getDefaultInstance()) return this; + if (!other.getRolloutId().isEmpty()) { + rolloutId_ = other.rolloutId_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (!other.getCreatedBy().isEmpty()) { + createdBy_ = other.createdBy_; + onChanged(); + } + if (other.status_ != 0) { + setStatusValue(other.getStatusValue()); + } + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + switch (other.getStrategyCase()) { + case TRAFFIC_PERCENT_STRATEGY: + { + mergeTrafficPercentStrategy(other.getTrafficPercentStrategy()); + break; + } + case DELETE_SERVICE_STRATEGY: + { + mergeDeleteServiceStrategy(other.getDeleteServiceStrategy()); + break; + } + case STRATEGY_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.Rollout parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.api.servicemanagement.v1.Rollout) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int strategyCase_ = 0; + private java.lang.Object strategy_; + + public StrategyCase getStrategyCase() { + return StrategyCase.forNumber(strategyCase_); + } + + public Builder clearStrategy() { + strategyCase_ = 0; + strategy_ = null; + onChanged(); + return this; + } + + private java.lang.Object rolloutId_ = ""; + /** + * + * + *
+     * Optional. Unique identifier of this Rollout. Must be no longer than 63 characters
+     * and only lower case letters, digits, '.', '_' and '-' are allowed.
+     * If not specified by client, the server will generate one. The generated id
+     * will have the form of <date><revision number>, where "date" is the create
+     * date in ISO 8601 format.  "revision number" is a monotonically increasing
+     * positive number that is reset every day for each service.
+     * An example of the generated rollout_id is '2016-02-16r1'
+     * 
+ * + * string rollout_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rolloutId. + */ + public java.lang.String getRolloutId() { + java.lang.Object ref = rolloutId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + rolloutId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Unique identifier of this Rollout. Must be no longer than 63 characters
+     * and only lower case letters, digits, '.', '_' and '-' are allowed.
+     * If not specified by client, the server will generate one. The generated id
+     * will have the form of <date><revision number>, where "date" is the create
+     * date in ISO 8601 format.  "revision number" is a monotonically increasing
+     * positive number that is reset every day for each service.
+     * An example of the generated rollout_id is '2016-02-16r1'
+     * 
+ * + * string rollout_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rolloutId. + */ + public com.google.protobuf.ByteString getRolloutIdBytes() { + java.lang.Object ref = rolloutId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + rolloutId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Unique identifier of this Rollout. Must be no longer than 63 characters
+     * and only lower case letters, digits, '.', '_' and '-' are allowed.
+     * If not specified by client, the server will generate one. The generated id
+     * will have the form of <date><revision number>, where "date" is the create
+     * date in ISO 8601 format.  "revision number" is a monotonically increasing
+     * positive number that is reset every day for each service.
+     * An example of the generated rollout_id is '2016-02-16r1'
+     * 
+ * + * string rollout_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The rolloutId to set. + * @return This builder for chaining. + */ + public Builder setRolloutId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + rolloutId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Unique identifier of this Rollout. Must be no longer than 63 characters
+     * and only lower case letters, digits, '.', '_' and '-' are allowed.
+     * If not specified by client, the server will generate one. The generated id
+     * will have the form of <date><revision number>, where "date" is the create
+     * date in ISO 8601 format.  "revision number" is a monotonically increasing
+     * positive number that is reset every day for each service.
+     * An example of the generated rollout_id is '2016-02-16r1'
+     * 
+ * + * string rollout_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRolloutId() { + + rolloutId_ = getDefaultInstance().getRolloutId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Unique identifier of this Rollout. Must be no longer than 63 characters
+     * and only lower case letters, digits, '.', '_' and '-' are allowed.
+     * If not specified by client, the server will generate one. The generated id
+     * will have the form of <date><revision number>, where "date" is the create
+     * date in ISO 8601 format.  "revision number" is a monotonically increasing
+     * positive number that is reset every day for each service.
+     * An example of the generated rollout_id is '2016-02-16r1'
+     * 
+ * + * string rollout_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for rolloutId to set. + * @return This builder for chaining. + */ + public Builder setRolloutIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + rolloutId_ = 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_; + /** + * + * + *
+     * Creation time of the rollout. Readonly.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Creation time of the rollout. Readonly.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @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(); + } + } + /** + * + * + *
+     * Creation time of the rollout. Readonly.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + 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; + } + /** + * + * + *
+     * Creation time of the rollout. Readonly.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Creation time of the rollout. Readonly.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + 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; + } + /** + * + * + *
+     * Creation time of the rollout. Readonly.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Creation time of the rollout. Readonly.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Creation time of the rollout. Readonly.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Creation time of the rollout. Readonly.
+     * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + 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 java.lang.Object createdBy_ = ""; + /** + * + * + *
+     * The user who created the Rollout. Readonly.
+     * 
+ * + * string created_by = 3; + * + * @return The createdBy. + */ + public java.lang.String getCreatedBy() { + java.lang.Object ref = createdBy_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + createdBy_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The user who created the Rollout. Readonly.
+     * 
+ * + * string created_by = 3; + * + * @return The bytes for createdBy. + */ + public com.google.protobuf.ByteString getCreatedByBytes() { + java.lang.Object ref = createdBy_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + createdBy_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The user who created the Rollout. Readonly.
+     * 
+ * + * string created_by = 3; + * + * @param value The createdBy to set. + * @return This builder for chaining. + */ + public Builder setCreatedBy(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + createdBy_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The user who created the Rollout. Readonly.
+     * 
+ * + * string created_by = 3; + * + * @return This builder for chaining. + */ + public Builder clearCreatedBy() { + + createdBy_ = getDefaultInstance().getCreatedBy(); + onChanged(); + return this; + } + /** + * + * + *
+     * The user who created the Rollout. Readonly.
+     * 
+ * + * string created_by = 3; + * + * @param value The bytes for createdBy to set. + * @return This builder for chaining. + */ + public Builder setCreatedByBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + createdBy_ = value; + onChanged(); + return this; + } + + private int status_ = 0; + /** + * + * + *
+     * The status of this rollout. Readonly. In case of a failed rollout,
+     * the system will automatically rollback to the current Rollout
+     * version. Readonly.
+     * 
+ * + * .google.api.servicemanagement.v1.Rollout.RolloutStatus status = 4; + * + * @return The enum numeric value on the wire for status. + */ + @java.lang.Override + public int getStatusValue() { + return status_; + } + /** + * + * + *
+     * The status of this rollout. Readonly. In case of a failed rollout,
+     * the system will automatically rollback to the current Rollout
+     * version. Readonly.
+     * 
+ * + * .google.api.servicemanagement.v1.Rollout.RolloutStatus status = 4; + * + * @param value The enum numeric value on the wire for status to set. + * @return This builder for chaining. + */ + public Builder setStatusValue(int value) { + + status_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The status of this rollout. Readonly. In case of a failed rollout,
+     * the system will automatically rollback to the current Rollout
+     * version. Readonly.
+     * 
+ * + * .google.api.servicemanagement.v1.Rollout.RolloutStatus status = 4; + * + * @return The status. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.RolloutStatus getStatus() { + @SuppressWarnings("deprecation") + com.google.api.servicemanagement.v1.Rollout.RolloutStatus result = + com.google.api.servicemanagement.v1.Rollout.RolloutStatus.valueOf(status_); + return result == null + ? com.google.api.servicemanagement.v1.Rollout.RolloutStatus.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The status of this rollout. Readonly. In case of a failed rollout,
+     * the system will automatically rollback to the current Rollout
+     * version. Readonly.
+     * 
+ * + * .google.api.servicemanagement.v1.Rollout.RolloutStatus status = 4; + * + * @param value The status to set. + * @return This builder for chaining. + */ + public Builder setStatus(com.google.api.servicemanagement.v1.Rollout.RolloutStatus value) { + if (value == null) { + throw new NullPointerException(); + } + + status_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The status of this rollout. Readonly. In case of a failed rollout,
+     * the system will automatically rollback to the current Rollout
+     * version. Readonly.
+     * 
+ * + * .google.api.servicemanagement.v1.Rollout.RolloutStatus status = 4; + * + * @return This builder for chaining. + */ + public Builder clearStatus() { + + status_ = 0; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy, + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.Builder, + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategyOrBuilder> + trafficPercentStrategyBuilder_; + /** + * + * + *
+     * Google Service Control selects service configurations based on
+     * traffic percentage.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + * + * @return Whether the trafficPercentStrategy field is set. + */ + @java.lang.Override + public boolean hasTrafficPercentStrategy() { + return strategyCase_ == 5; + } + /** + * + * + *
+     * Google Service Control selects service configurations based on
+     * traffic percentage.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + * + * @return The trafficPercentStrategy. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + getTrafficPercentStrategy() { + if (trafficPercentStrategyBuilder_ == null) { + if (strategyCase_ == 5) { + return (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) strategy_; + } + return com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + .getDefaultInstance(); + } else { + if (strategyCase_ == 5) { + return trafficPercentStrategyBuilder_.getMessage(); + } + return com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Google Service Control selects service configurations based on
+     * traffic percentage.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + */ + public Builder setTrafficPercentStrategy( + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy value) { + if (trafficPercentStrategyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + strategy_ = value; + onChanged(); + } else { + trafficPercentStrategyBuilder_.setMessage(value); + } + strategyCase_ = 5; + return this; + } + /** + * + * + *
+     * Google Service Control selects service configurations based on
+     * traffic percentage.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + */ + public Builder setTrafficPercentStrategy( + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.Builder + builderForValue) { + if (trafficPercentStrategyBuilder_ == null) { + strategy_ = builderForValue.build(); + onChanged(); + } else { + trafficPercentStrategyBuilder_.setMessage(builderForValue.build()); + } + strategyCase_ = 5; + return this; + } + /** + * + * + *
+     * Google Service Control selects service configurations based on
+     * traffic percentage.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + */ + public Builder mergeTrafficPercentStrategy( + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy value) { + if (trafficPercentStrategyBuilder_ == null) { + if (strategyCase_ == 5 + && strategy_ + != com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + .getDefaultInstance()) { + strategy_ = + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.newBuilder( + (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) + strategy_) + .mergeFrom(value) + .buildPartial(); + } else { + strategy_ = value; + } + onChanged(); + } else { + if (strategyCase_ == 5) { + trafficPercentStrategyBuilder_.mergeFrom(value); + } + trafficPercentStrategyBuilder_.setMessage(value); + } + strategyCase_ = 5; + return this; + } + /** + * + * + *
+     * Google Service Control selects service configurations based on
+     * traffic percentage.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + */ + public Builder clearTrafficPercentStrategy() { + if (trafficPercentStrategyBuilder_ == null) { + if (strategyCase_ == 5) { + strategyCase_ = 0; + strategy_ = null; + onChanged(); + } + } else { + if (strategyCase_ == 5) { + strategyCase_ = 0; + strategy_ = null; + } + trafficPercentStrategyBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Google Service Control selects service configurations based on
+     * traffic percentage.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + */ + public com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.Builder + getTrafficPercentStrategyBuilder() { + return getTrafficPercentStrategyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Google Service Control selects service configurations based on
+     * traffic percentage.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategyOrBuilder + getTrafficPercentStrategyOrBuilder() { + if ((strategyCase_ == 5) && (trafficPercentStrategyBuilder_ != null)) { + return trafficPercentStrategyBuilder_.getMessageOrBuilder(); + } else { + if (strategyCase_ == 5) { + return (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) strategy_; + } + return com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + .getDefaultInstance(); + } + } + /** + * + * + *
+     * Google Service Control selects service configurations based on
+     * traffic percentage.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy, + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.Builder, + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategyOrBuilder> + getTrafficPercentStrategyFieldBuilder() { + if (trafficPercentStrategyBuilder_ == null) { + if (!(strategyCase_ == 5)) { + strategy_ = + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy + .getDefaultInstance(); + } + trafficPercentStrategyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy, + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy.Builder, + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategyOrBuilder>( + (com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy) strategy_, + getParentForChildren(), + isClean()); + strategy_ = null; + } + strategyCase_ = 5; + onChanged(); + ; + return trafficPercentStrategyBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy, + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.Builder, + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategyOrBuilder> + deleteServiceStrategyBuilder_; + /** + * + * + *
+     * The strategy associated with a rollout to delete a `ManagedService`.
+     * Readonly.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + * + * @return Whether the deleteServiceStrategy field is set. + */ + @java.lang.Override + public boolean hasDeleteServiceStrategy() { + return strategyCase_ == 200; + } + /** + * + * + *
+     * The strategy associated with a rollout to delete a `ManagedService`.
+     * Readonly.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + * + * @return The deleteServiceStrategy. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + getDeleteServiceStrategy() { + if (deleteServiceStrategyBuilder_ == null) { + if (strategyCase_ == 200) { + return (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) strategy_; + } + return com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + .getDefaultInstance(); + } else { + if (strategyCase_ == 200) { + return deleteServiceStrategyBuilder_.getMessage(); + } + return com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The strategy associated with a rollout to delete a `ManagedService`.
+     * Readonly.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + */ + public Builder setDeleteServiceStrategy( + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy value) { + if (deleteServiceStrategyBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + strategy_ = value; + onChanged(); + } else { + deleteServiceStrategyBuilder_.setMessage(value); + } + strategyCase_ = 200; + return this; + } + /** + * + * + *
+     * The strategy associated with a rollout to delete a `ManagedService`.
+     * Readonly.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + */ + public Builder setDeleteServiceStrategy( + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.Builder builderForValue) { + if (deleteServiceStrategyBuilder_ == null) { + strategy_ = builderForValue.build(); + onChanged(); + } else { + deleteServiceStrategyBuilder_.setMessage(builderForValue.build()); + } + strategyCase_ = 200; + return this; + } + /** + * + * + *
+     * The strategy associated with a rollout to delete a `ManagedService`.
+     * Readonly.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + */ + public Builder mergeDeleteServiceStrategy( + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy value) { + if (deleteServiceStrategyBuilder_ == null) { + if (strategyCase_ == 200 + && strategy_ + != com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + .getDefaultInstance()) { + strategy_ = + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.newBuilder( + (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) strategy_) + .mergeFrom(value) + .buildPartial(); + } else { + strategy_ = value; + } + onChanged(); + } else { + if (strategyCase_ == 200) { + deleteServiceStrategyBuilder_.mergeFrom(value); + } + deleteServiceStrategyBuilder_.setMessage(value); + } + strategyCase_ = 200; + return this; + } + /** + * + * + *
+     * The strategy associated with a rollout to delete a `ManagedService`.
+     * Readonly.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + */ + public Builder clearDeleteServiceStrategy() { + if (deleteServiceStrategyBuilder_ == null) { + if (strategyCase_ == 200) { + strategyCase_ = 0; + strategy_ = null; + onChanged(); + } + } else { + if (strategyCase_ == 200) { + strategyCase_ = 0; + strategy_ = null; + } + deleteServiceStrategyBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The strategy associated with a rollout to delete a `ManagedService`.
+     * Readonly.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + */ + public com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.Builder + getDeleteServiceStrategyBuilder() { + return getDeleteServiceStrategyFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The strategy associated with a rollout to delete a `ManagedService`.
+     * Readonly.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategyOrBuilder + getDeleteServiceStrategyOrBuilder() { + if ((strategyCase_ == 200) && (deleteServiceStrategyBuilder_ != null)) { + return deleteServiceStrategyBuilder_.getMessageOrBuilder(); + } else { + if (strategyCase_ == 200) { + return (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) strategy_; + } + return com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + .getDefaultInstance(); + } + } + /** + * + * + *
+     * The strategy associated with a rollout to delete a `ManagedService`.
+     * Readonly.
+     * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy, + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.Builder, + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategyOrBuilder> + getDeleteServiceStrategyFieldBuilder() { + if (deleteServiceStrategyBuilder_ == null) { + if (!(strategyCase_ == 200)) { + strategy_ = + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy + .getDefaultInstance(); + } + deleteServiceStrategyBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy, + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy.Builder, + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategyOrBuilder>( + (com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy) strategy_, + getParentForChildren(), + isClean()); + strategy_ = null; + } + strategyCase_ = 200; + onChanged(); + ; + return deleteServiceStrategyBuilder_; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * The name of the service associated with this Rollout.
+     * 
+ * + * string service_name = 8; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the service associated with this Rollout.
+     * 
+ * + * string service_name = 8; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the service associated with this Rollout.
+     * 
+ * + * string service_name = 8; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the service associated with this Rollout.
+     * 
+ * + * string service_name = 8; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the service associated with this Rollout.
+     * 
+ * + * string service_name = 8; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = 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.api.servicemanagement.v1.Rollout) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.Rollout) + private static final com.google.api.servicemanagement.v1.Rollout DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.Rollout(); + } + + public static com.google.api.servicemanagement.v1.Rollout getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Rollout parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Rollout(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.Rollout getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/RolloutOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/RolloutOrBuilder.java new file mode 100644 index 0000000..8c53f33 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/RolloutOrBuilder.java @@ -0,0 +1,268 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/resources.proto + +package com.google.api.servicemanagement.v1; + +public interface RolloutOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.Rollout) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Optional. Unique identifier of this Rollout. Must be no longer than 63 characters
+   * and only lower case letters, digits, '.', '_' and '-' are allowed.
+   * If not specified by client, the server will generate one. The generated id
+   * will have the form of <date><revision number>, where "date" is the create
+   * date in ISO 8601 format.  "revision number" is a monotonically increasing
+   * positive number that is reset every day for each service.
+   * An example of the generated rollout_id is '2016-02-16r1'
+   * 
+ * + * string rollout_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The rolloutId. + */ + java.lang.String getRolloutId(); + /** + * + * + *
+   * Optional. Unique identifier of this Rollout. Must be no longer than 63 characters
+   * and only lower case letters, digits, '.', '_' and '-' are allowed.
+   * If not specified by client, the server will generate one. The generated id
+   * will have the form of <date><revision number>, where "date" is the create
+   * date in ISO 8601 format.  "revision number" is a monotonically increasing
+   * positive number that is reset every day for each service.
+   * An example of the generated rollout_id is '2016-02-16r1'
+   * 
+ * + * string rollout_id = 1 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for rolloutId. + */ + com.google.protobuf.ByteString getRolloutIdBytes(); + + /** + * + * + *
+   * Creation time of the rollout. Readonly.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Creation time of the rollout. Readonly.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Creation time of the rollout. Readonly.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * The user who created the Rollout. Readonly.
+   * 
+ * + * string created_by = 3; + * + * @return The createdBy. + */ + java.lang.String getCreatedBy(); + /** + * + * + *
+   * The user who created the Rollout. Readonly.
+   * 
+ * + * string created_by = 3; + * + * @return The bytes for createdBy. + */ + com.google.protobuf.ByteString getCreatedByBytes(); + + /** + * + * + *
+   * The status of this rollout. Readonly. In case of a failed rollout,
+   * the system will automatically rollback to the current Rollout
+   * version. Readonly.
+   * 
+ * + * .google.api.servicemanagement.v1.Rollout.RolloutStatus status = 4; + * + * @return The enum numeric value on the wire for status. + */ + int getStatusValue(); + /** + * + * + *
+   * The status of this rollout. Readonly. In case of a failed rollout,
+   * the system will automatically rollback to the current Rollout
+   * version. Readonly.
+   * 
+ * + * .google.api.servicemanagement.v1.Rollout.RolloutStatus status = 4; + * + * @return The status. + */ + com.google.api.servicemanagement.v1.Rollout.RolloutStatus getStatus(); + + /** + * + * + *
+   * Google Service Control selects service configurations based on
+   * traffic percentage.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + * + * @return Whether the trafficPercentStrategy field is set. + */ + boolean hasTrafficPercentStrategy(); + /** + * + * + *
+   * Google Service Control selects service configurations based on
+   * traffic percentage.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + * + * @return The trafficPercentStrategy. + */ + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy getTrafficPercentStrategy(); + /** + * + * + *
+   * Google Service Control selects service configurations based on
+   * traffic percentage.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.TrafficPercentStrategy traffic_percent_strategy = 5; + * + */ + com.google.api.servicemanagement.v1.Rollout.TrafficPercentStrategyOrBuilder + getTrafficPercentStrategyOrBuilder(); + + /** + * + * + *
+   * The strategy associated with a rollout to delete a `ManagedService`.
+   * Readonly.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + * + * @return Whether the deleteServiceStrategy field is set. + */ + boolean hasDeleteServiceStrategy(); + /** + * + * + *
+   * The strategy associated with a rollout to delete a `ManagedService`.
+   * Readonly.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + * + * @return The deleteServiceStrategy. + */ + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy getDeleteServiceStrategy(); + /** + * + * + *
+   * The strategy associated with a rollout to delete a `ManagedService`.
+   * Readonly.
+   * 
+ * + * + * .google.api.servicemanagement.v1.Rollout.DeleteServiceStrategy delete_service_strategy = 200; + * + */ + com.google.api.servicemanagement.v1.Rollout.DeleteServiceStrategyOrBuilder + getDeleteServiceStrategyOrBuilder(); + + /** + * + * + *
+   * The name of the service associated with this Rollout.
+   * 
+ * + * string service_name = 8; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * The name of the service associated with this Rollout.
+   * 
+ * + * string service_name = 8; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + public com.google.api.servicemanagement.v1.Rollout.StrategyCase getStrategyCase(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ServiceManagerProto.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ServiceManagerProto.java new file mode 100644 index 0000000..eab0d76 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/ServiceManagerProto.java @@ -0,0 +1,518 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public final class ServiceManagerProto { + private ServiceManagerProto() {} + + 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_api_servicemanagement_v1_ListServicesRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_ListServicesRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_ListServicesResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_ListServicesResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_GetServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_GetServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_CreateServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_CreateServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_DeleteServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_DeleteServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_UndeleteServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_UndeleteServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_UndeleteServiceResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_UndeleteServiceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_GetServiceConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_GetServiceConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_ListServiceConfigsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_ListServiceConfigsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_ListServiceConfigsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_ListServiceConfigsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_CreateServiceConfigRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_CreateServiceConfigRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_SubmitConfigSourceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_SubmitConfigSourceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_SubmitConfigSourceResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_SubmitConfigSourceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_CreateServiceRolloutRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_CreateServiceRolloutRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_ListServiceRolloutsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_ListServiceRolloutsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_ListServiceRolloutsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_ListServiceRolloutsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_GetServiceRolloutRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_GetServiceRolloutRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_EnableServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_EnableServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_EnableServiceResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_EnableServiceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_DisableServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_DisableServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_DisableServiceResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_DisableServiceResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_GenerateConfigReportRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_GenerateConfigReportRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_api_servicemanagement_v1_GenerateConfigReportResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_api_servicemanagement_v1_GenerateConfigReportResponse_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n4google/api/servicemanagement/v1/servic" + + "emanager.proto\022\037google.api.servicemanage" + + "ment.v1\032\034google/api/annotations.proto\032\027g" + + "oogle/api/client.proto\032\037google/api/field" + + "_behavior.proto\032\030google/api/service.prot" + + "o\032/google/api/servicemanagement/v1/resou" + + "rces.proto\032#google/longrunning/operation" + + "s.proto\032\031google/protobuf/any.proto\032 goog" + + "le/protobuf/field_mask.proto\032\027google/rpc" + + "/status.proto\"r\n\023ListServicesRequest\022\033\n\023" + + "producer_project_id\030\001 \001(\t\022\021\n\tpage_size\030\005" + + " \001(\005\022\022\n\npage_token\030\006 \001(\t\022\027\n\013consumer_id\030" + + "\007 \001(\tB\002\030\001\"r\n\024ListServicesResponse\022A\n\010ser" + + "vices\030\001 \003(\0132/.google.api.servicemanageme" + + "nt.v1.ManagedService\022\027\n\017next_page_token\030" + + "\002 \001(\t\".\n\021GetServiceRequest\022\031\n\014service_na" + + "me\030\001 \001(\tB\003\340A\002\"]\n\024CreateServiceRequest\022E\n" + + "\007service\030\001 \001(\0132/.google.api.servicemanag" + + "ement.v1.ManagedServiceB\003\340A\002\"1\n\024DeleteSe" + + "rviceRequest\022\031\n\014service_name\030\001 \001(\tB\003\340A\002\"" + + "3\n\026UndeleteServiceRequest\022\031\n\014service_nam" + + "e\030\001 \001(\tB\003\340A\002\"[\n\027UndeleteServiceResponse\022" + + "@\n\007service\030\001 \001(\0132/.google.api.serviceman" + + "agement.v1.ManagedService\"\302\001\n\027GetService" + + "ConfigRequest\022\031\n\014service_name\030\001 \001(\tB\003\340A\002" + + "\022\026\n\tconfig_id\030\002 \001(\tB\003\340A\002\022Q\n\004view\030\003 \001(\0162C" + + ".google.api.servicemanagement.v1.GetServ" + + "iceConfigRequest.ConfigView\"!\n\nConfigVie" + + "w\022\t\n\005BASIC\020\000\022\010\n\004FULL\020\001\"]\n\031ListServiceCon" + + "figsRequest\022\031\n\014service_name\030\001 \001(\tB\003\340A\002\022\022" + + "\n\npage_token\030\002 \001(\t\022\021\n\tpage_size\030\003 \001(\005\"c\n" + + "\032ListServiceConfigsResponse\022,\n\017service_c" + + "onfigs\030\001 \003(\0132\023.google.api.Service\022\027\n\017nex" + + "t_page_token\030\002 \001(\t\"i\n\032CreateServiceConfi" + + "gRequest\022\031\n\014service_name\030\001 \001(\tB\003\340A\002\0220\n\016s" + + "ervice_config\030\002 \001(\0132\023.google.api.Service" + + "B\003\340A\002\"\235\001\n\031SubmitConfigSourceRequest\022\031\n\014s" + + "ervice_name\030\001 \001(\tB\003\340A\002\022I\n\rconfig_source\030" + + "\002 \001(\0132-.google.api.servicemanagement.v1." + + "ConfigSourceB\003\340A\002\022\032\n\rvalidate_only\030\003 \001(\010" + + "B\003\340A\001\"I\n\032SubmitConfigSourceResponse\022+\n\016s" + + "ervice_config\030\001 \001(\0132\023.google.api.Service" + + "\"x\n\033CreateServiceRolloutRequest\022\031\n\014servi" + + "ce_name\030\001 \001(\tB\003\340A\002\022>\n\007rollout\030\002 \001(\0132(.go" + + "ogle.api.servicemanagement.v1.RolloutB\003\340" + + "A\002\"s\n\032ListServiceRolloutsRequest\022\031\n\014serv" + + "ice_name\030\001 \001(\tB\003\340A\002\022\022\n\npage_token\030\002 \001(\t\022" + + "\021\n\tpage_size\030\003 \001(\005\022\023\n\006filter\030\004 \001(\tB\003\340A\002\"" + + "r\n\033ListServiceRolloutsResponse\022:\n\010rollou" + + "ts\030\001 \003(\0132(.google.api.servicemanagement." + + "v1.Rollout\022\027\n\017next_page_token\030\002 \001(\t\"N\n\030G" + + "etServiceRolloutRequest\022\031\n\014service_name\030" + + "\001 \001(\tB\003\340A\002\022\027\n\nrollout_id\030\002 \001(\tB\003\340A\002\"K\n\024E" + + "nableServiceRequest\022\031\n\014service_name\030\001 \001(" + + "\tB\003\340A\002\022\030\n\013consumer_id\030\002 \001(\tB\003\340A\002\"\027\n\025Enab" + + "leServiceResponse\"L\n\025DisableServiceReque" + + "st\022\031\n\014service_name\030\001 \001(\tB\003\340A\002\022\030\n\013consume" + + "r_id\030\002 \001(\tB\003\340A\002\"\030\n\026DisableServiceRespons" + + "e\"{\n\033GenerateConfigReportRequest\022-\n\nnew_" + + "config\030\001 \001(\0132\024.google.protobuf.AnyB\003\340A\002\022" + + "-\n\nold_config\030\002 \001(\0132\024.google.protobuf.An" + + "yB\003\340A\001\"\311\001\n\034GenerateConfigReportResponse\022" + + "\024\n\014service_name\030\001 \001(\t\022\n\n\002id\030\002 \001(\t\022E\n\016cha" + + "nge_reports\030\003 \003(\0132-.google.api.servicema" + + "nagement.v1.ChangeReport\022@\n\013diagnostics\030" + + "\004 \003(\0132+.google.api.servicemanagement.v1." + + "Diagnostic2\222\036\n\016ServiceManager\022\263\001\n\014ListSe" + + "rvices\0224.google.api.servicemanagement.v1" + + ".ListServicesRequest\0325.google.api.servic" + + "emanagement.v1.ListServicesResponse\"6\202\323\344" + + "\223\002\016\022\014/v1/services\332A\037producer_project_id," + + "consumer_id\022\245\001\n\nGetService\0222.google.api." + + "servicemanagement.v1.GetServiceRequest\032/" + + ".google.api.servicemanagement.v1.Managed" + + "Service\"2\202\323\344\223\002\035\022\033/v1/services/{service_n" + + "ame}\332A\014service_name\022\365\001\n\rCreateService\0225." + + "google.api.servicemanagement.v1.CreateSe" + + "rviceRequest\032\035.google.longrunning.Operat" + + "ion\"\215\001\202\323\344\223\002\027\"\014/v1/services:\007service\332A\007se" + + "rvice\312Ac\n.google.api.servicemanagement.v" + + "1.ManagedService\0221google.api.servicemana" + + "gement.v1.OperationMetadata\022\346\001\n\rDeleteSe" + + "rvice\0225.google.api.servicemanagement.v1." + + "DeleteServiceRequest\032\035.google.longrunnin" + + "g.Operation\"\177\202\323\344\223\002\035*\033/v1/services/{servi" + + "ce_name}\332A\014service_name\312AJ\n\025google.proto" + + "buf.Empty\0221google.api.servicemanagement." + + "v1.OperationMetadata\022\226\002\n\017UndeleteService" + + "\0227.google.api.servicemanagement.v1.Undel" + + "eteServiceRequest\032\035.google.longrunning.O" + + "peration\"\252\001\202\323\344\223\002&\"$/v1/services/{service" + + "_name}:undelete\332A\014service_name\312Al\n7googl" + + "e.api.servicemanagement.v1.UndeleteServi" + + "ceResponse\0221google.api.servicemanagement" + + ".v1.OperationMetadata\022\311\001\n\022ListServiceCon" + + "figs\022:.google.api.servicemanagement.v1.L" + + "istServiceConfigsRequest\032;.google.api.se" + + "rvicemanagement.v1.ListServiceConfigsRes" + + "ponse\":\202\323\344\223\002%\022#/v1/services/{service_nam" + + "e}/configs\332A\014service_name\022\336\001\n\020GetService" + + "Config\0228.google.api.servicemanagement.v1" + + ".GetServiceConfigRequest\032\023.google.api.Se" + + "rvice\"{\202\323\344\223\002W\022//v1/services/{service_nam" + + "e}/configs/{config_id}Z$\022\"/v1/services/{" + + "service_name}/config\332A\033service_name,conf" + + "ig_id,view\022\302\001\n\023CreateServiceConfig\022;.goo" + + "gle.api.servicemanagement.v1.CreateServi" + + "ceConfigRequest\032\023.google.api.Service\"Y\202\323" + + "\344\223\0025\"#/v1/services/{service_name}/config" + + "s:\016service_config\332A\033service_name,service" + + "_config\022\304\002\n\022SubmitConfigSource\022:.google." + + "api.servicemanagement.v1.SubmitConfigSou" + + "rceRequest\032\035.google.longrunning.Operatio" + + "n\"\322\001\202\323\344\223\002/\"*/v1/services/{service_name}/" + + "configs:submit:\001*\332A(service_name,config_" + + "source,validate_only\312Ao\n:google.api.serv" + + "icemanagement.v1.SubmitConfigSourceRespo" + + "nse\0221google.api.servicemanagement.v1.Ope" + + "rationMetadata\022\324\001\n\023ListServiceRollouts\022;" + + ".google.api.servicemanagement.v1.ListSer" + + "viceRolloutsRequest\032<.google.api.service" + + "management.v1.ListServiceRolloutsRespons" + + "e\"B\202\323\344\223\002&\022$/v1/services/{service_name}/r" + + "ollouts\332A\023service_name,filter\022\315\001\n\021GetSer" + + "viceRollout\0229.google.api.servicemanageme" + + "nt.v1.GetServiceRolloutRequest\032(.google." + + "api.servicemanagement.v1.Rollout\"S\202\323\344\223\0023" + + "\0221/v1/services/{service_name}/rollouts/{" + + "rollout_id}\332A\027service_name,rollout_id\022\241\002" + + "\n\024CreateServiceRollout\022<.google.api.serv" + + "icemanagement.v1.CreateServiceRolloutReq" + + "uest\032\035.google.longrunning.Operation\"\253\001\202\323" + + "\344\223\002/\"$/v1/services/{service_name}/rollou" + + "ts:\007rollout\332A\024service_name,rollout\312A\\\n\'g" + + "oogle.api.servicemanagement.v1.Rollout\0221" + + "google.api.servicemanagement.v1.Operatio" + + "nMetadata\022\331\001\n\024GenerateConfigReport\022<.goo" + + "gle.api.servicemanagement.v1.GenerateCon" + + "figReportRequest\032=.google.api.serviceman" + + "agement.v1.GenerateConfigReportResponse\"" + + "D\202\323\344\223\002&\"!/v1/services:generateConfigRepo" + + "rt:\001*\332A\025new_config,old_config\022\240\002\n\rEnable" + + "Service\0225.google.api.servicemanagement.v" + + "1.EnableServiceRequest\032\035.google.longrunn" + + "ing.Operation\"\270\001\210\002\001\202\323\344\223\002\'\"\"/v1/services/" + + "{service_name}:enable:\001*\332A\030service_name," + + "consumer_id\312Aj\n5google.api.servicemanage" + + "ment.v1.EnableServiceResponse\0221google.ap" + + "i.servicemanagement.v1.OperationMetadata" + + "\022\244\002\n\016DisableService\0226.google.api.service" + + "management.v1.DisableServiceRequest\032\035.go" + + "ogle.longrunning.Operation\"\272\001\210\002\001\202\323\344\223\002(\"#" + + "/v1/services/{service_name}:disable:\001*\332A" + + "\030service_name,consumer_id\312Ak\n6google.api" + + ".servicemanagement.v1.DisableServiceResp" + + "onse\0221google.api.servicemanagement.v1.Op" + + "erationMetadata\032\375\001\312A servicemanagement.g" + + "oogleapis.com\322A\326\001https://www.googleapis." + + "com/auth/cloud-platform,https://www.goog" + + "leapis.com/auth/cloud-platform.read-only" + + ",https://www.googleapis.com/auth/service" + + ".management,https://www.googleapis.com/a" + + "uth/service.management.readonlyB\204\002\n#com." + + "google.api.servicemanagement.v1B\023Service" + + "ManagerProtoP\001ZPgoogle.golang.org/genpro" + + "to/googleapis/api/servicemanagement/v1;s" + + "ervicemanagement\242\002\004GASM\252\002!Google.Cloud.S" + + "erviceManagement.V1\312\002!Google\\Cloud\\Servi" + + "ceManagement\\V1\352\002$Google::Cloud::Service" + + "Management::V1b\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.ServiceProto.getDescriptor(), + com.google.api.servicemanagement.v1.ResourcesProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + com.google.rpc.StatusProto.getDescriptor(), + }); + internal_static_google_api_servicemanagement_v1_ListServicesRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_api_servicemanagement_v1_ListServicesRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_ListServicesRequest_descriptor, + new java.lang.String[] { + "ProducerProjectId", "PageSize", "PageToken", "ConsumerId", + }); + internal_static_google_api_servicemanagement_v1_ListServicesResponse_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_api_servicemanagement_v1_ListServicesResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_ListServicesResponse_descriptor, + new java.lang.String[] { + "Services", "NextPageToken", + }); + internal_static_google_api_servicemanagement_v1_GetServiceRequest_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_api_servicemanagement_v1_GetServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_GetServiceRequest_descriptor, + new java.lang.String[] { + "ServiceName", + }); + internal_static_google_api_servicemanagement_v1_CreateServiceRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_api_servicemanagement_v1_CreateServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_CreateServiceRequest_descriptor, + new java.lang.String[] { + "Service", + }); + internal_static_google_api_servicemanagement_v1_DeleteServiceRequest_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_api_servicemanagement_v1_DeleteServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_DeleteServiceRequest_descriptor, + new java.lang.String[] { + "ServiceName", + }); + internal_static_google_api_servicemanagement_v1_UndeleteServiceRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_api_servicemanagement_v1_UndeleteServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_UndeleteServiceRequest_descriptor, + new java.lang.String[] { + "ServiceName", + }); + internal_static_google_api_servicemanagement_v1_UndeleteServiceResponse_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_api_servicemanagement_v1_UndeleteServiceResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_UndeleteServiceResponse_descriptor, + new java.lang.String[] { + "Service", + }); + internal_static_google_api_servicemanagement_v1_GetServiceConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_api_servicemanagement_v1_GetServiceConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_GetServiceConfigRequest_descriptor, + new java.lang.String[] { + "ServiceName", "ConfigId", "View", + }); + internal_static_google_api_servicemanagement_v1_ListServiceConfigsRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_api_servicemanagement_v1_ListServiceConfigsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_ListServiceConfigsRequest_descriptor, + new java.lang.String[] { + "ServiceName", "PageToken", "PageSize", + }); + internal_static_google_api_servicemanagement_v1_ListServiceConfigsResponse_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_api_servicemanagement_v1_ListServiceConfigsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_ListServiceConfigsResponse_descriptor, + new java.lang.String[] { + "ServiceConfigs", "NextPageToken", + }); + internal_static_google_api_servicemanagement_v1_CreateServiceConfigRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_api_servicemanagement_v1_CreateServiceConfigRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_CreateServiceConfigRequest_descriptor, + new java.lang.String[] { + "ServiceName", "ServiceConfig", + }); + internal_static_google_api_servicemanagement_v1_SubmitConfigSourceRequest_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_api_servicemanagement_v1_SubmitConfigSourceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_SubmitConfigSourceRequest_descriptor, + new java.lang.String[] { + "ServiceName", "ConfigSource", "ValidateOnly", + }); + internal_static_google_api_servicemanagement_v1_SubmitConfigSourceResponse_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_api_servicemanagement_v1_SubmitConfigSourceResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_SubmitConfigSourceResponse_descriptor, + new java.lang.String[] { + "ServiceConfig", + }); + internal_static_google_api_servicemanagement_v1_CreateServiceRolloutRequest_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_api_servicemanagement_v1_CreateServiceRolloutRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_CreateServiceRolloutRequest_descriptor, + new java.lang.String[] { + "ServiceName", "Rollout", + }); + internal_static_google_api_servicemanagement_v1_ListServiceRolloutsRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_api_servicemanagement_v1_ListServiceRolloutsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_ListServiceRolloutsRequest_descriptor, + new java.lang.String[] { + "ServiceName", "PageToken", "PageSize", "Filter", + }); + internal_static_google_api_servicemanagement_v1_ListServiceRolloutsResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_api_servicemanagement_v1_ListServiceRolloutsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_ListServiceRolloutsResponse_descriptor, + new java.lang.String[] { + "Rollouts", "NextPageToken", + }); + internal_static_google_api_servicemanagement_v1_GetServiceRolloutRequest_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_api_servicemanagement_v1_GetServiceRolloutRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_GetServiceRolloutRequest_descriptor, + new java.lang.String[] { + "ServiceName", "RolloutId", + }); + internal_static_google_api_servicemanagement_v1_EnableServiceRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_api_servicemanagement_v1_EnableServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_EnableServiceRequest_descriptor, + new java.lang.String[] { + "ServiceName", "ConsumerId", + }); + internal_static_google_api_servicemanagement_v1_EnableServiceResponse_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_api_servicemanagement_v1_EnableServiceResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_EnableServiceResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_api_servicemanagement_v1_DisableServiceRequest_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_api_servicemanagement_v1_DisableServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_DisableServiceRequest_descriptor, + new java.lang.String[] { + "ServiceName", "ConsumerId", + }); + internal_static_google_api_servicemanagement_v1_DisableServiceResponse_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_api_servicemanagement_v1_DisableServiceResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_DisableServiceResponse_descriptor, + new java.lang.String[] {}); + internal_static_google_api_servicemanagement_v1_GenerateConfigReportRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_api_servicemanagement_v1_GenerateConfigReportRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_GenerateConfigReportRequest_descriptor, + new java.lang.String[] { + "NewConfig", "OldConfig", + }); + internal_static_google_api_servicemanagement_v1_GenerateConfigReportResponse_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_api_servicemanagement_v1_GenerateConfigReportResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_api_servicemanagement_v1_GenerateConfigReportResponse_descriptor, + new java.lang.String[] { + "ServiceName", "Id", "ChangeReports", "Diagnostics", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ServiceProto.getDescriptor(); + com.google.api.servicemanagement.v1.ResourcesProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + com.google.rpc.StatusProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceRequest.java new file mode 100644 index 0000000..17c1df9 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceRequest.java @@ -0,0 +1,1048 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for SubmitConfigSource method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.SubmitConfigSourceRequest} + */ +public final class SubmitConfigSourceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.SubmitConfigSourceRequest) + SubmitConfigSourceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubmitConfigSourceRequest.newBuilder() to construct. + private SubmitConfigSourceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubmitConfigSourceRequest() { + serviceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubmitConfigSourceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SubmitConfigSourceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + case 18: + { + com.google.api.servicemanagement.v1.ConfigSource.Builder subBuilder = null; + if (configSource_ != null) { + subBuilder = configSource_.toBuilder(); + } + configSource_ = + input.readMessage( + com.google.api.servicemanagement.v1.ConfigSource.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(configSource_); + configSource_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + validateOnly_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_SubmitConfigSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_SubmitConfigSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest.class, + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONFIG_SOURCE_FIELD_NUMBER = 2; + private com.google.api.servicemanagement.v1.ConfigSource configSource_; + /** + * + * + *
+   * Required. The source configuration for the service.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configSource field is set. + */ + @java.lang.Override + public boolean hasConfigSource() { + return configSource_ != null; + } + /** + * + * + *
+   * Required. The source configuration for the service.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configSource. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigSource getConfigSource() { + return configSource_ == null + ? com.google.api.servicemanagement.v1.ConfigSource.getDefaultInstance() + : configSource_; + } + /** + * + * + *
+   * Required. The source configuration for the service.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ConfigSourceOrBuilder getConfigSourceOrBuilder() { + return getConfigSource(); + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 3; + private boolean validateOnly_; + /** + * + * + *
+   * Optional. If set, this will result in the generation of a
+   * `google.api.Service` configuration based on the `ConfigSource` provided,
+   * but the generated config and the sources will NOT be persisted.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + if (configSource_ != null) { + output.writeMessage(2, getConfigSource()); + } + if (validateOnly_ != false) { + output.writeBool(3, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + if (configSource_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getConfigSource()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, validateOnly_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.SubmitConfigSourceRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest other = + (com.google.api.servicemanagement.v1.SubmitConfigSourceRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (hasConfigSource() != other.hasConfigSource()) return false; + if (hasConfigSource()) { + if (!getConfigSource().equals(other.getConfigSource())) return false; + } + if (getValidateOnly() != other.getValidateOnly()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + if (hasConfigSource()) { + hash = (37 * hash) + CONFIG_SOURCE_FIELD_NUMBER; + hash = (53 * hash) + getConfigSource().hashCode(); + } + hash = (37 * hash) + VALIDATE_ONLY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getValidateOnly()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for SubmitConfigSource method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.SubmitConfigSourceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.SubmitConfigSourceRequest) + com.google.api.servicemanagement.v1.SubmitConfigSourceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_SubmitConfigSourceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_SubmitConfigSourceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest.class, + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.SubmitConfigSourceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + if (configSourceBuilder_ == null) { + configSource_ = null; + } else { + configSource_ = null; + configSourceBuilder_ = null; + } + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_SubmitConfigSourceRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.SubmitConfigSourceRequest + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.SubmitConfigSourceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.SubmitConfigSourceRequest build() { + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.SubmitConfigSourceRequest buildPartial() { + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest result = + new com.google.api.servicemanagement.v1.SubmitConfigSourceRequest(this); + result.serviceName_ = serviceName_; + if (configSourceBuilder_ == null) { + result.configSource_ = configSource_; + } else { + result.configSource_ = configSourceBuilder_.build(); + } + result.validateOnly_ = validateOnly_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.SubmitConfigSourceRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.SubmitConfigSourceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.SubmitConfigSourceRequest other) { + if (other + == com.google.api.servicemanagement.v1.SubmitConfigSourceRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + if (other.hasConfigSource()) { + mergeConfigSource(other.getConfigSource()); + } + if (other.getValidateOnly() != false) { + setValidateOnly(other.getValidateOnly()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.SubmitConfigSourceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.SubmitConfigSourceRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service.  See the [overview](/service-management/overview)
+     * for naming requirements.  For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = value; + onChanged(); + return this; + } + + private com.google.api.servicemanagement.v1.ConfigSource configSource_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.ConfigSource, + com.google.api.servicemanagement.v1.ConfigSource.Builder, + com.google.api.servicemanagement.v1.ConfigSourceOrBuilder> + configSourceBuilder_; + /** + * + * + *
+     * Required. The source configuration for the service.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configSource field is set. + */ + public boolean hasConfigSource() { + return configSourceBuilder_ != null || configSource_ != null; + } + /** + * + * + *
+     * Required. The source configuration for the service.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configSource. + */ + public com.google.api.servicemanagement.v1.ConfigSource getConfigSource() { + if (configSourceBuilder_ == null) { + return configSource_ == null + ? com.google.api.servicemanagement.v1.ConfigSource.getDefaultInstance() + : configSource_; + } else { + return configSourceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The source configuration for the service.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfigSource(com.google.api.servicemanagement.v1.ConfigSource value) { + if (configSourceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + configSource_ = value; + onChanged(); + } else { + configSourceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The source configuration for the service.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setConfigSource( + com.google.api.servicemanagement.v1.ConfigSource.Builder builderForValue) { + if (configSourceBuilder_ == null) { + configSource_ = builderForValue.build(); + onChanged(); + } else { + configSourceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The source configuration for the service.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeConfigSource(com.google.api.servicemanagement.v1.ConfigSource value) { + if (configSourceBuilder_ == null) { + if (configSource_ != null) { + configSource_ = + com.google.api.servicemanagement.v1.ConfigSource.newBuilder(configSource_) + .mergeFrom(value) + .buildPartial(); + } else { + configSource_ = value; + } + onChanged(); + } else { + configSourceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The source configuration for the service.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearConfigSource() { + if (configSourceBuilder_ == null) { + configSource_ = null; + onChanged(); + } else { + configSource_ = null; + configSourceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The source configuration for the service.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.api.servicemanagement.v1.ConfigSource.Builder getConfigSourceBuilder() { + + onChanged(); + return getConfigSourceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The source configuration for the service.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.api.servicemanagement.v1.ConfigSourceOrBuilder getConfigSourceOrBuilder() { + if (configSourceBuilder_ != null) { + return configSourceBuilder_.getMessageOrBuilder(); + } else { + return configSource_ == null + ? com.google.api.servicemanagement.v1.ConfigSource.getDefaultInstance() + : configSource_; + } + } + /** + * + * + *
+     * Required. The source configuration for the service.
+     * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.ConfigSource, + com.google.api.servicemanagement.v1.ConfigSource.Builder, + com.google.api.servicemanagement.v1.ConfigSourceOrBuilder> + getConfigSourceFieldBuilder() { + if (configSourceBuilder_ == null) { + configSourceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.ConfigSource, + com.google.api.servicemanagement.v1.ConfigSource.Builder, + com.google.api.servicemanagement.v1.ConfigSourceOrBuilder>( + getConfigSource(), getParentForChildren(), isClean()); + configSource_ = null; + } + return configSourceBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * Optional. If set, this will result in the generation of a
+     * `google.api.Service` configuration based on the `ConfigSource` provided,
+     * but the generated config and the sources will NOT be persisted.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * Optional. If set, this will result in the generation of a
+     * `google.api.Service` configuration based on the `ConfigSource` provided,
+     * but the generated config and the sources will NOT be persisted.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. If set, this will result in the generation of a
+     * `google.api.Service` configuration based on the `ConfigSource` provided,
+     * but the generated config and the sources will NOT be persisted.
+     * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearValidateOnly() { + + validateOnly_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.SubmitConfigSourceRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.SubmitConfigSourceRequest) + private static final com.google.api.servicemanagement.v1.SubmitConfigSourceRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.SubmitConfigSourceRequest(); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubmitConfigSourceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SubmitConfigSourceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.SubmitConfigSourceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceRequestOrBuilder.java new file mode 100644 index 0000000..b98d895 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceRequestOrBuilder.java @@ -0,0 +1,108 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface SubmitConfigSourceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.SubmitConfigSourceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. The name of the service.  See the [overview](/service-management/overview)
+   * for naming requirements.  For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); + + /** + * + * + *
+   * Required. The source configuration for the service.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the configSource field is set. + */ + boolean hasConfigSource(); + /** + * + * + *
+   * Required. The source configuration for the service.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The configSource. + */ + com.google.api.servicemanagement.v1.ConfigSource getConfigSource(); + /** + * + * + *
+   * Required. The source configuration for the service.
+   * 
+ * + * + * .google.api.servicemanagement.v1.ConfigSource config_source = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.api.servicemanagement.v1.ConfigSourceOrBuilder getConfigSourceOrBuilder(); + + /** + * + * + *
+   * Optional. If set, this will result in the generation of a
+   * `google.api.Service` configuration based on the `ConfigSource` provided,
+   * but the generated config and the sources will NOT be persisted.
+   * 
+ * + * bool validate_only = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceResponse.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceResponse.java new file mode 100644 index 0000000..60757fd --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceResponse.java @@ -0,0 +1,731 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Response message for SubmitConfigSource method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.SubmitConfigSourceResponse} + */ +public final class SubmitConfigSourceResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.SubmitConfigSourceResponse) + SubmitConfigSourceResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubmitConfigSourceResponse.newBuilder() to construct. + private SubmitConfigSourceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubmitConfigSourceResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubmitConfigSourceResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SubmitConfigSourceResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.api.Service.Builder subBuilder = null; + if (serviceConfig_ != null) { + subBuilder = serviceConfig_.toBuilder(); + } + serviceConfig_ = + input.readMessage(com.google.api.Service.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(serviceConfig_); + serviceConfig_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_SubmitConfigSourceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_SubmitConfigSourceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.SubmitConfigSourceResponse.class, + com.google.api.servicemanagement.v1.SubmitConfigSourceResponse.Builder.class); + } + + public static final int SERVICE_CONFIG_FIELD_NUMBER = 1; + private com.google.api.Service serviceConfig_; + /** + * + * + *
+   * The generated service configuration.
+   * 
+ * + * .google.api.Service service_config = 1; + * + * @return Whether the serviceConfig field is set. + */ + @java.lang.Override + public boolean hasServiceConfig() { + return serviceConfig_ != null; + } + /** + * + * + *
+   * The generated service configuration.
+   * 
+ * + * .google.api.Service service_config = 1; + * + * @return The serviceConfig. + */ + @java.lang.Override + public com.google.api.Service getServiceConfig() { + return serviceConfig_ == null ? com.google.api.Service.getDefaultInstance() : serviceConfig_; + } + /** + * + * + *
+   * The generated service configuration.
+   * 
+ * + * .google.api.Service service_config = 1; + */ + @java.lang.Override + public com.google.api.ServiceOrBuilder getServiceConfigOrBuilder() { + return getServiceConfig(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (serviceConfig_ != null) { + output.writeMessage(1, getServiceConfig()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (serviceConfig_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getServiceConfig()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.SubmitConfigSourceResponse)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.SubmitConfigSourceResponse other = + (com.google.api.servicemanagement.v1.SubmitConfigSourceResponse) obj; + + if (hasServiceConfig() != other.hasServiceConfig()) return false; + if (hasServiceConfig()) { + if (!getServiceConfig().equals(other.getServiceConfig())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasServiceConfig()) { + hash = (37 * hash) + SERVICE_CONFIG_FIELD_NUMBER; + hash = (53 * hash) + getServiceConfig().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.SubmitConfigSourceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for SubmitConfigSource method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.SubmitConfigSourceResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.SubmitConfigSourceResponse) + com.google.api.servicemanagement.v1.SubmitConfigSourceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_SubmitConfigSourceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_SubmitConfigSourceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.SubmitConfigSourceResponse.class, + com.google.api.servicemanagement.v1.SubmitConfigSourceResponse.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.SubmitConfigSourceResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (serviceConfigBuilder_ == null) { + serviceConfig_ = null; + } else { + serviceConfig_ = null; + serviceConfigBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_SubmitConfigSourceResponse_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.SubmitConfigSourceResponse + getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.SubmitConfigSourceResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.SubmitConfigSourceResponse build() { + com.google.api.servicemanagement.v1.SubmitConfigSourceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.SubmitConfigSourceResponse buildPartial() { + com.google.api.servicemanagement.v1.SubmitConfigSourceResponse result = + new com.google.api.servicemanagement.v1.SubmitConfigSourceResponse(this); + if (serviceConfigBuilder_ == null) { + result.serviceConfig_ = serviceConfig_; + } else { + result.serviceConfig_ = serviceConfigBuilder_.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.api.servicemanagement.v1.SubmitConfigSourceResponse) { + return mergeFrom((com.google.api.servicemanagement.v1.SubmitConfigSourceResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.SubmitConfigSourceResponse other) { + if (other + == com.google.api.servicemanagement.v1.SubmitConfigSourceResponse.getDefaultInstance()) + return this; + if (other.hasServiceConfig()) { + mergeServiceConfig(other.getServiceConfig()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.SubmitConfigSourceResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.SubmitConfigSourceResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.api.Service serviceConfig_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Service, com.google.api.Service.Builder, com.google.api.ServiceOrBuilder> + serviceConfigBuilder_; + /** + * + * + *
+     * The generated service configuration.
+     * 
+ * + * .google.api.Service service_config = 1; + * + * @return Whether the serviceConfig field is set. + */ + public boolean hasServiceConfig() { + return serviceConfigBuilder_ != null || serviceConfig_ != null; + } + /** + * + * + *
+     * The generated service configuration.
+     * 
+ * + * .google.api.Service service_config = 1; + * + * @return The serviceConfig. + */ + public com.google.api.Service getServiceConfig() { + if (serviceConfigBuilder_ == null) { + return serviceConfig_ == null + ? com.google.api.Service.getDefaultInstance() + : serviceConfig_; + } else { + return serviceConfigBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The generated service configuration.
+     * 
+ * + * .google.api.Service service_config = 1; + */ + public Builder setServiceConfig(com.google.api.Service value) { + if (serviceConfigBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + serviceConfig_ = value; + onChanged(); + } else { + serviceConfigBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The generated service configuration.
+     * 
+ * + * .google.api.Service service_config = 1; + */ + public Builder setServiceConfig(com.google.api.Service.Builder builderForValue) { + if (serviceConfigBuilder_ == null) { + serviceConfig_ = builderForValue.build(); + onChanged(); + } else { + serviceConfigBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The generated service configuration.
+     * 
+ * + * .google.api.Service service_config = 1; + */ + public Builder mergeServiceConfig(com.google.api.Service value) { + if (serviceConfigBuilder_ == null) { + if (serviceConfig_ != null) { + serviceConfig_ = + com.google.api.Service.newBuilder(serviceConfig_).mergeFrom(value).buildPartial(); + } else { + serviceConfig_ = value; + } + onChanged(); + } else { + serviceConfigBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The generated service configuration.
+     * 
+ * + * .google.api.Service service_config = 1; + */ + public Builder clearServiceConfig() { + if (serviceConfigBuilder_ == null) { + serviceConfig_ = null; + onChanged(); + } else { + serviceConfig_ = null; + serviceConfigBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The generated service configuration.
+     * 
+ * + * .google.api.Service service_config = 1; + */ + public com.google.api.Service.Builder getServiceConfigBuilder() { + + onChanged(); + return getServiceConfigFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The generated service configuration.
+     * 
+ * + * .google.api.Service service_config = 1; + */ + public com.google.api.ServiceOrBuilder getServiceConfigOrBuilder() { + if (serviceConfigBuilder_ != null) { + return serviceConfigBuilder_.getMessageOrBuilder(); + } else { + return serviceConfig_ == null + ? com.google.api.Service.getDefaultInstance() + : serviceConfig_; + } + } + /** + * + * + *
+     * The generated service configuration.
+     * 
+ * + * .google.api.Service service_config = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Service, com.google.api.Service.Builder, com.google.api.ServiceOrBuilder> + getServiceConfigFieldBuilder() { + if (serviceConfigBuilder_ == null) { + serviceConfigBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.Service, + com.google.api.Service.Builder, + com.google.api.ServiceOrBuilder>( + getServiceConfig(), getParentForChildren(), isClean()); + serviceConfig_ = null; + } + return serviceConfigBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.SubmitConfigSourceResponse) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.SubmitConfigSourceResponse) + private static final com.google.api.servicemanagement.v1.SubmitConfigSourceResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.SubmitConfigSourceResponse(); + } + + public static com.google.api.servicemanagement.v1.SubmitConfigSourceResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubmitConfigSourceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SubmitConfigSourceResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.SubmitConfigSourceResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceResponseOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceResponseOrBuilder.java new file mode 100644 index 0000000..d3d564a --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/SubmitConfigSourceResponseOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface SubmitConfigSourceResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.SubmitConfigSourceResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The generated service configuration.
+   * 
+ * + * .google.api.Service service_config = 1; + * + * @return Whether the serviceConfig field is set. + */ + boolean hasServiceConfig(); + /** + * + * + *
+   * The generated service configuration.
+   * 
+ * + * .google.api.Service service_config = 1; + * + * @return The serviceConfig. + */ + com.google.api.Service getServiceConfig(); + /** + * + * + *
+   * The generated service configuration.
+   * 
+ * + * .google.api.Service service_config = 1; + */ + com.google.api.ServiceOrBuilder getServiceConfigOrBuilder(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceRequest.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceRequest.java new file mode 100644 index 0000000..c47709c --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceRequest.java @@ -0,0 +1,644 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Request message for UndeleteService method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.UndeleteServiceRequest} + */ +public final class UndeleteServiceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.UndeleteServiceRequest) + UndeleteServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UndeleteServiceRequest.newBuilder() to construct. + private UndeleteServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UndeleteServiceRequest() { + serviceName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UndeleteServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UndeleteServiceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + serviceName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_UndeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_UndeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.UndeleteServiceRequest.class, + com.google.api.servicemanagement.v1.UndeleteServiceRequest.Builder.class); + } + + public static final int SERVICE_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object serviceName_; + /** + * + * + *
+   * Required. The name of the service. See the [overview](/service-management/overview)
+   * for naming requirements. For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + @java.lang.Override + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the service. See the [overview](/service-management/overview)
+   * for naming requirements. For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = 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 (!getServiceNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, serviceName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getServiceNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, serviceName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.UndeleteServiceRequest)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.UndeleteServiceRequest other = + (com.google.api.servicemanagement.v1.UndeleteServiceRequest) obj; + + if (!getServiceName().equals(other.getServiceName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SERVICE_NAME_FIELD_NUMBER; + hash = (53 * hash) + getServiceName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.UndeleteServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Request message for UndeleteService method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.UndeleteServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.UndeleteServiceRequest) + com.google.api.servicemanagement.v1.UndeleteServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_UndeleteServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_UndeleteServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.UndeleteServiceRequest.class, + com.google.api.servicemanagement.v1.UndeleteServiceRequest.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.UndeleteServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + serviceName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_UndeleteServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.UndeleteServiceRequest getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.UndeleteServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.UndeleteServiceRequest build() { + com.google.api.servicemanagement.v1.UndeleteServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.UndeleteServiceRequest buildPartial() { + com.google.api.servicemanagement.v1.UndeleteServiceRequest result = + new com.google.api.servicemanagement.v1.UndeleteServiceRequest(this); + result.serviceName_ = serviceName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.api.servicemanagement.v1.UndeleteServiceRequest) { + return mergeFrom((com.google.api.servicemanagement.v1.UndeleteServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.UndeleteServiceRequest other) { + if (other == com.google.api.servicemanagement.v1.UndeleteServiceRequest.getDefaultInstance()) + return this; + if (!other.getServiceName().isEmpty()) { + serviceName_ = other.serviceName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.UndeleteServiceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.UndeleteServiceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object serviceName_ = ""; + /** + * + * + *
+     * Required. The name of the service. See the [overview](/service-management/overview)
+     * for naming requirements. For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + public java.lang.String getServiceName() { + java.lang.Object ref = serviceName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + serviceName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the service. See the [overview](/service-management/overview)
+     * for naming requirements. For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + public com.google.protobuf.ByteString getServiceNameBytes() { + java.lang.Object ref = serviceName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + serviceName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the service. See the [overview](/service-management/overview)
+     * for naming requirements. For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + serviceName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service. See the [overview](/service-management/overview)
+     * for naming requirements. For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearServiceName() { + + serviceName_ = getDefaultInstance().getServiceName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the service. See the [overview](/service-management/overview)
+     * for naming requirements. For example: `example.googleapis.com`.
+     * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for serviceName to set. + * @return This builder for chaining. + */ + public Builder setServiceNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + serviceName_ = 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.api.servicemanagement.v1.UndeleteServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.UndeleteServiceRequest) + private static final com.google.api.servicemanagement.v1.UndeleteServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.UndeleteServiceRequest(); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UndeleteServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UndeleteServiceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.UndeleteServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceRequestOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceRequestOrBuilder.java new file mode 100644 index 0000000..5665cae --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceRequestOrBuilder.java @@ -0,0 +1,52 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface UndeleteServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.UndeleteServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the service. See the [overview](/service-management/overview)
+   * for naming requirements. For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The serviceName. + */ + java.lang.String getServiceName(); + /** + * + * + *
+   * Required. The name of the service. See the [overview](/service-management/overview)
+   * for naming requirements. For example: `example.googleapis.com`.
+   * 
+ * + * string service_name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for serviceName. + */ + com.google.protobuf.ByteString getServiceNameBytes(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceResponse.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceResponse.java new file mode 100644 index 0000000..7a6fa12 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceResponse.java @@ -0,0 +1,736 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +/** + * + * + *
+ * Response message for UndeleteService method.
+ * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.UndeleteServiceResponse} + */ +public final class UndeleteServiceResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.api.servicemanagement.v1.UndeleteServiceResponse) + UndeleteServiceResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use UndeleteServiceResponse.newBuilder() to construct. + private UndeleteServiceResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UndeleteServiceResponse() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UndeleteServiceResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UndeleteServiceResponse( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.api.servicemanagement.v1.ManagedService.Builder subBuilder = null; + if (service_ != null) { + subBuilder = service_.toBuilder(); + } + service_ = + input.readMessage( + com.google.api.servicemanagement.v1.ManagedService.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(service_); + service_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_UndeleteServiceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_UndeleteServiceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.UndeleteServiceResponse.class, + com.google.api.servicemanagement.v1.UndeleteServiceResponse.Builder.class); + } + + public static final int SERVICE_FIELD_NUMBER = 1; + private com.google.api.servicemanagement.v1.ManagedService service_; + /** + * + * + *
+   * Revived service resource.
+   * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + * + * @return Whether the service field is set. + */ + @java.lang.Override + public boolean hasService() { + return service_ != null; + } + /** + * + * + *
+   * Revived service resource.
+   * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + * + * @return The service. + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ManagedService getService() { + return service_ == null + ? com.google.api.servicemanagement.v1.ManagedService.getDefaultInstance() + : service_; + } + /** + * + * + *
+   * Revived service resource.
+   * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + */ + @java.lang.Override + public com.google.api.servicemanagement.v1.ManagedServiceOrBuilder getServiceOrBuilder() { + return getService(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (service_ != null) { + output.writeMessage(1, getService()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (service_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getService()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.api.servicemanagement.v1.UndeleteServiceResponse)) { + return super.equals(obj); + } + com.google.api.servicemanagement.v1.UndeleteServiceResponse other = + (com.google.api.servicemanagement.v1.UndeleteServiceResponse) obj; + + if (hasService() != other.hasService()) return false; + if (hasService()) { + if (!getService().equals(other.getService())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasService()) { + hash = (37 * hash) + SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getService().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.api.servicemanagement.v1.UndeleteServiceResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Response message for UndeleteService method.
+   * 
+ * + * Protobuf type {@code google.api.servicemanagement.v1.UndeleteServiceResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.api.servicemanagement.v1.UndeleteServiceResponse) + com.google.api.servicemanagement.v1.UndeleteServiceResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_UndeleteServiceResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_UndeleteServiceResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.api.servicemanagement.v1.UndeleteServiceResponse.class, + com.google.api.servicemanagement.v1.UndeleteServiceResponse.Builder.class); + } + + // Construct using com.google.api.servicemanagement.v1.UndeleteServiceResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (serviceBuilder_ == null) { + service_ = null; + } else { + service_ = null; + serviceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.api.servicemanagement.v1.ServiceManagerProto + .internal_static_google_api_servicemanagement_v1_UndeleteServiceResponse_descriptor; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.UndeleteServiceResponse getDefaultInstanceForType() { + return com.google.api.servicemanagement.v1.UndeleteServiceResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.UndeleteServiceResponse build() { + com.google.api.servicemanagement.v1.UndeleteServiceResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.UndeleteServiceResponse buildPartial() { + com.google.api.servicemanagement.v1.UndeleteServiceResponse result = + new com.google.api.servicemanagement.v1.UndeleteServiceResponse(this); + if (serviceBuilder_ == null) { + result.service_ = service_; + } else { + result.service_ = serviceBuilder_.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.api.servicemanagement.v1.UndeleteServiceResponse) { + return mergeFrom((com.google.api.servicemanagement.v1.UndeleteServiceResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.api.servicemanagement.v1.UndeleteServiceResponse other) { + if (other == com.google.api.servicemanagement.v1.UndeleteServiceResponse.getDefaultInstance()) + return this; + if (other.hasService()) { + mergeService(other.getService()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.api.servicemanagement.v1.UndeleteServiceResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.api.servicemanagement.v1.UndeleteServiceResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.api.servicemanagement.v1.ManagedService service_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.ManagedService, + com.google.api.servicemanagement.v1.ManagedService.Builder, + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder> + serviceBuilder_; + /** + * + * + *
+     * Revived service resource.
+     * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + * + * @return Whether the service field is set. + */ + public boolean hasService() { + return serviceBuilder_ != null || service_ != null; + } + /** + * + * + *
+     * Revived service resource.
+     * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + * + * @return The service. + */ + public com.google.api.servicemanagement.v1.ManagedService getService() { + if (serviceBuilder_ == null) { + return service_ == null + ? com.google.api.servicemanagement.v1.ManagedService.getDefaultInstance() + : service_; + } else { + return serviceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Revived service resource.
+     * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + */ + public Builder setService(com.google.api.servicemanagement.v1.ManagedService value) { + if (serviceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + service_ = value; + onChanged(); + } else { + serviceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Revived service resource.
+     * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + */ + public Builder setService( + com.google.api.servicemanagement.v1.ManagedService.Builder builderForValue) { + if (serviceBuilder_ == null) { + service_ = builderForValue.build(); + onChanged(); + } else { + serviceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Revived service resource.
+     * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + */ + public Builder mergeService(com.google.api.servicemanagement.v1.ManagedService value) { + if (serviceBuilder_ == null) { + if (service_ != null) { + service_ = + com.google.api.servicemanagement.v1.ManagedService.newBuilder(service_) + .mergeFrom(value) + .buildPartial(); + } else { + service_ = value; + } + onChanged(); + } else { + serviceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Revived service resource.
+     * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + */ + public Builder clearService() { + if (serviceBuilder_ == null) { + service_ = null; + onChanged(); + } else { + service_ = null; + serviceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Revived service resource.
+     * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + */ + public com.google.api.servicemanagement.v1.ManagedService.Builder getServiceBuilder() { + + onChanged(); + return getServiceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Revived service resource.
+     * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + */ + public com.google.api.servicemanagement.v1.ManagedServiceOrBuilder getServiceOrBuilder() { + if (serviceBuilder_ != null) { + return serviceBuilder_.getMessageOrBuilder(); + } else { + return service_ == null + ? com.google.api.servicemanagement.v1.ManagedService.getDefaultInstance() + : service_; + } + } + /** + * + * + *
+     * Revived service resource.
+     * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.ManagedService, + com.google.api.servicemanagement.v1.ManagedService.Builder, + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder> + getServiceFieldBuilder() { + if (serviceBuilder_ == null) { + serviceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.api.servicemanagement.v1.ManagedService, + com.google.api.servicemanagement.v1.ManagedService.Builder, + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder>( + getService(), getParentForChildren(), isClean()); + service_ = null; + } + return serviceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.api.servicemanagement.v1.UndeleteServiceResponse) + } + + // @@protoc_insertion_point(class_scope:google.api.servicemanagement.v1.UndeleteServiceResponse) + private static final com.google.api.servicemanagement.v1.UndeleteServiceResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.api.servicemanagement.v1.UndeleteServiceResponse(); + } + + public static com.google.api.servicemanagement.v1.UndeleteServiceResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UndeleteServiceResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UndeleteServiceResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.api.servicemanagement.v1.UndeleteServiceResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceResponseOrBuilder.java b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceResponseOrBuilder.java new file mode 100644 index 0000000..9c1ac0d --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/java/com/google/api/servicemanagement/v1/UndeleteServiceResponseOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/api/servicemanagement/v1/servicemanager.proto + +package com.google.api.servicemanagement.v1; + +public interface UndeleteServiceResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.api.servicemanagement.v1.UndeleteServiceResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Revived service resource.
+   * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + * + * @return Whether the service field is set. + */ + boolean hasService(); + /** + * + * + *
+   * Revived service resource.
+   * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + * + * @return The service. + */ + com.google.api.servicemanagement.v1.ManagedService getService(); + /** + * + * + *
+   * Revived service resource.
+   * 
+ * + * .google.api.servicemanagement.v1.ManagedService service = 1; + */ + com.google.api.servicemanagement.v1.ManagedServiceOrBuilder getServiceOrBuilder(); +} diff --git a/proto-google-cloud-service-management-v1/src/main/proto/google/api/servicemanagement/v1/resources.proto b/proto-google-cloud-service-management-v1/src/main/proto/google/api/servicemanagement/v1/resources.proto new file mode 100644 index 0000000..37ac300 --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/proto/google/api/servicemanagement/v1/resources.proto @@ -0,0 +1,304 @@ +// 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. +// + +syntax = "proto3"; + +package google.api.servicemanagement.v1; + +import "google/api/annotations.proto"; +import "google/api/config_change.proto"; +import "google/api/field_behavior.proto"; +import "google/api/metric.proto"; +import "google/api/quota.proto"; +import "google/api/service.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ServiceManagement.V1"; +option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.api.servicemanagement.v1"; +option objc_class_prefix = "GASM"; +option php_namespace = "Google\\Cloud\\ServiceManagement\\V1"; +option ruby_package = "Google::Cloud::ServiceManagement::V1"; + +// The full representation of a Service that is managed by +// Google Service Management. +message ManagedService { + // The name of the service. See the [overview](/service-management/overview) + // for naming requirements. + string service_name = 2; + + // ID of the project that produces and owns this service. + string producer_project_id = 3; +} + +// The metadata associated with a long running operation resource. +message OperationMetadata { + // Represents the status of one operation step. + message Step { + // The short description of the step. + string description = 2; + + // The status code. + Status status = 4; + } + + // Code describes the status of the operation (or one of its steps). + enum Status { + // Unspecifed code. + STATUS_UNSPECIFIED = 0; + + // The operation or step has completed without errors. + DONE = 1; + + // The operation or step has not started yet. + NOT_STARTED = 2; + + // The operation or step is in progress. + IN_PROGRESS = 3; + + // The operation or step has completed with errors. If the operation is + // rollbackable, the rollback completed with errors too. + FAILED = 4; + + // The operation or step has completed with cancellation. + CANCELLED = 5; + } + + // The full name of the resources that this operation is directly + // associated with. + repeated string resource_names = 1; + + // Detailed status information for each step. The order is undetermined. + repeated Step steps = 2; + + // Percentage of completion of this operation, ranging from 0 to 100. + int32 progress_percentage = 3; + + // The start time of the operation. + google.protobuf.Timestamp start_time = 4; +} + +// Represents a diagnostic message (error or warning) +message Diagnostic { + // The kind of diagnostic information possible. + enum Kind { + // Warnings and errors + WARNING = 0; + + // Only errors + ERROR = 1; + } + + // File name and line number of the error or warning. + string location = 1; + + // The kind of diagnostic information provided. + Kind kind = 2; + + // Message describing the error or warning. + string message = 3; +} + +// Represents a source file which is used to generate the service configuration +// defined by `google.api.Service`. +message ConfigSource { + // A unique ID for a specific instance of this message, typically assigned + // by the client for tracking purpose. If empty, the server may choose to + // generate one instead. + string id = 5; + + // Set of source configuration files that are used to generate a service + // configuration (`google.api.Service`). + repeated ConfigFile files = 2; +} + +// Generic specification of a source configuration file +message ConfigFile { + enum FileType { + // Unknown file type. + FILE_TYPE_UNSPECIFIED = 0; + + // YAML-specification of service. + SERVICE_CONFIG_YAML = 1; + + // OpenAPI specification, serialized in JSON. + OPEN_API_JSON = 2; + + // OpenAPI specification, serialized in YAML. + OPEN_API_YAML = 3; + + // FileDescriptorSet, generated by protoc. + // + // To generate, use protoc with imports and source info included. + // For an example test.proto file, the following command would put the value + // in a new file named out.pb. + // + // $protoc --include_imports --include_source_info test.proto -o out.pb + FILE_DESCRIPTOR_SET_PROTO = 4; + + // Uncompiled Proto file. Used for storage and display purposes only, + // currently server-side compilation is not supported. Should match the + // inputs to 'protoc' command used to generated FILE_DESCRIPTOR_SET_PROTO. A + // file of this type can only be included if at least one file of type + // FILE_DESCRIPTOR_SET_PROTO is included. + PROTO_FILE = 6; + } + + // The file name of the configuration file (full or relative path). + string file_path = 1; + + // The bytes that constitute the file. + bytes file_contents = 3; + + // The type of configuration file this represents. + FileType file_type = 4; +} + +// Represents a service configuration with its name and id. +message ConfigRef { + // Resource name of a service config. It must have the following + // format: "services/{service name}/configs/{config id}". + string name = 1; +} + +// Change report associated with a particular service configuration. +// +// It contains a list of ConfigChanges based on the comparison between +// two service configurations. +message ChangeReport { + // List of changes between two service configurations. + // The changes will be alphabetically sorted based on the identifier + // of each change. + // A ConfigChange identifier is a dot separated path to the configuration. + // Example: visibility.rules[selector='LibraryService.CreateBook'].restriction + repeated google.api.ConfigChange config_changes = 1; +} + +// A rollout resource that defines how service configuration versions are pushed +// to control plane systems. Typically, you create a new version of the +// service config, and then create a Rollout to push the service config. +message Rollout { + // Strategy that specifies how clients of Google Service Controller want to + // send traffic to use different config versions. This is generally + // used by API proxy to split traffic based on your configured percentage for + // each config version. + // + // One example of how to gradually rollout a new service configuration using + // this + // strategy: + // Day 1 + // + // Rollout { + // id: "example.googleapis.com/rollout_20160206" + // traffic_percent_strategy { + // percentages: { + // "example.googleapis.com/20160201": 70.00 + // "example.googleapis.com/20160206": 30.00 + // } + // } + // } + // + // Day 2 + // + // Rollout { + // id: "example.googleapis.com/rollout_20160207" + // traffic_percent_strategy: { + // percentages: { + // "example.googleapis.com/20160206": 100.00 + // } + // } + // } + message TrafficPercentStrategy { + // Maps service configuration IDs to their corresponding traffic percentage. + // Key is the service configuration ID, Value is the traffic percentage + // which must be greater than 0.0 and the sum must equal to 100.0. + map percentages = 1; + } + + // Strategy used to delete a service. This strategy is a placeholder only + // used by the system generated rollout to delete a service. + message DeleteServiceStrategy { + + } + + // Status of a Rollout. + enum RolloutStatus { + // No status specified. + ROLLOUT_STATUS_UNSPECIFIED = 0; + + // The Rollout is in progress. + IN_PROGRESS = 1; + + // The Rollout has completed successfully. + SUCCESS = 2; + + // The Rollout has been cancelled. This can happen if you have overlapping + // Rollout pushes, and the previous ones will be cancelled. + CANCELLED = 3; + + // The Rollout has failed and the rollback attempt has failed too. + FAILED = 4; + + // The Rollout has not started yet and is pending for execution. + PENDING = 5; + + // The Rollout has failed and rolled back to the previous successful + // Rollout. + FAILED_ROLLED_BACK = 6; + } + + // Optional. Unique identifier of this Rollout. Must be no longer than 63 characters + // and only lower case letters, digits, '.', '_' and '-' are allowed. + // + // If not specified by client, the server will generate one. The generated id + // will have the form of , where "date" is the create + // date in ISO 8601 format. "revision number" is a monotonically increasing + // positive number that is reset every day for each service. + // An example of the generated rollout_id is '2016-02-16r1' + string rollout_id = 1 [(google.api.field_behavior) = OPTIONAL]; + + // Creation time of the rollout. Readonly. + google.protobuf.Timestamp create_time = 2; + + // The user who created the Rollout. Readonly. + string created_by = 3; + + // The status of this rollout. Readonly. In case of a failed rollout, + // the system will automatically rollback to the current Rollout + // version. Readonly. + RolloutStatus status = 4; + + // Strategy that defines which versions of service configurations should be + // pushed + // and how they should be used at runtime. + oneof strategy { + // Google Service Control selects service configurations based on + // traffic percentage. + TrafficPercentStrategy traffic_percent_strategy = 5; + + // The strategy associated with a rollout to delete a `ManagedService`. + // Readonly. + DeleteServiceStrategy delete_service_strategy = 200; + } + + // The name of the service associated with this Rollout. + string service_name = 8; +} diff --git a/proto-google-cloud-service-management-v1/src/main/proto/google/api/servicemanagement/v1/servicemanager.proto b/proto-google-cloud-service-management-v1/src/main/proto/google/api/servicemanagement/v1/servicemanager.proto new file mode 100644 index 0000000..f94739f --- /dev/null +++ b/proto-google-cloud-service-management-v1/src/main/proto/google/api/servicemanagement/v1/servicemanager.proto @@ -0,0 +1,560 @@ +// 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. + +syntax = "proto3"; + +package google.api.servicemanagement.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/service.proto"; +import "google/api/servicemanagement/v1/resources.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/any.proto"; +import "google/protobuf/field_mask.proto"; +import "google/rpc/status.proto"; + +option csharp_namespace = "Google.Cloud.ServiceManagement.V1"; +option go_package = "google.golang.org/genproto/googleapis/api/servicemanagement/v1;servicemanagement"; +option java_multiple_files = true; +option java_outer_classname = "ServiceManagerProto"; +option java_package = "com.google.api.servicemanagement.v1"; +option objc_class_prefix = "GASM"; +option php_namespace = "Google\\Cloud\\ServiceManagement\\V1"; +option ruby_package = "Google::Cloud::ServiceManagement::V1"; + +// [Google Service Management API](/service-management/overview) +service ServiceManager { + option (google.api.default_host) = "servicemanagement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform," + "https://www.googleapis.com/auth/cloud-platform.read-only," + "https://www.googleapis.com/auth/service.management," + "https://www.googleapis.com/auth/service.management.readonly"; + + // Lists managed services. + // + // Returns all public services. For authenticated users, also returns all + // services the calling user has "servicemanagement.services.get" permission + // for. + // + // **BETA:** If the caller specifies the `consumer_id`, it returns only the + // services enabled on the consumer. The `consumer_id` must have the format + // of "project:{PROJECT-ID}". + rpc ListServices(ListServicesRequest) returns (ListServicesResponse) { + option (google.api.http) = { + get: "/v1/services" + }; + option (google.api.method_signature) = "producer_project_id,consumer_id"; + } + + // Gets a managed service. Authentication is required unless the service is + // public. + rpc GetService(GetServiceRequest) returns (ManagedService) { + option (google.api.http) = { + get: "/v1/services/{service_name}" + }; + option (google.api.method_signature) = "service_name"; + } + + // Creates a new managed service. + // Please note one producer project can own no more than 20 services. + // + // Operation + rpc CreateService(CreateServiceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/services" + body: "service" + }; + option (google.api.method_signature) = "service"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.ManagedService" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Deletes a managed service. This method will change the service to the + // `Soft-Delete` state for 30 days. Within this period, service producers may + // call [UndeleteService][google.api.servicemanagement.v1.ServiceManager.UndeleteService] to restore the service. + // After 30 days, the service will be permanently deleted. + // + // Operation + rpc DeleteService(DeleteServiceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + delete: "/v1/services/{service_name}" + }; + option (google.api.method_signature) = "service_name"; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Revives a previously deleted managed service. The method restores the + // service using the configuration at the time the service was deleted. + // The target service must exist and must have been deleted within the + // last 30 days. + // + // Operation + rpc UndeleteService(UndeleteServiceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/services/{service_name}:undelete" + }; + option (google.api.method_signature) = "service_name"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.UndeleteServiceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Lists the history of the service configuration for a managed service, + // from the newest to the oldest. + rpc ListServiceConfigs(ListServiceConfigsRequest) returns (ListServiceConfigsResponse) { + option (google.api.http) = { + get: "/v1/services/{service_name}/configs" + }; + option (google.api.method_signature) = "service_name"; + } + + // Gets a service configuration (version) for a managed service. + rpc GetServiceConfig(GetServiceConfigRequest) returns (google.api.Service) { + option (google.api.http) = { + get: "/v1/services/{service_name}/configs/{config_id}" + additional_bindings { + get: "/v1/services/{service_name}/config" + } + }; + option (google.api.method_signature) = "service_name,config_id,view"; + } + + // Creates a new service configuration (version) for a managed service. + // This method only stores the service configuration. To roll out the service + // configuration to backend systems please call + // [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + // + // Only the 100 most recent service configurations and ones referenced by + // existing rollouts are kept for each service. The rest will be deleted + // eventually. + rpc CreateServiceConfig(CreateServiceConfigRequest) returns (google.api.Service) { + option (google.api.http) = { + post: "/v1/services/{service_name}/configs" + body: "service_config" + }; + option (google.api.method_signature) = "service_name,service_config"; + } + + // Creates a new service configuration (version) for a managed service based + // on + // user-supplied configuration source files (for example: OpenAPI + // Specification). This method stores the source configurations as well as the + // generated service configuration. To rollout the service configuration to + // other services, + // please call [CreateServiceRollout][google.api.servicemanagement.v1.ServiceManager.CreateServiceRollout]. + // + // Only the 100 most recent configuration sources and ones referenced by + // existing service configurtions are kept for each service. The rest will be + // deleted eventually. + // + // Operation + rpc SubmitConfigSource(SubmitConfigSourceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/services/{service_name}/configs:submit" + body: "*" + }; + option (google.api.method_signature) = "service_name,config_source,validate_only"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.SubmitConfigSourceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Lists the history of the service configuration rollouts for a managed + // service, from the newest to the oldest. + rpc ListServiceRollouts(ListServiceRolloutsRequest) returns (ListServiceRolloutsResponse) { + option (google.api.http) = { + get: "/v1/services/{service_name}/rollouts" + }; + option (google.api.method_signature) = "service_name,filter"; + } + + // Gets a service configuration [rollout][google.api.servicemanagement.v1.Rollout]. + rpc GetServiceRollout(GetServiceRolloutRequest) returns (Rollout) { + option (google.api.http) = { + get: "/v1/services/{service_name}/rollouts/{rollout_id}" + }; + option (google.api.method_signature) = "service_name,rollout_id"; + } + + // Creates a new service configuration rollout. Based on rollout, the + // Google Service Management will roll out the service configurations to + // different backend services. For example, the logging configuration will be + // pushed to Google Cloud Logging. + // + // Please note that any previous pending and running Rollouts and associated + // Operations will be automatically cancelled so that the latest Rollout will + // not be blocked by previous Rollouts. + // + // Only the 100 most recent (in any state) and the last 10 successful (if not + // already part of the set of 100 most recent) rollouts are kept for each + // service. The rest will be deleted eventually. + // + // Operation + rpc CreateServiceRollout(CreateServiceRolloutRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/services/{service_name}/rollouts" + body: "rollout" + }; + option (google.api.method_signature) = "service_name,rollout"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.Rollout" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Generates and returns a report (errors, warnings and changes from + // existing configurations) associated with + // GenerateConfigReportRequest.new_value + // + // If GenerateConfigReportRequest.old_value is specified, + // GenerateConfigReportRequest will contain a single ChangeReport based on the + // comparison between GenerateConfigReportRequest.new_value and + // GenerateConfigReportRequest.old_value. + // If GenerateConfigReportRequest.old_value is not specified, this method + // will compare GenerateConfigReportRequest.new_value with the last pushed + // service configuration. + rpc GenerateConfigReport(GenerateConfigReportRequest) returns (GenerateConfigReportResponse) { + option (google.api.http) = { + post: "/v1/services:generateConfigReport" + body: "*" + }; + option (google.api.method_signature) = "new_config,old_config"; + } + + // Enables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can be used + // for the project. See + // [Cloud Auth Guide](https://cloud.google.com/docs/authentication) for + // more information. + // + // Operation + rpc EnableService(EnableServiceRequest) returns (google.longrunning.Operation) { + option deprecated = true; + option (google.api.http) = { + post: "/v1/services/{service_name}:enable" + body: "*" + }; + option (google.api.method_signature) = "service_name,consumer_id"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.EnableServiceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } + + // Disables a [service][google.api.servicemanagement.v1.ManagedService] for a project, so it can no longer be + // be used for the project. It prevents accidental usage that may cause + // unexpected billing charges or security leaks. + // + // Operation + rpc DisableService(DisableServiceRequest) returns (google.longrunning.Operation) { + option deprecated = true; + option (google.api.http) = { + post: "/v1/services/{service_name}:disable" + body: "*" + }; + option (google.api.method_signature) = "service_name,consumer_id"; + option (google.longrunning.operation_info) = { + response_type: "google.api.servicemanagement.v1.DisableServiceResponse" + metadata_type: "google.api.servicemanagement.v1.OperationMetadata" + }; + } +} + +// Request message for `ListServices` method. +message ListServicesRequest { + // Include services produced by the specified project. + string producer_project_id = 1; + + // The max number of items to include in the response list. Page size is 50 + // if not specified. Maximum value is 100. + int32 page_size = 5; + + // Token identifying which result to start with; returned by a previous list + // call. + string page_token = 6; + + // Include services consumed by the specified consumer. + // + // The Google Service Management implementation accepts the following + // forms: + // - project: + string consumer_id = 7 [deprecated = true]; +} + +// Response message for `ListServices` method. +message ListServicesResponse { + // The returned services will only have the name field set. + repeated ManagedService services = 1; + + // Token that can be passed to `ListServices` to resume a paginated query. + string next_page_token = 2; +} + +// Request message for `GetService` method. +message GetServiceRequest { + // Required. The name of the service. See the `ServiceManager` overview for naming + // requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for CreateService method. +message CreateServiceRequest { + // Required. Initial values for the service resource. + ManagedService service = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteService method. +message DeleteServiceRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for UndeleteService method. +message UndeleteServiceRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for UndeleteService method. +message UndeleteServiceResponse { + // Revived service resource. + ManagedService service = 1; +} + +// Request message for GetServiceConfig method. +message GetServiceConfigRequest { + enum ConfigView { + // Server response includes all fields except SourceInfo. + BASIC = 0; + + // Server response includes all fields including SourceInfo. + // SourceFiles are of type 'google.api.servicemanagement.v1.ConfigFile' + // and are only available for configs created using the + // SubmitConfigSource method. + FULL = 1; + } + + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The id of the service configuration resource. + // + // This field must be specified for the server to return all fields, including + // `SourceInfo`. + string config_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Specifies which parts of the Service Config should be returned in the + // response. + ConfigView view = 3; +} + +// Request message for ListServiceConfigs method. +message ListServiceConfigsRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The token of the page to retrieve. + string page_token = 2; + + // The max number of items to include in the response list. Page size is 50 + // if not specified. Maximum value is 100. + int32 page_size = 3; +} + +// Response message for ListServiceConfigs method. +message ListServiceConfigsResponse { + // The list of service configuration resources. + repeated google.api.Service service_configs = 1; + + // The token of the next page of results. + string next_page_token = 2; +} + +// Request message for CreateServiceConfig method. +message CreateServiceConfigRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The service configuration resource. + google.api.Service service_config = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for SubmitConfigSource method. +message SubmitConfigSourceRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The source configuration for the service. + ConfigSource config_source = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. If set, this will result in the generation of a + // `google.api.Service` configuration based on the `ConfigSource` provided, + // but the generated config and the sources will NOT be persisted. + bool validate_only = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for SubmitConfigSource method. +message SubmitConfigSourceResponse { + // The generated service configuration. + google.api.Service service_config = 1; +} + +// Request message for 'CreateServiceRollout' +message CreateServiceRolloutRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The rollout resource. The `service_name` field is output only. + Rollout rollout = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for 'ListServiceRollouts' +message ListServiceRolloutsRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // The token of the page to retrieve. + string page_token = 2; + + // The max number of items to include in the response list. Page size is 50 + // if not specified. Maximum value is 100. + int32 page_size = 3; + + // Required. Use `filter` to return subset of rollouts. + // The following filters are supported: + // -- To limit the results to only those in + // [status](google.api.servicemanagement.v1.RolloutStatus) 'SUCCESS', + // use filter='status=SUCCESS' + // -- To limit the results to those in + // [status](google.api.servicemanagement.v1.RolloutStatus) 'CANCELLED' + // or 'FAILED', use filter='status=CANCELLED OR status=FAILED' + string filter = 4 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for ListServiceRollouts method. +message ListServiceRolloutsResponse { + // The list of rollout resources. + repeated Rollout rollouts = 1; + + // The token of the next page of results. + string next_page_token = 2; +} + +// Request message for GetServiceRollout method. +message GetServiceRolloutRequest { + // Required. The name of the service. See the [overview](/service-management/overview) + // for naming requirements. For example: `example.googleapis.com`. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The id of the rollout resource. + string rollout_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for EnableService method. +message EnableServiceRequest { + // Required. Name of the service to enable. Specifying an unknown service name will + // cause the request to fail. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The identity of consumer resource which service enablement will be + // applied to. + // + // The Google Service Management implementation accepts the following + // forms: + // - "project:" + // + // Note: this is made compatible with + // google.api.servicecontrol.v1.Operation.consumer_id. + string consumer_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Operation payload for EnableService method. +message EnableServiceResponse { + +} + +// Request message for DisableService method. +message DisableServiceRequest { + // Required. Name of the service to disable. Specifying an unknown service name + // will cause the request to fail. + string service_name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The identity of consumer resource which service disablement will be + // applied to. + // + // The Google Service Management implementation accepts the following + // forms: + // - "project:" + // + // Note: this is made compatible with + // google.api.servicecontrol.v1.Operation.consumer_id. + string consumer_id = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Operation payload for DisableService method. +message DisableServiceResponse { + +} + +// Request message for GenerateConfigReport method. +message GenerateConfigReportRequest { + // Required. Service configuration for which we want to generate the report. + // For this version of API, the supported types are + // [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef], + // [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource], + // and [google.api.Service][google.api.Service] + google.protobuf.Any new_config = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Service configuration against which the comparison will be done. + // For this version of API, the supported types are + // [google.api.servicemanagement.v1.ConfigRef][google.api.servicemanagement.v1.ConfigRef], + // [google.api.servicemanagement.v1.ConfigSource][google.api.servicemanagement.v1.ConfigSource], + // and [google.api.Service][google.api.Service] + google.protobuf.Any old_config = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for GenerateConfigReport method. +message GenerateConfigReportResponse { + // Name of the service this report belongs to. + string service_name = 1; + + // ID of the service configuration this report belongs to. + string id = 2; + + // list of ChangeReport, each corresponding to comparison between two + // service configurations. + repeated ChangeReport change_reports = 3; + + // Errors / Linter warnings associated with the service definition this + // report + // belongs to. + repeated Diagnostic diagnostics = 4; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 0000000..8abbc34 --- /dev/null +++ b/renovate.json @@ -0,0 +1,73 @@ +{ + "extends": [ + ":separateMajorReleases", + ":combinePatchMinorReleases", + ":ignoreUnstable", + ":prImmediately", + ":updateNotScheduled", + ":automergeDisabled", + ":ignoreModulesAndTests", + ":maintainLockFilesDisabled", + ":autodetectPinVersions" + ], + "packageRules": [ + { + "packagePatterns": [ + "^com.google.guava:" + ], + "versionScheme": "docker" + }, + { + "packagePatterns": [ + "*" + ], + "semanticCommitType": "deps", + "semanticCommitScope": null + }, + { + "packagePatterns": [ + "^org.apache.maven", + "^org.jacoco:", + "^org.codehaus.mojo:", + "^org.sonatype.plugins:", + "^com.coveo:", + "^com.google.cloud:google-cloud-shared-config" + ], + "semanticCommitType": "build", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-service-management", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^junit:junit", + "^com.google.truth:truth", + "^org.mockito:mockito-core", + "^org.objenesis:objenesis" + ], + "semanticCommitType": "test", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-" + ], + "ignoreUnstable": false + }, + { + "packagePatterns": [ + "^com.fasterxml.jackson.core" + ], + "groupName": "jackson dependencies" + } + ], + "semanticCommits": true, + "masterIssue": true +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 0000000..76ffb20 --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + service-management-install-without-bom + jar + Google Service Management API Install Without Bom + https://github.com/googleapis/java-service-management + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-service-management + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/samples/pom.xml b/samples/pom.xml new file mode 100644 index 0000000..ff7fb08 --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-service-management-samples + 0.0.1-SNAPSHOT + pom + Google Service Management API Samples Parent + https://github.com/googleapis/java-service-management + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.18 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 0000000..e7543d2 --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + service-management-snapshot + jar + Google Service Management API Snapshot Samples + https://github.com/googleapis/java-service-management + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-service-management + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + \ No newline at end of file diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 0000000..1c40493 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + service-management-snippets + jar + Google Service Management API Snippets + https://github.com/googleapis/java-service-management + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-service-management + 0.0.0 + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + diff --git a/synth.metadata b/synth.metadata new file mode 100644 index 0000000..d857774 --- /dev/null +++ b/synth.metadata @@ -0,0 +1,33 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "sso://devrel/cloud/libraries/java/repo-splitter", + "sha": "89de1f074ffc06e824ce0e58581039c853c85dbc" + } + }, + { + "git": { + "name": "googleapis-gen", + "remote": "https://github.com/googleapis/googleapis-gen.git", + "sha": "1ad043d44370c3639640b1f1f549296c005448f5", + "internalRef": "360805639" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "2e7bd5cc66a3f0b90ce1c150eb35c89eeb9872d6" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "2e7bd5cc66a3f0b90ce1c150eb35c89eeb9872d6" + } + } + ] +} \ No newline at end of file diff --git a/synth.py b/synth.py new file mode 100644 index 0000000..927f271 --- /dev/null +++ b/synth.py @@ -0,0 +1,31 @@ +# 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. + +"""This script is used to synthesize generated parts of this library.""" + +import synthtool.languages.java as java + +service = 'api-servicemanagement' +versions = ['v1'] + +for version in versions: + java.pregenerated_library( + service=service, + version=version, + path=f'google/api/servicemanagement/{version}', + destination_name='service-management', + ) + +java.common_templates() + diff --git a/versions.txt b/versions.txt new file mode 100644 index 0000000..5ea6324 --- /dev/null +++ b/versions.txt @@ -0,0 +1,6 @@ +# Format: +# module:released-version:current-version + +google-cloud-service-management:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-service-management-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-service-management-v1:0.0.0:0.0.1-SNAPSHOT \ No newline at end of file