diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 00000000..30fdb7b9 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,10 @@ +# Code owners file. +# This file controls who is tagged for review for any given pull request. + +# For syntax help see: +# https://help.github.com/en/github/creating-cloning-and-archiving-repositories/about-code-owners#codeowners-syntax + +* @googleapis/yoshi-java + +# The java-samples-reviewers team is the default owner for samples changes +samples/**/*.java @googleapis/java-samples-reviewers diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..c098be3d --- /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-channel/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. channel version(s): + +#### Steps to reproduce + + 1. ? + 2. ? + +#### Code example + +```java +// example +``` + +#### Stack trace +``` +Any relevant stacktrace here. +``` + +#### External references such as API reference guides + +- ? + +#### Any additional information below + + +Following these steps guarantees the quickest resolution possible. + +Thanks! diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..754e30c6 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,21 @@ +--- +name: Feature request +about: Suggest an idea for this library + +--- + +Thanks for stopping by to let us know something could be better! + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. + +**Is your feature request related to a problem? Please describe.** +What the problem is. Example: I'm always frustrated when [...] + +**Describe the solution you'd like** +What you want to happen. + +**Describe alternatives you've considered** +Any alternative solutions or features you've considered. + +**Additional context** +Any other context or screenshots about the feature request. diff --git a/.github/ISSUE_TEMPLATE/support_request.md b/.github/ISSUE_TEMPLATE/support_request.md new file mode 100644 index 00000000..99586903 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/support_request.md @@ -0,0 +1,7 @@ +--- +name: Support request +about: If you have a support contract with Google, please create an issue in the Google Cloud Support console. + +--- + +**PLEASE READ**: If you have a support contract with Google, please create an issue in the [support console](https://cloud.google.com/support/) instead of filing on GitHub. This will ensure a timely response. diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..26f941c1 --- /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-channel/issues/new/choose) before writing your code! That way we can discuss the change, evaluate designs, and agree on the general idea +- [ ] Ensure the tests and linter pass +- [ ] Code coverage does not decrease (if any source code was changed) +- [ ] Appropriate docs were updated (if necessary) + +Fixes # ☕️ diff --git a/.github/blunderbuss.yml b/.github/blunderbuss.yml new file mode 100644 index 00000000..1a23ea42 --- /dev/null +++ b/.github/blunderbuss.yml @@ -0,0 +1,7 @@ +# Configuration for the Blunderbuss GitHub app. For more info see +# https://github.com/googleapis/repo-automation-bots/tree/master/packages/blunderbuss +assign_prs_by: +- labels: + - samples + to: + - googleapis/java-samples-reviewers \ No newline at end of file diff --git a/.github/generated-files-bot.yml b/.github/generated-files-bot.yml new file mode 100644 index 00000000..47c2ba13 --- /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 00000000..7b48cc28 --- /dev/null +++ b/.github/readme/synth.py @@ -0,0 +1,19 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +"""This script is used to synthesize generated the README for this library.""" + +from synthtool.languages import java + +java.custom_templates(["java_library/README.md"]) diff --git a/.github/release-please.yml b/.github/release-please.yml new file mode 100644 index 00000000..dce2c845 --- /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 00000000..e69de29b diff --git a/.github/trusted-contribution.yml b/.github/trusted-contribution.yml new file mode 100644 index 00000000..f247d5c7 --- /dev/null +++ b/.github/trusted-contribution.yml @@ -0,0 +1,2 @@ +trustedContributors: +- renovate-bot \ No newline at end of file diff --git a/.github/workflows/approve-readme.yaml b/.github/workflows/approve-readme.yaml new file mode 100644 index 00000000..7513acae --- /dev/null +++ b/.github/workflows/approve-readme.yaml @@ -0,0 +1,54 @@ +on: + pull_request: +name: auto-merge-readme +jobs: + approve: + runs-on: ubuntu-latest + if: github.repository_owner == 'googleapis' && github.head_ref == 'autosynth-readme' + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + script: | + // only approve PRs from yoshi-automation + if (context.payload.pull_request.user.login !== "yoshi-automation") { + return; + } + + // only approve PRs like "chore: release " + if (!context.payload.pull_request.title === "chore: regenerate README") { + return; + } + + // only approve PRs with README.md and synth.metadata changes + const files = new Set( + ( + await github.paginate( + github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }) + ) + ).map(file => file.filename) + ); + if (files.size != 2 || !files.has("README.md") || !files.has(".github/readme/synth.metadata/synth.metadata")) { + return; + } + + // approve README regeneration PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped PR!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach automerge label + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['automerge'] + }); diff --git a/.github/workflows/auto-release.yaml b/.github/workflows/auto-release.yaml new file mode 100644 index 00000000..2b6cdbc9 --- /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-v') + steps: + - uses: actions/github-script@v3 + with: + github-token: ${{secrets.YOSHI_APPROVER_TOKEN}} + debug: true + script: | + // only approve PRs from release-please[bot] + if (context.payload.pull_request.user.login !== "release-please[bot]") { + return; + } + + // only approve PRs like "chore: release " + if ( !context.payload.pull_request.title.startsWith("chore: release") ) { + return; + } + + // only approve PRs with pom.xml and versions.txt changes + const filesPromise = github.pulls.listFiles.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + pull_number: context.payload.pull_request.number, + }); + const changed_files = await github.paginate(filesPromise) + + if ( changed_files.length < 1 ) { + console.log( "Not proceeding since PR is empty!" ) + return; + } + + if ( !changed_files.some(v => v.filename.includes("pom")) || !changed_files.some(v => v.filename.includes("versions.txt")) ) { + console.log( "PR file changes do not have pom.xml or versions.txt -- something is wrong. PTAL!" ) + return; + } + + // trigger auto-release when + // 1) it is a SNAPSHOT release (auto-generated post regular release) + // 2) there are dependency updates only + // 3) there are no open dependency update PRs in this repo (to avoid multiple releases) + if ( + context.payload.pull_request.body.includes("Fix") || + context.payload.pull_request.body.includes("Build") || + context.payload.pull_request.body.includes("Documentation") || + context.payload.pull_request.body.includes("BREAKING CHANGES") || + context.payload.pull_request.body.includes("Features") + ) { + console.log( "Not auto-releasing since it is not a dependency-update-only release." ); + return; + } + + const promise = github.pulls.list.endpoint({ + owner: context.repo.owner, + repo: context.repo.repo, + state: 'open' + }); + const open_pulls = await github.paginate(promise) + + if ( open_pulls.length > 1 && !context.payload.pull_request.title.includes("SNAPSHOT") ) { + for ( const pull of open_pulls ) { + if ( pull.title.startsWith("deps: update dependency") ) { + console.log( "Not auto-releasing yet since there are dependency update PRs open in this repo." ); + return; + } + } + } + + // approve release PR + await github.pulls.createReview({ + owner: context.repo.owner, + repo: context.repo.repo, + body: 'Rubber stamped release!', + pull_number: context.payload.pull_request.number, + event: 'APPROVE' + }); + + // attach kokoro:force-run and automerge labels + await github.issues.addLabels({ + owner: context.repo.owner, + repo: context.repo.repo, + issue_number: context.payload.pull_request.number, + labels: ['kokoro:force-run', 'automerge'] + }); diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..68302207 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,79 @@ +on: + push: + branches: + - master + pull_request: +name: ci +jobs: + units: + runs-on: ubuntu-latest + strategy: + matrix: + java: [7, 8, 11] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: test + - name: coverage + uses: codecov/codecov-action@v1 + with: + name: actions ${{matrix.java}} + windows: + runs-on: windows-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.bat + env: + JOB_TYPE: test + dependencies: + runs-on: ubuntu-latest + strategy: + matrix: + java: [8, 11] + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: ${{matrix.java}} + - run: java -version + - run: .kokoro/dependencies.sh + linkage-monitor: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/linkage-monitor.sh + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: lint + clirr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - run: java -version + - run: .kokoro/build.sh + env: + JOB_TYPE: clirr \ No newline at end of file diff --git a/.github/workflows/samples.yaml b/.github/workflows/samples.yaml new file mode 100644 index 00000000..c46230a7 --- /dev/null +++ b/.github/workflows/samples.yaml @@ -0,0 +1,14 @@ +on: + pull_request: +name: samples +jobs: + checkstyle: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-java@v1 + with: + java-version: 8 + - name: Run checkstyle + run: mvn -P lint --quiet --batch-mode checkstyle:check + working-directory: samples/snippets diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..cc0bc34a --- /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 00000000..05826ad9 --- /dev/null +++ b/.kokoro/build.bat @@ -0,0 +1,3 @@ +:: See documentation in type-shell-output.bat + +"C:\Program Files\Git\bin\bash.exe" %~dp0build.sh diff --git a/.kokoro/build.sh b/.kokoro/build.sh new file mode 100755 index 00000000..03001805 --- /dev/null +++ b/.kokoro/build.sh @@ -0,0 +1,118 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Java version +java -version +echo ${JOB_TYPE} + +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true \ + -T 1C + +# if GOOGLE_APPLICATION_CREDIENTIALS is specified as a relative path prepend Kokoro root directory onto it +if [[ ! -z "${GOOGLE_APPLICATION_CREDENTIALS}" && "${GOOGLE_APPLICATION_CREDENTIALS}" != /* ]]; then + export GOOGLE_APPLICATION_CREDENTIALS=$(realpath ${KOKORO_GFILE_DIR}/${GOOGLE_APPLICATION_CREDENTIALS}) +fi + +RETURN_CODE=0 +set +e + +case ${JOB_TYPE} in +test) + mvn test -B -Dclirr.skip=true -Denforcer.skip=true + RETURN_CODE=$? + ;; +lint) + mvn com.coveo:fmt-maven-plugin:check + RETURN_CODE=$? + ;; +javadoc) + mvn javadoc:javadoc javadoc:test-javadoc + RETURN_CODE=$? + ;; +integration) + mvn -B ${INTEGRATION_TEST_ARGS} \ + -Penable-integration-tests \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + ;; +samples) + 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 \ + -DtrimStackTrace=false \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -fae \ + verify + RETURN_CODE=$? + popd + else + echo "no sample pom.xml found - skipping sample tests" + fi + ;; +clirr) + mvn -B -Denforcer.skip=true clirr:check + RETURN_CODE=$? + ;; +*) + ;; +esac + +if [ "${REPORT_COVERAGE}" == "true" ] +then + bash ${KOKORO_GFILE_DIR}/codecov.sh +fi + +# fix output location of logs +bash .kokoro/coerce_logs.sh + +if [[ "${ENABLE_BUILD_COP}" == "true" ]] +then + chmod +x ${KOKORO_GFILE_DIR}/linux_amd64/buildcop + ${KOKORO_GFILE_DIR}/linux_amd64/buildcop -repo=googleapis/java-channel +fi + +echo "exiting with ${RETURN_CODE}" +exit ${RETURN_CODE} diff --git a/.kokoro/coerce_logs.sh b/.kokoro/coerce_logs.sh new file mode 100755 index 00000000..5cf7ba49 --- /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 00000000..d923cd3f --- /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-channel/.kokoro/trampoline.sh" + +# Tell the trampoline which build file to use. +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-channel/.kokoro/build.sh" +} diff --git a/.kokoro/common.sh b/.kokoro/common.sh new file mode 100644 index 00000000..ace89f45 --- /dev/null +++ b/.kokoro/common.sh @@ -0,0 +1,58 @@ +#!/bin/bash +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +function retry_with_backoff { + attempts_left=$1 + sleep_seconds=$2 + shift 2 + command=$@ + + + # store current flag state + flags=$- + + # allow a failures to continue + set +e + ${command} + exit_code=$? + + # restore "e" flag + if [[ ${flags} =~ e ]] + then set -e + else set +e + fi + + if [[ $exit_code == 0 ]] + then + return 0 + fi + + # failure + if [[ ${attempts_left} > 0 ]] + then + echo "failure (${exit_code}), sleeping ${sleep_seconds}..." + sleep ${sleep_seconds} + new_attempts=$((${attempts_left} - 1)) + new_sleep=$((${sleep_seconds} * 2)) + retry_with_backoff ${new_attempts} ${new_sleep} ${command} + fi + + return $exit_code +} + +## Helper functionss +function now() { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n'; } +function msg() { println "$*" >&2; } +function println() { printf '%s\n' "$(now) $*"; } \ No newline at end of file diff --git a/.kokoro/continuous/common.cfg b/.kokoro/continuous/common.cfg new file mode 100644 index 00000000..cadadb88 --- /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-channel/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-channel/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/continuous/java8.cfg b/.kokoro/continuous/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /dev/null +++ b/.kokoro/continuous/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/continuous/readme.cfg b/.kokoro/continuous/readme.cfg new file mode 100644 index 00000000..832f3546 --- /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-channel/.kokoro/readme.sh" +} + +# Build logs will be here +action { + define_artifacts { + regex: "**/*sponge_log.xml" + regex: "**/*sponge_log.log" + } +} + +# The github token is stored here. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "yoshi-automation-github-key" + # TODO(theacodes): remove this after secrets have globally propagated + backend_type: FASTCONFIGPUSH + } + } +} + +# Common env vars for all repositories and builds. +env_vars: { + key: "GITHUB_USER" + value: "yoshi-automation" +} +env_vars: { + key: "GITHUB_EMAIL" + value: "yoshi-automation@google.com" +} diff --git a/.kokoro/dependencies.sh b/.kokoro/dependencies.sh new file mode 100755 index 00000000..c91e5a56 --- /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 \ + -DskipTests=true \ + -Dclirr.skip=true + +mvn -B dependency:analyze -DfailOnWarning=true + +echo "****************** DEPENDENCY LIST COMPLETENESS CHECK *******************" +## Run dependency list completeness check +function completenessCheck() { + # Output dep list with compile scope generated using the original pom + # Running mvn dependency:list on Java versions that support modules will also include the module of the dependency. + # This is stripped from the output as it is not present in the flattened pom. + # Only dependencies with 'compile' or 'runtime' scope are included from original dependency list. + msg "Generating dependency list using original pom..." + mvn dependency:list -f pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' | sed -e s/\\s--\\smodule.*// >.org-list.txt + + # Output dep list generated using the flattened pom (only 'compile' and 'runtime' scopes) + msg "Generating dependency list using flattened pom..." + mvn dependency:list -f .flattened-pom.xml -DincludeScope=runtime -Dsort=true | grep '\[INFO] .*:.*:.*:.*:.*' >.new-list.txt + + # Compare two dependency lists + msg "Comparing dependency lists..." + diff .org-list.txt .new-list.txt >.diff.txt + if [[ $? == 0 ]] + then + msg "Success. No diff!" + else + msg "Diff found. See below: " + msg "You can also check .diff.txt file located in $1." + cat .diff.txt + return 1 + fi +} + +# Allow failures to continue running the script +set +e + +error_count=0 +for path in $(find -name ".flattened-pom.xml") +do + # Check flattened pom in each dir that contains it for completeness + dir=$(dirname "$path") + pushd "$dir" + completenessCheck "$dir" + error_count=$(($error_count + $?)) + popd +done + +if [[ $error_count == 0 ]] +then + msg "All checks passed." + exit 0 +else + msg "Errors found. See log statements above." + exit 1 +fi \ No newline at end of file diff --git a/.kokoro/linkage-monitor.sh b/.kokoro/linkage-monitor.sh new file mode 100755 index 00000000..759ab4e2 --- /dev/null +++ b/.kokoro/linkage-monitor.sh @@ -0,0 +1,46 @@ +#!/bin/bash +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail +# Display commands being run. +set -x + +## Get the directory of the build script +scriptDir=$(realpath $(dirname "${BASH_SOURCE[0]}")) +## cd to the parent directory, i.e. the root of the git repo +cd ${scriptDir}/.. + +# include common functions +source ${scriptDir}/common.sh + +# Print out Java version +java -version +echo ${JOB_TYPE} + +# attempt to install 3 times with exponential backoff (starting with 10 seconds) +retry_with_backoff 3 10 \ + mvn install -B -V \ + -DskipTests=true \ + -Dclirr.skip=true \ + -Denforcer.skip=true \ + -Dmaven.javadoc.skip=true \ + -Dgcloud.download.skip=true + +# Kokoro job cloud-opensource-java/ubuntu/linkage-monitor-gcs creates this JAR +JAR=linkage-monitor-latest-all-deps.jar +curl -v -O "https://storage.googleapis.com/cloud-opensource-java-linkage-monitor/${JAR}" + +# Fails if there's new linkage errors compared with baseline +java -jar ${JAR} com.google.cloud:libraries-bom diff --git a/.kokoro/nightly/common.cfg b/.kokoro/nightly/common.cfg new file mode 100644 index 00000000..cadadb88 --- /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-channel/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-channel/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} diff --git a/.kokoro/nightly/integration.cfg b/.kokoro/nightly/integration.cfg new file mode 100644 index 00000000..0048c8ec --- /dev/null +++ b/.kokoro/nightly/integration.cfg @@ -0,0 +1,37 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/nightly/java11.cfg b/.kokoro/nightly/java11.cfg new file mode 100644 index 00000000..709f2b4c --- /dev/null +++ b/.kokoro/nightly/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/nightly/java7.cfg b/.kokoro/nightly/java7.cfg new file mode 100644 index 00000000..cb24f44e --- /dev/null +++ b/.kokoro/nightly/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/nightly/java8-osx.cfg b/.kokoro/nightly/java8-osx.cfg new file mode 100644 index 00000000..e95be44b --- /dev/null +++ b/.kokoro/nightly/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-channel/.kokoro/build.sh" diff --git a/.kokoro/nightly/java8-win.cfg b/.kokoro/nightly/java8-win.cfg new file mode 100644 index 00000000..545c3773 --- /dev/null +++ b/.kokoro/nightly/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-channel/.kokoro/build.bat" diff --git a/.kokoro/nightly/java8.cfg b/.kokoro/nightly/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /dev/null +++ b/.kokoro/nightly/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/nightly/samples.cfg b/.kokoro/nightly/samples.cfg new file mode 100644 index 00000000..f2542931 --- /dev/null +++ b/.kokoro/nightly/samples.cfg @@ -0,0 +1,38 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-docs-samples-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} + +env_vars: { + key: "ENABLE_BUILD_COP" + value: "true" +} diff --git a/.kokoro/populate-secrets.sh b/.kokoro/populate-secrets.sh new file mode 100755 index 00000000..f5251425 --- /dev/null +++ b/.kokoro/populate-secrets.sh @@ -0,0 +1,43 @@ +#!/bin/bash +# Copyright 2020 Google LLC. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +function now { date +"%Y-%m-%d %H:%M:%S" | tr -d '\n' ;} +function msg { println "$*" >&2 ;} +function println { printf '%s\n' "$(now) $*" ;} + + +# Populates requested secrets set in SECRET_MANAGER_KEYS from service account: +# kokoro-trampoline@cloud-devrel-kokoro-resources.iam.gserviceaccount.com +SECRET_LOCATION="${KOKORO_GFILE_DIR}/secret_manager" +msg "Creating folder on disk for secrets: ${SECRET_LOCATION}" +mkdir -p ${SECRET_LOCATION} +for key in $(echo ${SECRET_MANAGER_KEYS} | sed "s/,/ /g") +do + msg "Retrieving secret ${key}" + docker run --entrypoint=gcloud \ + --volume=${KOKORO_GFILE_DIR}:${KOKORO_GFILE_DIR} \ + gcr.io/google.com/cloudsdktool/cloud-sdk \ + secrets versions access latest \ + --project cloud-devrel-kokoro-resources \ + --secret ${key} > \ + "${SECRET_LOCATION}/${key}" + if [[ $? == 0 ]]; then + msg "Secret written to ${SECRET_LOCATION}/${key}" + else + msg "Error retrieving secret ${key}" + fi +done diff --git a/.kokoro/presubmit/clirr.cfg b/.kokoro/presubmit/clirr.cfg new file mode 100644 index 00000000..ec572442 --- /dev/null +++ b/.kokoro/presubmit/clirr.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "clirr" +} \ No newline at end of file diff --git a/.kokoro/presubmit/common.cfg b/.kokoro/presubmit/common.cfg new file mode 100644 index 00000000..d70dba13 --- /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-channel/.kokoro/trampoline.sh" + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-channel/.kokoro/build.sh" +} + +env_vars: { + key: "JOB_TYPE" + value: "test" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "dpebot_codecov_token" + } + } +} diff --git a/.kokoro/presubmit/dependencies.cfg b/.kokoro/presubmit/dependencies.cfg new file mode 100644 index 00000000..cc4adf6c --- /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-channel/.kokoro/dependencies.sh" +} diff --git a/.kokoro/presubmit/integration.cfg b/.kokoro/presubmit/integration.cfg new file mode 100644 index 00000000..dded67a9 --- /dev/null +++ b/.kokoro/presubmit/integration.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "integration" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "gcloud-devel" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-it-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-it-service-account" +} diff --git a/.kokoro/presubmit/java11.cfg b/.kokoro/presubmit/java11.cfg new file mode 100644 index 00000000..709f2b4c --- /dev/null +++ b/.kokoro/presubmit/java11.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java11" +} diff --git a/.kokoro/presubmit/java7.cfg b/.kokoro/presubmit/java7.cfg new file mode 100644 index 00000000..cb24f44e --- /dev/null +++ b/.kokoro/presubmit/java7.cfg @@ -0,0 +1,7 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java7" +} diff --git a/.kokoro/presubmit/java8-osx.cfg b/.kokoro/presubmit/java8-osx.cfg new file mode 100644 index 00000000..e95be44b --- /dev/null +++ b/.kokoro/presubmit/java8-osx.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-channel/.kokoro/build.sh" diff --git a/.kokoro/presubmit/java8-win.cfg b/.kokoro/presubmit/java8-win.cfg new file mode 100644 index 00000000..545c3773 --- /dev/null +++ b/.kokoro/presubmit/java8-win.cfg @@ -0,0 +1,3 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +build_file: "java-channel/.kokoro/build.bat" diff --git a/.kokoro/presubmit/java8.cfg b/.kokoro/presubmit/java8.cfg new file mode 100644 index 00000000..495cc7ba --- /dev/null +++ b/.kokoro/presubmit/java8.cfg @@ -0,0 +1,12 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "REPORT_COVERAGE" + value: "true" +} diff --git a/.kokoro/presubmit/linkage-monitor.cfg b/.kokoro/presubmit/linkage-monitor.cfg new file mode 100644 index 00000000..0627b622 --- /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-channel/.kokoro/linkage-monitor.sh" +} \ No newline at end of file diff --git a/.kokoro/presubmit/lint.cfg b/.kokoro/presubmit/lint.cfg new file mode 100644 index 00000000..6d323c8a --- /dev/null +++ b/.kokoro/presubmit/lint.cfg @@ -0,0 +1,13 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. + +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "lint" +} \ No newline at end of file diff --git a/.kokoro/presubmit/samples.cfg b/.kokoro/presubmit/samples.cfg new file mode 100644 index 00000000..01e09600 --- /dev/null +++ b/.kokoro/presubmit/samples.cfg @@ -0,0 +1,33 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +env_vars: { + key: "JOB_TYPE" + value: "samples" +} + +# TODO: remove this after we've migrated all tests and scripts +env_vars: { + key: "GCLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_CLOUD_PROJECT" + value: "java-docs-samples-testing" +} + +env_vars: { + key: "GOOGLE_APPLICATION_CREDENTIALS" + value: "secret_manager/java-docs-samples-service-account" +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "java-docs-samples-service-account" +} \ No newline at end of file diff --git a/.kokoro/readme.sh b/.kokoro/readme.sh new file mode 100755 index 00000000..2d50bf05 --- /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-channel + +# 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-channel \ + --synth-file-name=.github/readme/synth.py \ + --metadata-path=.github/readme/synth.metadata \ + --pr-title="chore: regenerate README" \ + --branch-suffix="readme" + +# autosynth returns 28 to signal there are no changes +RETURN_CODE=$? +if [[ ${RETURN_CODE} -ne 0 && ${RETURN_CODE} -ne 28 ]] +then + exit ${RETURN_CODE} +fi diff --git a/.kokoro/release/bump_snapshot.cfg b/.kokoro/release/bump_snapshot.cfg new file mode 100644 index 00000000..92eee2ae --- /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-channel/.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-channel/.kokoro/release/bump_snapshot.sh" +} + +# tokens used by release-please to keep an up-to-date release PR. +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-key-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-token-release-please" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "github-magic-proxy-url-release-please" + } + } +} diff --git a/.kokoro/release/common.cfg b/.kokoro/release/common.cfg new file mode 100644 index 00000000..55f07e14 --- /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-channel/.kokoro/trampoline.sh" + +# Configure the docker image for kokoro-trampoline. +env_vars: { + key: "TRAMPOLINE_IMAGE" + value: "gcr.io/cloud-devrel-kokoro-resources/java8" +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-keyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-passphrase" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "maven-gpg-pubkeyring" + } + } +} + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 70247 + keyname: "sonatype-credentials" + } + } +} diff --git a/.kokoro/release/common.sh b/.kokoro/release/common.sh new file mode 100755 index 00000000..6e3f6599 --- /dev/null +++ b/.kokoro/release/common.sh @@ -0,0 +1,50 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# Get secrets from keystore and set and environment variables +setup_environment_secrets() { + export GPG_PASSPHRASE=$(cat ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-passphrase) + export GPG_TTY=$(tty) + export GPG_HOMEDIR=/gpg + mkdir $GPG_HOMEDIR + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-pubkeyring $GPG_HOMEDIR/pubring.gpg + mv ${KOKORO_KEYSTORE_DIR}/70247_maven-gpg-keyring $GPG_HOMEDIR/secring.gpg + export SONATYPE_USERNAME=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f1 -d'|') + export SONATYPE_PASSWORD=$(cat ${KOKORO_KEYSTORE_DIR}/70247_sonatype-credentials | cut -f2 -d'|') +} + +create_settings_xml_file() { + echo " + + + ossrh + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-staging + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + + sonatype-nexus-snapshots + ${SONATYPE_USERNAME} + ${SONATYPE_PASSWORD} + + +" > $1 +} \ No newline at end of file diff --git a/.kokoro/release/drop.cfg b/.kokoro/release/drop.cfg new file mode 100644 index 00000000..fd60ff14 --- /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-channel/.kokoro/release/drop.sh" +} diff --git a/.kokoro/release/drop.sh b/.kokoro/release/drop.sh new file mode 100755 index 00000000..5c4551ef --- /dev/null +++ b/.kokoro/release/drop.sh @@ -0,0 +1,32 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:drop -B \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/promote.cfg b/.kokoro/release/promote.cfg new file mode 100644 index 00000000..697a8b81 --- /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-channel/.kokoro/release/promote.sh" +} diff --git a/.kokoro/release/promote.sh b/.kokoro/release/promote.sh new file mode 100755 index 00000000..1fa95fa5 --- /dev/null +++ b/.kokoro/release/promote.sh @@ -0,0 +1,34 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +set -eo pipefail + +# STAGING_REPOSITORY_ID must be set +if [ -z "${STAGING_REPOSITORY_ID}" ]; then + echo "Missing STAGING_REPOSITORY_ID environment variable" + exit 1 +fi + +source $(dirname "$0")/common.sh + +pushd $(dirname "$0")/../../ + +setup_environment_secrets +create_settings_xml_file "settings.xml" + +mvn nexus-staging:release -B \ + -DperformRelease=true \ + --settings=settings.xml \ + -DstagingRepositoryId=${STAGING_REPOSITORY_ID} diff --git a/.kokoro/release/publish_javadoc.cfg b/.kokoro/release/publish_javadoc.cfg new file mode 100644 index 00000000..050b2d7a --- /dev/null +++ b/.kokoro/release/publish_javadoc.cfg @@ -0,0 +1,29 @@ +# Format: //devtools/kokoro/config/proto/build.proto + +gfile_resources: "/bigstore/cloud-devrel-kokoro-resources/doc-templates/" + +env_vars: { + key: "STAGING_BUCKET" + value: "docs-staging" +} + +env_vars: { + key: "STAGING_BUCKET_V2" + value: "docs-staging-v2" + # Production will be at: docs-staging-v2 +} + +env_vars: { + key: "TRAMPOLINE_BUILD_FILE" + value: "github/java-channel/.kokoro/release/publish_javadoc.sh" +} + + +before_action { + fetch_keystore { + keystore_resource { + keystore_config_id: 73713 + keyname: "docuploader_service_account" + } + } +} diff --git a/.kokoro/release/publish_javadoc.sh b/.kokoro/release/publish_javadoc.sh new file mode 100755 index 00000000..5f28e7a9 --- /dev/null +++ b/.kokoro/release/publish_javadoc.sh @@ -0,0 +1,77 @@ +#!/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-channel +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} + +popd + +# V2 due to problems w/ the released javadoc plugin doclava, Java 8 is required. Beware of accidental updates. + +mvn clean site -B -q -Ddevsite.template="${KOKORO_GFILE_DIR}/java/" + +pushd target/devsite/reference + +# create metadata +python3 -m docuploader create-metadata \ + --name ${NAME} \ + --version ${VERSION} \ + --language java + +# upload docs +python3 -m docuploader upload . \ + --credentials ${CREDENTIALS} \ + --staging-bucket ${STAGING_BUCKET_V2} diff --git a/.kokoro/release/snapshot.cfg b/.kokoro/release/snapshot.cfg new file mode 100644 index 00000000..f43336bd --- /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-channel/.kokoro/release/snapshot.sh" +} \ No newline at end of file diff --git a/.kokoro/release/snapshot.sh b/.kokoro/release/snapshot.sh new file mode 100755 index 00000000..098168a7 --- /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 00000000..a05109c8 --- /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-channel/.kokoro/release/stage.sh" +} + +# Need to save the properties file +action { + define_artifacts { + regex: "github/java-channel/target/nexus-staging/staging/*.properties" + strip_prefix: "github/java-channel" + } +} + +env_vars: { + key: "SECRET_MANAGER_KEYS" + value: "releasetool-publish-reporter-app,releasetool-publish-reporter-googleapis-installation,releasetool-publish-reporter-pem" +} diff --git a/.kokoro/release/stage.sh b/.kokoro/release/stage.sh new file mode 100755 index 00000000..16126d2e --- /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 00000000..9da0f839 --- /dev/null +++ b/.kokoro/trampoline.sh @@ -0,0 +1,26 @@ +#!/bin/bash +# Copyright 2018 Google Inc. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +set -eo pipefail +# Always run the cleanup script, regardless of the success of bouncing into +# the container. +function cleanup() { + chmod +x ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + ${KOKORO_GFILE_DIR}/trampoline_cleanup.sh + echo "cleanup"; +} +trap cleanup EXIT + +$(dirname $0)/populate-secrets.sh # Secret Manager secrets. +python3 "${KOKORO_GFILE_DIR}/trampoline_v1.py" diff --git a/.repo-metadata.json b/.repo-metadata.json new file mode 100644 index 00000000..bbeb839d --- /dev/null +++ b/.repo-metadata.json @@ -0,0 +1,15 @@ +{ + "name": "channel", + "name_pretty": "Channel Services", + "product_documentation": "https://cloud.google.com/channel/docs", + "api_description": "With Channel Services, Google Cloud partners and resellers have a single unified resale platform, with a unified resale catalog, customer management, order management, billing management, policy and authorization management, and cost management.", + "client_documentation": "https://googleapis.dev/java/google-cloud-channel/latest/index.html", + "release_level": "ga", + "transport": "grpc", + "language": "java", + "repo": "googleapis/java-channel", + "repo_short": "java-channel", + "distribution_name": "com.google.cloud:google-cloud-channel", + "api_id": "channel.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 00000000..2add2547 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 00000000..f2dbdee0 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,139 @@ +# How to Contribute + +We'd love to accept your patches and contributions to this project. There are +just a few small guidelines you need to follow. + +## Contributor License Agreement + +Contributions to this project must be accompanied by a Contributor License +Agreement. You (or your employer) retain the copyright to your contribution; +this simply gives us permission to use and redistribute your contributions as +part of the project. Head over to to see +your current agreements on file or to sign a new one. + +You generally only need to submit a CLA once, so if you've already submitted one +(even if it was for a different project), you probably don't need to do it +again. + +## Code reviews + +All submissions, including submissions by project members, require review. We +use GitHub pull requests for this purpose. Consult +[GitHub Help](https://help.github.com/articles/about-pull-requests/) for more +information on using pull requests. + +## Community Guidelines + +This project follows +[Google's Open Source Community Guidelines](https://opensource.google.com/conduct/). + +## Building the project + +To build, package, and run all unit tests run the command + +``` +mvn clean verify +``` + +### Running Integration tests + +To include integration tests when building the project, you need access to +a GCP Project with a valid service account. + +For instructions on how to generate a service account and corresponding +credentials JSON see: [Creating a Service Account][1]. + +Then run the following to build, package, run all unit tests and run all +integration tests. + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-integration-tests clean verify +``` + +## Code Samples + +Code Samples must be bundled in separate Maven modules, and guarded by a +Maven profile with the name `enable-samples`. + +The samples must be separate from the primary project for a few reasons: +1. Primary projects have a minimum Java version of Java 7 whereas samples have + a minimum Java version of Java 8. Due to this we need the ability to + selectively exclude samples from a build run. +2. Many code samples depend on external GCP services and need + credentials to access the service. +3. Code samples are not released as Maven artifacts and must be excluded from + release builds. + +### Building + +```bash +mvn -Penable-samples clean verify +``` + +Some samples require access to GCP services and require a service account: + +```bash +export GOOGLE_APPLICATION_CREDENTIALS=/path/to/service/account.json +mvn -Penable-samples clean verify +``` + +### Profile Config + +1. To add samples in a profile to your Maven project, add the following to your +`pom.xml` + + ```xml + + [...] + + + enable-samples + + sample + + + + [...] + + ``` + +2. [Activate](#profile-activation) the profile. +3. Define your samples in a normal Maven project in the `samples/` directory. + +### Code Formatting + +Code in this repo is formatted with +[google-java-format](https://github.com/google/google-java-format). +To run formatting on your project, you can run: +``` +mvn com.coveo:fmt-maven-plugin:format +``` + +### Profile Activation + +To include code samples when building and testing the project, enable the +`enable-samples` Maven profile. + +#### Command line + +To activate the Maven profile on the command line add `-Penable-samples` to your +Maven command. + +#### Maven `settings.xml` + +To activate the Maven profile in your `~/.m2/settings.xml` add an entry of +`enable-samples` following the instructions in [Active Profiles][2]. + +This method has the benefit of applying to all projects you build (and is +respected by IntelliJ IDEA) and is recommended if you are going to be +contributing samples to several projects. + +#### IntelliJ IDEA + +To activate the Maven Profile inside IntelliJ IDEA, follow the instructions in +[Activate Maven profiles][3] to activate `enable-samples`. + +[1]: https://cloud.google.com/docs/authentication/getting-started#creating_a_service_account +[2]: https://maven.apache.org/settings.html#Active_Profiles +[3]: https://www.jetbrains.com/help/idea/work-with-maven-profiles.html#activate_maven_profiles diff --git a/LICENSE b/LICENSE new file mode 100644 index 00000000..d6456956 --- /dev/null +++ b/LICENSE @@ -0,0 +1,202 @@ + + 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 00000000..cb8960e3 --- /dev/null +++ b/README.md @@ -0,0 +1,83 @@ +# Google Channel Services Client for Java + +Java idiomatic client for [Channel Services][product-docs]. + + +- [Product Documentation][product-docs] + +## Authentication + +See the [Authentication][authentication] section in the base directory's README. + +### Prerequisites + +You will need a [Google Cloud Platform Console][developer-console] project with the Channel Services enabled. +You will need to [enable billing][enable-billing] to use Google Channel Services. +[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-channel` library. See the Quickstart section +to add `google-cloud-channel` as a dependency in your code. + +## About Channel Services + +With [Channel Services][product-docs], Google Cloud partners and resellers have +a single unified resale platform, with a unified resale catalog, customer management, +order management, billing management, policy and authorization management, and cost +management. + +## Troubleshooting + +To get help, follow the instructions in the [shared Troubleshooting document][troubleshooting]. + +## Transport + +Channel Services 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. + + + +[product-docs]: https://cloud.google.com/channel/docs +[stability-image]: https://img.shields.io/badge/stability-beta-yellow +[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-channel/blob/master/CONTRIBUTING.md +[code-of-conduct]: https://github.com/googleapis/java-channel/blob/master/CODE_OF_CONDUCT.md#contributor-code-of-conduct +[license]: https://github.com/googleapis/java-channel/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=channel.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 00000000..5724ea94 --- /dev/null +++ b/codecov.yaml @@ -0,0 +1,4 @@ +--- +codecov: + ci: + - source.cloud.google.com diff --git a/google-cloud-channel-bom/pom.xml b/google-cloud-channel-bom/pom.xml new file mode 100644 index 00000000..2aed6828 --- /dev/null +++ b/google-cloud-channel-bom/pom.xml @@ -0,0 +1,97 @@ + + + 4.0.0 + com.google.cloud + google-cloud-channel-bom + 0.0.1-SNAPSHOT + pom + + com.google.cloud + google-cloud-shared-config + 0.9.2 + + + Google Channel Services BOM + https://github.com/googleapis/java-channel + + BOM for Channel Services + + + + Google LLC + + + + + chingor13 + Jeff Ching + chingor@google.com + Google LLC + + Developer + + + + + + scm:git:https://github.com/googleapis/java-channel.git + scm:git:git@github.com:googleapis/java-channel.git + https://github.com/googleapis/java-channel + + + + 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-channel + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-channel-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-channel-v1 + 0.0.1-SNAPSHOT + + + + + + + + org.apache.maven.plugins + maven-checkstyle-plugin + + true + + + + + \ No newline at end of file diff --git a/google-cloud-channel/pom.xml b/google-cloud-channel/pom.xml new file mode 100644 index 00000000..800ed86f --- /dev/null +++ b/google-cloud-channel/pom.xml @@ -0,0 +1,111 @@ + + + 4.0.0 + com.google.cloud + google-cloud-channel + 0.0.1-SNAPSHOT + jar + Google Channel Services + https://github.com/googleapis/java-channel + With Channel Services, Google Cloud partners and resellers have a single unified resale platform, with a unified resale catalog, customer management, order management, billing management, policy and authorization management, and cost management. + + com.google.cloud + google-cloud-channel-parent + 0.0.1-SNAPSHOT + + + google-cloud-channel + + + + 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-channel-v1 + + + com.google.guava + guava + + + com.google.api + gax + + + com.google.api + gax-grpc + + + org.threeten + threetenbp + + + + + junit + junit + test + 4.13 + + + + com.google.api.grpc + grpc-google-cloud-channel-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-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceClient.java b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceClient.java new file mode 100644 index 00000000..7ebf8ec5 --- /dev/null +++ b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceClient.java @@ -0,0 +1,3394 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.ApiFutures; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.longrunning.OperationFuture; +import com.google.api.gax.paging.AbstractFixedSizeCollection; +import com.google.api.gax.paging.AbstractPage; +import com.google.api.gax.paging.AbstractPagedListResponse; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.channel.v1.stub.CloudChannelServiceStub; +import com.google.cloud.channel.v1.stub.CloudChannelServiceStubSettings; +import com.google.common.util.concurrent.MoreExecutors; +import com.google.longrunning.Operation; +import com.google.longrunning.OperationsClient; +import com.google.protobuf.Empty; +import java.io.IOException; +import java.util.List; +import java.util.concurrent.TimeUnit; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +/** + * Service Description: CloudChannelService enables Google cloud resellers and distributors to + * manage their customers, channel partners, entitlements and reports. + * + *

Using this service: 1. Resellers or distributors can manage a customer entity. 2. Distributors + * can register an authorized reseller in their channel and then enable delegated admin access for + * the reseller. 3. Resellers or distributors can manage entitlements for their customers. + * + *

The service primarily exposes the following resources: - + * [Customer][google.cloud.channel.v1.Customer]s: A Customer represents an entity managed by a + * reseller or distributor. A customer typically represents an enterprise. In an n-tier resale + * channel hierarchy, customers are generally represented as leaf nodes. Customers primarily have an + * Entitlement sub-resource discussed below. + * + *

- [Entitlement][google.cloud.channel.v1.Entitlement]s: An Entitlement represents an entity + * which provides a customer means to start using a service. Entitlements are created or updated as + * a result of a successful fulfillment. + * + *

- [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s: A ChannelPartnerLink is + * an entity that identifies links between distributors and their indirect resellers in a channel. + * + *

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

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

To customize credentials: + * + *

{@code
+ * CloudChannelServiceSettings cloudChannelServiceSettings =
+ *     CloudChannelServiceSettings.newBuilder()
+ *         .setCredentialsProvider(FixedCredentialsProvider.create(myCredentials))
+ *         .build();
+ * CloudChannelServiceClient cloudChannelServiceClient =
+ *     CloudChannelServiceClient.create(cloudChannelServiceSettings);
+ * }
+ * + *

To customize the endpoint: + * + *

{@code
+ * CloudChannelServiceSettings cloudChannelServiceSettings =
+ *     CloudChannelServiceSettings.newBuilder().setEndpoint(myEndpoint).build();
+ * CloudChannelServiceClient cloudChannelServiceClient =
+ *     CloudChannelServiceClient.create(cloudChannelServiceSettings);
+ * }
+ * + *

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

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: <br/> List of [Customer][google.cloud.channel.v1.Customer]s pertaining + * to the reseller or empty list if there are none. + * + * @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 ListCustomersPagedResponse listCustomers(ListCustomersRequest request) { + return listCustomersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List downstream [Customer][google.cloud.channel.v1.Customer]s. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: <br/> List of [Customer][google.cloud.channel.v1.Customer]s pertaining + * to the reseller or empty list if there are none. + * + *

Sample code: + */ + public final UnaryCallable + listCustomersPagedCallable() { + return stub.listCustomersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List downstream [Customer][google.cloud.channel.v1.Customer]s. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: <br/> List of [Customer][google.cloud.channel.v1.Customer]s pertaining + * to the reseller or empty list if there are none. + * + *

Sample code: + */ + public final UnaryCallable listCustomersCallable() { + return stub.listCustomersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a requested [Customer][google.cloud.channel.v1.Customer] resource. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: If the customer resource doesn't exist. Usually the result of an invalid name + * parameter. + *
+ * + *

Return Value: <br/> [Customer][google.cloud.channel.v1.Customer] resource if found, + * error otherwise. + * + * @param name Required. The resource name of the customer to retrieve. The name takes the format: + * accounts/{account_id}/customers/{customer_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Customer getCustomer(CustomerName name) { + GetCustomerRequest request = + GetCustomerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + return getCustomer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a requested [Customer][google.cloud.channel.v1.Customer] resource. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: If the customer resource doesn't exist. Usually the result of an invalid name + * parameter. + *
+ * + *

Return Value: <br/> [Customer][google.cloud.channel.v1.Customer] resource if found, + * error otherwise. + * + * @param name Required. The resource name of the customer to retrieve. The name takes the format: + * accounts/{account_id}/customers/{customer_id} + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final Customer getCustomer(String name) { + GetCustomerRequest request = GetCustomerRequest.newBuilder().setName(name).build(); + return getCustomer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a requested [Customer][google.cloud.channel.v1.Customer] resource. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: If the customer resource doesn't exist. Usually the result of an invalid name + * parameter. + *
+ * + *

Return Value: <br/> [Customer][google.cloud.channel.v1.Customer] resource if found, + * error otherwise. + * + * @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 Customer getCustomer(GetCustomerRequest request) { + return getCustomerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a requested [Customer][google.cloud.channel.v1.Customer] resource. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: If the customer resource doesn't exist. Usually the result of an invalid name + * parameter. + *
+ * + *

Return Value: <br/> [Customer][google.cloud.channel.v1.Customer] resource if found, + * error otherwise. + * + *

Sample code: + */ + public final UnaryCallable getCustomerCallable() { + return stub.getCustomerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Confirms the existence of Cloud Identity accounts, based on the domain and whether the Cloud + * Identity accounts are owned by the reseller. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • INVALID_VALUE: Invalid domain value in the request. + *
  • NOT_FOUND: If there is no + * [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] + * customer for the domain specified in the request. + *
+ * + *

Return Value: <br/> List of + * [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources + * if any exist for the domain, otherwise an error is returned. + * + * @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 CheckCloudIdentityAccountsExistResponse checkCloudIdentityAccountsExist( + CheckCloudIdentityAccountsExistRequest request) { + return checkCloudIdentityAccountsExistCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Confirms the existence of Cloud Identity accounts, based on the domain and whether the Cloud + * Identity accounts are owned by the reseller. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • INVALID_VALUE: Invalid domain value in the request. + *
  • NOT_FOUND: If there is no + * [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] + * customer for the domain specified in the request. + *
+ * + *

Return Value: <br/> List of + * [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources + * if any exist for the domain, otherwise an error is returned. + * + *

Sample code: + */ + public final UnaryCallable< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistCallable() { + return stub.checkCloudIdentityAccountsExistCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [Customer][google.cloud.channel.v1.Customer] resource under the reseller or + * distributor account. + * + *

Possible Error Codes: <ul> <li>PERMISSION_DENIED: If the reseller account making + * the request and the reseller account being queried for are different.</li> <li> + * INVALID_ARGUMENT: <ul> <li> Missing or invalid required parameters in the request. + * </li> <li> Domain field value doesn't match the domain specified in primary + * email.</li> </ul> </li> </ul> + * + *

Return Value: <br/> If successful, the newly created + * [Customer][google.cloud.channel.v1.Customer] resource, otherwise returns an error. + * + * @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 Customer createCustomer(CreateCustomerRequest request) { + return createCustomerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a new [Customer][google.cloud.channel.v1.Customer] resource under the reseller or + * distributor account. + * + *

Possible Error Codes: <ul> <li>PERMISSION_DENIED: If the reseller account making + * the request and the reseller account being queried for are different.</li> <li> + * INVALID_ARGUMENT: <ul> <li> Missing or invalid required parameters in the request. + * </li> <li> Domain field value doesn't match the domain specified in primary + * email.</li> </ul> </li> </ul> + * + *

Return Value: <br/> If successful, the newly created + * [Customer][google.cloud.channel.v1.Customer] resource, otherwise returns an error. + * + *

Sample code: + */ + public final UnaryCallable createCustomerCallable() { + return stub.createCustomerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an existing [Customer][google.cloud.channel.v1.Customer] resource belonging to the + * reseller or distributor. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name + * specified in the request. + *
+ * + *

Return Value: <br/> If successful, the updated + * [Customer][google.cloud.channel.v1.Customer] resource, otherwise returns an error. + * + * @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 Customer updateCustomer(UpdateCustomerRequest request) { + return updateCustomerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates an existing [Customer][google.cloud.channel.v1.Customer] resource belonging to the + * reseller or distributor. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name + * specified in the request. + *
+ * + *

Return Value: <br/> If successful, the updated + * [Customer][google.cloud.channel.v1.Customer] resource, otherwise returns an error. + * + *

Sample code: + */ + public final UnaryCallable updateCustomerCallable() { + return stub.updateCustomerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently and irreversibly. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the account making the request does not own this customer. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • FAILED_PRECONDITION: If the customer has existing entitlements. + *
  • NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name + * specified in the request. + *
+ * + * @param name Required. The resource name of the customer to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCustomer(CustomerName name) { + DeleteCustomerRequest request = + DeleteCustomerRequest.newBuilder().setName(name == null ? null : name.toString()).build(); + deleteCustomer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently and irreversibly. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the account making the request does not own this customer. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • FAILED_PRECONDITION: If the customer has existing entitlements. + *
  • NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name + * specified in the request. + *
+ * + * @param name Required. The resource name of the customer to delete. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCustomer(String name) { + DeleteCustomerRequest request = DeleteCustomerRequest.newBuilder().setName(name).build(); + deleteCustomer(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently and irreversibly. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the account making the request does not own this customer. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • FAILED_PRECONDITION: If the customer has existing entitlements. + *
  • NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name + * specified in the request. + *
+ * + * @param request The request object containing all of the parameters for the API call. + * @throws com.google.api.gax.rpc.ApiException if the remote call fails + */ + public final void deleteCustomer(DeleteCustomerRequest request) { + deleteCustomerCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently and irreversibly. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the account making the request does not own this customer. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • FAILED_PRECONDITION: If the customer has existing entitlements. + *
  • NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name + * specified in the request. + *
+ * + *

Sample code: + */ + public final UnaryCallable deleteCustomerCallable() { + return stub.deleteCustomerCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Cloud Identity for the given customer using the customer's information or the + * information provided here, if present. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: If the customer is not found for the reseller. + *
  • ALREADY_EXISTS: If the customer's primary email already exists. In this case, retry after + * changing the customer's primary contact email. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud + * Channel support in this case. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud + * Channel support in this case. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + * @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 provisionCloudIdentityAsync( + ProvisionCloudIdentityRequest request) { + return provisionCloudIdentityOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Cloud Identity for the given customer using the customer's information or the + * information provided here, if present. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: If the customer is not found for the reseller. + *
  • ALREADY_EXISTS: If the customer's primary email already exists. In this case, retry after + * changing the customer's primary contact email. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud + * Channel support in this case. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud + * Channel support in this case. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final OperationCallable + provisionCloudIdentityOperationCallable() { + return stub.provisionCloudIdentityOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates a Cloud Identity for the given customer using the customer's information or the + * information provided here, if present. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: If the customer is not found for the reseller. + *
  • ALREADY_EXISTS: If the customer's primary email already exists. In this case, retry after + * changing the customer's primary contact email. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. Contact Cloud + * Channel support in this case. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. Contact Cloud + * Channel support in this case. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final UnaryCallable + provisionCloudIdentityCallable() { + return stub.provisionCloudIdentityCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: <br/> List of [Entitlement][google.cloud.channel.v1.Entitlement]s + * belonging to the customer, or empty list if there are none. + * + * @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 ListEntitlementsPagedResponse listEntitlements(ListEntitlementsRequest request) { + return listEntitlementsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: <br/> List of [Entitlement][google.cloud.channel.v1.Entitlement]s + * belonging to the customer, or empty list if there are none. + * + *

Sample code: + */ + public final UnaryCallable + listEntitlementsPagedCallable() { + return stub.listEntitlementsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: <br/> List of [Entitlement][google.cloud.channel.v1.Entitlement]s + * belonging to the customer, or empty list if there are none. + * + *

Sample code: + */ + public final UnaryCallable + listEntitlementsCallable() { + return stub.listEntitlementsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on Cloud + * Identity ID or Customer Name in the request. + * + *

This method is used when a reseller lists the entitlements information of a customer that is + * not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name. + * + *

Possible Error Codes: <ul> <li>PERMISSION_DENIED, due to one of the following + * reasons: <ul> <li> If the customer doesn't belong to the reseller and no auth + * token, or an invalid auth token is supplied. </li> <li> If the reseller account + * making the request and the reseller account being queried for are different. </li> + * </ul> </li> <li> INVALID_ARGUMENT: Missing or invalid required parameters in + * the request.</li> </ul> + * + *

Return Value: <br/> List of [TransferableSku][google.cloud.channel.v1.TransferableSku] + * for the given customer. + * + * @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 ListTransferableSkusPagedResponse listTransferableSkus( + ListTransferableSkusRequest request) { + return listTransferableSkusPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on Cloud + * Identity ID or Customer Name in the request. + * + *

This method is used when a reseller lists the entitlements information of a customer that is + * not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name. + * + *

Possible Error Codes: <ul> <li>PERMISSION_DENIED, due to one of the following + * reasons: <ul> <li> If the customer doesn't belong to the reseller and no auth + * token, or an invalid auth token is supplied. </li> <li> If the reseller account + * making the request and the reseller account being queried for are different. </li> + * </ul> </li> <li> INVALID_ARGUMENT: Missing or invalid required parameters in + * the request.</li> </ul> + * + *

Return Value: <br/> List of [TransferableSku][google.cloud.channel.v1.TransferableSku] + * for the given customer. + * + *

Sample code: + */ + public final UnaryCallable + listTransferableSkusPagedCallable() { + return stub.listTransferableSkusPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on Cloud + * Identity ID or Customer Name in the request. + * + *

This method is used when a reseller lists the entitlements information of a customer that is + * not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name. + * + *

Possible Error Codes: <ul> <li>PERMISSION_DENIED, due to one of the following + * reasons: <ul> <li> If the customer doesn't belong to the reseller and no auth + * token, or an invalid auth token is supplied. </li> <li> If the reseller account + * making the request and the reseller account being queried for are different. </li> + * </ul> </li> <li> INVALID_ARGUMENT: Missing or invalid required parameters in + * the request.</li> </ul> + * + *

Return Value: <br/> List of [TransferableSku][google.cloud.channel.v1.TransferableSku] + * for the given customer. + * + *

Sample code: + */ + public final UnaryCallable + listTransferableSkusCallable() { + return stub.listTransferableSkusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on + * Cloud Identity ID or Customer Name in the request. + * + *

This method is used when a reseller gets the entitlement information of a customer that is + * not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED, due to one of the following reasons: (a) If the customer doesn't + * belong to the reseller and no auth token or invalid auth token is supplied. (b) If the + * reseller account making the request and the reseller account being queried for are + * different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the + * given customer and SKU. + * + * @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 ListTransferableOffersPagedResponse listTransferableOffers( + ListTransferableOffersRequest request) { + return listTransferableOffersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on + * Cloud Identity ID or Customer Name in the request. + * + *

This method is used when a reseller gets the entitlement information of a customer that is + * not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED, due to one of the following reasons: (a) If the customer doesn't + * belong to the reseller and no auth token or invalid auth token is supplied. (b) If the + * reseller account making the request and the reseller account being queried for are + * different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the + * given customer and SKU. + * + *

Sample code: + */ + public final UnaryCallable + listTransferableOffersPagedCallable() { + return stub.listTransferableOffersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on + * Cloud Identity ID or Customer Name in the request. + * + *

This method is used when a reseller gets the entitlement information of a customer that is + * not owned. The reseller should provide the customer's Cloud Identity ID or Customer Name. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED, due to one of the following reasons: (a) If the customer doesn't + * belong to the reseller and no auth token or invalid auth token is supplied. (b) If the + * reseller account making the request and the reseller account being queried for are + * different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the + * given customer and SKU. + * + *

Sample code: + */ + public final UnaryCallable + listTransferableOffersCallable() { + return stub.listTransferableOffersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a requested [Entitlement][google.cloud.channel.v1.Entitlement] resource. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: If the entitlement is not found for the customer. + *
+ * + *

Return Value: <br/> If found, the requested + * [Entitlement][google.cloud.channel.v1.Entitlement] resource, otherwise returns an error. + * + * @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 Entitlement getEntitlement(GetEntitlementRequest request) { + return getEntitlementCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a requested [Entitlement][google.cloud.channel.v1.Entitlement] resource. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: If the entitlement is not found for the customer. + *
+ * + *

Return Value: <br/> If found, the requested + * [Entitlement][google.cloud.channel.v1.Entitlement] resource, otherwise returns an error. + * + *

Sample code: + */ + public final UnaryCallable getEntitlementCallable() { + return stub.getEntitlementCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an entitlement for a customer. + * + *

Possible Error Codes: <ul> <li> PERMISSION_DENIED: If the customer doesn't + * belong to the reseller. </li> <li> INVALID_ARGUMENT: <ul> <li> Missing + * or invalid required parameters in the request. </li> <li> Cannot purchase an + * entitlement if there is already an entitlement for customer, for a SKU from the same product + * family. </li> <li> INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is + * valid. If it is valid, then contact Google Channel support for further troubleshooting. + * </li> </ul> </li> <li> NOT_FOUND: If the customer or offer resource is + * not found for the reseller. </li> <li> ALREADY_EXISTS: This failure can happen in + * the following cases: <ul> <li>If the SKU has been already purchased for the + * customer.</li> <li>If the customer's primary email already exists. In this case + * retry after changing the customer's primary contact email. </li> </ul> </li> + * <li> CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following + * cases: <ul> <li> Purchasing a SKU that requires domain verification and the domain + * has not been verified. </li> <li> Purchasing an Add-On SKU like Vault or Drive + * without purchasing the pre-requisite SKU, such as Google Workspace Business Starter. + * </li> <li> Applicable only for developer accounts: reseller and resold domain. Must + * meet the following domain naming requirements: <ul> <li> Domain names must start + * with goog-test. </li> <li> Resold domain names must include the reseller domain. + * </li> </ul> </li> </ul> </li> <li> INTERNAL: Any non-user + * error related to a technical issue in the backend. Contact Cloud Channel Support in this case. + * </li> <li> UNKNOWN: Any non-user error related to a technical issue in the backend. + * Contact Cloud Channel Support in this case. </li> </ul> + * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + * @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 createEntitlementAsync( + CreateEntitlementRequest request) { + return createEntitlementOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an entitlement for a customer. + * + *

Possible Error Codes: <ul> <li> PERMISSION_DENIED: If the customer doesn't + * belong to the reseller. </li> <li> INVALID_ARGUMENT: <ul> <li> Missing + * or invalid required parameters in the request. </li> <li> Cannot purchase an + * entitlement if there is already an entitlement for customer, for a SKU from the same product + * family. </li> <li> INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is + * valid. If it is valid, then contact Google Channel support for further troubleshooting. + * </li> </ul> </li> <li> NOT_FOUND: If the customer or offer resource is + * not found for the reseller. </li> <li> ALREADY_EXISTS: This failure can happen in + * the following cases: <ul> <li>If the SKU has been already purchased for the + * customer.</li> <li>If the customer's primary email already exists. In this case + * retry after changing the customer's primary contact email. </li> </ul> </li> + * <li> CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following + * cases: <ul> <li> Purchasing a SKU that requires domain verification and the domain + * has not been verified. </li> <li> Purchasing an Add-On SKU like Vault or Drive + * without purchasing the pre-requisite SKU, such as Google Workspace Business Starter. + * </li> <li> Applicable only for developer accounts: reseller and resold domain. Must + * meet the following domain naming requirements: <ul> <li> Domain names must start + * with goog-test. </li> <li> Resold domain names must include the reseller domain. + * </li> </ul> </li> </ul> </li> <li> INTERNAL: Any non-user + * error related to a technical issue in the backend. Contact Cloud Channel Support in this case. + * </li> <li> UNKNOWN: Any non-user error related to a technical issue in the backend. + * Contact Cloud Channel Support in this case. </li> </ul> + * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final OperationCallable + createEntitlementOperationCallable() { + return stub.createEntitlementOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Creates an entitlement for a customer. + * + *

Possible Error Codes: <ul> <li> PERMISSION_DENIED: If the customer doesn't + * belong to the reseller. </li> <li> INVALID_ARGUMENT: <ul> <li> Missing + * or invalid required parameters in the request. </li> <li> Cannot purchase an + * entitlement if there is already an entitlement for customer, for a SKU from the same product + * family. </li> <li> INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is + * valid. If it is valid, then contact Google Channel support for further troubleshooting. + * </li> </ul> </li> <li> NOT_FOUND: If the customer or offer resource is + * not found for the reseller. </li> <li> ALREADY_EXISTS: This failure can happen in + * the following cases: <ul> <li>If the SKU has been already purchased for the + * customer.</li> <li>If the customer's primary email already exists. In this case + * retry after changing the customer's primary contact email. </li> </ul> </li> + * <li> CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the following + * cases: <ul> <li> Purchasing a SKU that requires domain verification and the domain + * has not been verified. </li> <li> Purchasing an Add-On SKU like Vault or Drive + * without purchasing the pre-requisite SKU, such as Google Workspace Business Starter. + * </li> <li> Applicable only for developer accounts: reseller and resold domain. Must + * meet the following domain naming requirements: <ul> <li> Domain names must start + * with goog-test. </li> <li> Resold domain names must include the reseller domain. + * </li> </ul> </li> </ul> </li> <li> INTERNAL: Any non-user + * error related to a technical issue in the backend. Contact Cloud Channel Support in this case. + * </li> <li> UNKNOWN: Any non-user error related to a technical issue in the backend. + * Contact Cloud Channel Support in this case. </li> </ul> + * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final UnaryCallable createEntitlementCallable() { + return stub.createEntitlementCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Change parameters of the entitlement + * + *

An entitlement parameters update is a long-running operation and results in updates to the + * entitlement as a result of fulfillment. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. For example, if + * the number of seats being changed to is greater than the allowed number of max seats for + * the resource. Or decreasing seats for a commitment based plan. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + * @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 changeParametersAsync( + ChangeParametersRequest request) { + return changeParametersOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Change parameters of the entitlement + * + *

An entitlement parameters update is a long-running operation and results in updates to the + * entitlement as a result of fulfillment. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. For example, if + * the number of seats being changed to is greater than the allowed number of max seats for + * the resource. Or decreasing seats for a commitment based plan. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final OperationCallable + changeParametersOperationCallable() { + return stub.changeParametersOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Change parameters of the entitlement + * + *

An entitlement parameters update is a long-running operation and results in updates to the + * entitlement as a result of fulfillment. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. For example, if + * the number of seats being changed to is greater than the allowed number of max seats for + * the resource. Or decreasing seats for a commitment based plan. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final UnaryCallable changeParametersCallable() { + return stub.changeParametersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the renewal settings for an existing customer entitlement. + * + *

An entitlement update is a long-running operation and results in updates to the entitlement + * as a result of fulfillment. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't + * enable or disable renewal for non-commitment plans. + *
  • INTERNAL: Any non user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + * @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 changeRenewalSettingsAsync( + ChangeRenewalSettingsRequest request) { + return changeRenewalSettingsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the renewal settings for an existing customer entitlement. + * + *

An entitlement update is a long-running operation and results in updates to the entitlement + * as a result of fulfillment. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't + * enable or disable renewal for non-commitment plans. + *
  • INTERNAL: Any non user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final OperationCallable + changeRenewalSettingsOperationCallable() { + return stub.changeRenewalSettingsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the renewal settings for an existing customer entitlement. + * + *

An entitlement update is a long-running operation and results in updates to the entitlement + * as a result of fulfillment. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a commitment plan. Can't + * enable or disable renewal for non-commitment plans. + *
  • INTERNAL: Any non user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final UnaryCallable + changeRenewalSettingsCallable() { + return stub.changeRenewalSettingsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Offer for an existing customer entitlement. + * + *

An entitlement update is a long-running operation and results in updates to the entitlement + * as a result of fulfillment. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Offer or Entitlement resource not found. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + * @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 changeOfferAsync( + ChangeOfferRequest request) { + return changeOfferOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Offer for an existing customer entitlement. + * + *

An entitlement update is a long-running operation and results in updates to the entitlement + * as a result of fulfillment. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Offer or Entitlement resource not found. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final OperationCallable + changeOfferOperationCallable() { + return stub.changeOfferOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates the Offer for an existing customer entitlement. + * + *

An entitlement update is a long-running operation and results in updates to the entitlement + * as a result of fulfillment. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Offer or Entitlement resource not found. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final UnaryCallable changeOfferCallable() { + return stub.changeOfferCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts paid service for a trial entitlement. + * + *

Starts paid service for a trial entitlement immediately. This method is only applicable if a + * plan has already been set up for a trial entitlement but has some trial days remaining. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + * @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 startPaidServiceAsync( + StartPaidServiceRequest request) { + return startPaidServiceOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts paid service for a trial entitlement. + * + *

Starts paid service for a trial entitlement immediately. This method is only applicable if a + * plan has already been set up for a trial entitlement but has some trial days remaining. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final OperationCallable + startPaidServiceOperationCallable() { + return stub.startPaidServiceOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Starts paid service for a trial entitlement. + * + *

Starts paid service for a trial entitlement immediately. This method is only applicable if a + * plan has already been set up for a trial entitlement but has some trial days remaining. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for entitlement on trial plans. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final UnaryCallable startPaidServiceCallable() { + return stub.startPaidServiceCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Suspends a previously fulfilled entitlement. An entitlement suspension is a long-running + * operation. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • NOT_ACTIVE: Entitlement is not active. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + * @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 suspendEntitlementAsync( + SuspendEntitlementRequest request) { + return suspendEntitlementOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Suspends a previously fulfilled entitlement. An entitlement suspension is a long-running + * operation. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • NOT_ACTIVE: Entitlement is not active. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final OperationCallable + suspendEntitlementOperationCallable() { + return stub.suspendEntitlementOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Suspends a previously fulfilled entitlement. An entitlement suspension is a long-running + * operation. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • NOT_ACTIVE: Entitlement is not active. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final UnaryCallable suspendEntitlementCallable() { + return stub.suspendEntitlementCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a previously fulfilled entitlement. An entitlement cancellation is a long-running + * operation. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller + * account making the request and reseller account being queried for are different. + *
  • FAILED_PRECONDITION: If there are any Google Cloud projects linked to the Google Cloud + * entitlement's Cloud Billing subaccount. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons or + * entitlements for Google Cloud's development platform. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The + * Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + * @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 cancelEntitlementAsync( + CancelEntitlementRequest request) { + return cancelEntitlementOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a previously fulfilled entitlement. An entitlement cancellation is a long-running + * operation. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller + * account making the request and reseller account being queried for are different. + *
  • FAILED_PRECONDITION: If there are any Google Cloud projects linked to the Google Cloud + * entitlement's Cloud Billing subaccount. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons or + * entitlements for Google Cloud's development platform. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The + * Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final OperationCallable + cancelEntitlementOperationCallable() { + return stub.cancelEntitlementOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Cancels a previously fulfilled entitlement. An entitlement cancellation is a long-running + * operation. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller + * account making the request and reseller account being queried for are different. + *
  • FAILED_PRECONDITION: If there are any Google Cloud projects linked to the Google Cloud + * entitlement's Cloud Billing subaccount. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace add-ons or + * entitlements for Google Cloud's development platform. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The + * Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final UnaryCallable cancelEntitlementCallable() { + return stub.cancelEntitlementCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Activates a previously suspended entitlement. The entitlement must be in a suspended state for + * it to be activated. Entitlements suspended for pending ToS acceptance can't be activated using + * this method. An entitlement activation is a long-running operation and can result in updates to + * the state of the customer entitlement. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller + * account making the request and reseller account being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • SUSPENSION_NOT_RESELLER_INITIATED: Can't activate an entitlement that is pending TOS + * acceptance. Only reseller initiated suspensions can be activated. + *
  • NOT_SUSPENDED: Can't activate entitlements that are already in ACTIVE state. Can only + * activate suspended entitlements. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + * @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 activateEntitlementAsync( + ActivateEntitlementRequest request) { + return activateEntitlementOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Activates a previously suspended entitlement. The entitlement must be in a suspended state for + * it to be activated. Entitlements suspended for pending ToS acceptance can't be activated using + * this method. An entitlement activation is a long-running operation and can result in updates to + * the state of the customer entitlement. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller + * account making the request and reseller account being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • SUSPENSION_NOT_RESELLER_INITIATED: Can't activate an entitlement that is pending TOS + * acceptance. Only reseller initiated suspensions can be activated. + *
  • NOT_SUSPENDED: Can't activate entitlements that are already in ACTIVE state. Can only + * activate suspended entitlements. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final OperationCallable + activateEntitlementOperationCallable() { + return stub.activateEntitlementOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Activates a previously suspended entitlement. The entitlement must be in a suspended state for + * it to be activated. Entitlements suspended for pending ToS acceptance can't be activated using + * this method. An entitlement activation is a long-running operation and can result in updates to + * the state of the customer entitlement. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller or if the reseller + * account making the request and reseller account being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: Entitlement resource not found. + *
  • SUSPENSION_NOT_RESELLER_INITIATED: Can't activate an entitlement that is pending TOS + * acceptance. Only reseller initiated suspensions can be activated. + *
  • NOT_SUSPENDED: Can't activate entitlements that are already in ACTIVE state. Can only + * activate suspended entitlements. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final UnaryCallable activateEntitlementCallable() { + return stub.activateEntitlementCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Transfers customer entitlements to new reseller. + * + *

Possible Error Codes: <ul> <li> PERMISSION_DENIED: If the customer doesn't + * belong to the reseller.</li> <li> INVALID_ARGUMENT: Missing or invalid required + * parameters in the request. </li> <li> NOT_FOUND: If the customer or offer resource + * is not found for the reseller. </li> <li> ALREADY_EXISTS: If the SKU has been + * already transferred for the customer. </li> <li> CONDITION_NOT_MET or + * FAILED_PRECONDITION: This failure can happen in the following cases: <ul> <li> + * Transferring a SKU that requires domain verification and the domain has not been verified. + * </li> <li> Transferring an Add-On SKU like Vault or Drive without transferring the + * pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for developer + * accounts: reseller and resold domain must follow the domain naming convention as follows: + * <ul> <li> Domain names must start with goog-test. </li> <li> Resold + * domain names must include the reseller domain. </li> </ul> </li> <li> + * All transferring entitlements must be specified. </li> </ul> </li> <li> + * INTERNAL: Any non-user error related to a technical issue in the backend. Please contact Cloud + * Channel Support in this case. </li> <li> UNKNOWN: Any non-user error related to a + * technical issue in the backend. Please contact Cloud Channel Support in this case. </li> + * </ul> + * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + * @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 + transferEntitlementsAsync(TransferEntitlementsRequest request) { + return transferEntitlementsOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Transfers customer entitlements to new reseller. + * + *

Possible Error Codes: <ul> <li> PERMISSION_DENIED: If the customer doesn't + * belong to the reseller.</li> <li> INVALID_ARGUMENT: Missing or invalid required + * parameters in the request. </li> <li> NOT_FOUND: If the customer or offer resource + * is not found for the reseller. </li> <li> ALREADY_EXISTS: If the SKU has been + * already transferred for the customer. </li> <li> CONDITION_NOT_MET or + * FAILED_PRECONDITION: This failure can happen in the following cases: <ul> <li> + * Transferring a SKU that requires domain verification and the domain has not been verified. + * </li> <li> Transferring an Add-On SKU like Vault or Drive without transferring the + * pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for developer + * accounts: reseller and resold domain must follow the domain naming convention as follows: + * <ul> <li> Domain names must start with goog-test. </li> <li> Resold + * domain names must include the reseller domain. </li> </ul> </li> <li> + * All transferring entitlements must be specified. </li> </ul> </li> <li> + * INTERNAL: Any non-user error related to a technical issue in the backend. Please contact Cloud + * Channel Support in this case. </li> <li> UNKNOWN: Any non-user error related to a + * technical issue in the backend. Please contact Cloud Channel Support in this case. </li> + * </ul> + * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final OperationCallable< + TransferEntitlementsRequest, TransferEntitlementsResponse, OperationMetadata> + transferEntitlementsOperationCallable() { + return stub.transferEntitlementsOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Transfers customer entitlements to new reseller. + * + *

Possible Error Codes: <ul> <li> PERMISSION_DENIED: If the customer doesn't + * belong to the reseller.</li> <li> INVALID_ARGUMENT: Missing or invalid required + * parameters in the request. </li> <li> NOT_FOUND: If the customer or offer resource + * is not found for the reseller. </li> <li> ALREADY_EXISTS: If the SKU has been + * already transferred for the customer. </li> <li> CONDITION_NOT_MET or + * FAILED_PRECONDITION: This failure can happen in the following cases: <ul> <li> + * Transferring a SKU that requires domain verification and the domain has not been verified. + * </li> <li> Transferring an Add-On SKU like Vault or Drive without transferring the + * pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for developer + * accounts: reseller and resold domain must follow the domain naming convention as follows: + * <ul> <li> Domain names must start with goog-test. </li> <li> Resold + * domain names must include the reseller domain. </li> </ul> </li> <li> + * All transferring entitlements must be specified. </li> </ul> </li> <li> + * INTERNAL: Any non-user error related to a technical issue in the backend. Please contact Cloud + * Channel Support in this case. </li> <li> UNKNOWN: Any non-user error related to a + * technical issue in the backend. Please contact Cloud Channel Support in this case. </li> + * </ul> + * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final UnaryCallable + transferEntitlementsCallable() { + return stub.transferEntitlementsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Transfers customer entitlements from current reseller to Google. + * + *

Possible Error Codes: <ul> <li> PERMISSION_DENIED: If the customer doesn't + * belong to the reseller. </li> <li> INVALID_ARGUMENT: Missing or invalid required + * parameters in the request. </li> <li> NOT_FOUND: If the customer or offer resource + * is not found for the reseller. </li> <li> ALREADY_EXISTS: If the SKU has been + * already transferred for the customer. </li> <li> CONDITION_NOT_MET or + * FAILED_PRECONDITION: This failure can happen in the following cases: <ul> <li> + * Transferring a SKU that requires domain verification and the domain has not been verified. + * </li> <li> Transferring an Add-On SKU like Vault or Drive without purchasing the + * pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for developer + * accounts: reseller and resold domain must follow the domain naming convention as follows: + * <ul> <li> Domain names must start with goog-test. </li> <li> Resold + * domain names must include the reseller domain. </li> </ul> </li> </ul> + * </li> <li> INTERNAL: Any non-user error related to a technical issue in the + * backend. Please contact Cloud Channel Support in this case. </li> <li> UNKNOWN: Any + * non-user error related to a technical issue in the backend. Please contact Cloud Channel + * Support in this case.</li> </ul> + * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The + * Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + * @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 transferEntitlementsToGoogleAsync( + TransferEntitlementsToGoogleRequest request) { + return transferEntitlementsToGoogleOperationCallable().futureCall(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Transfers customer entitlements from current reseller to Google. + * + *

Possible Error Codes: <ul> <li> PERMISSION_DENIED: If the customer doesn't + * belong to the reseller. </li> <li> INVALID_ARGUMENT: Missing or invalid required + * parameters in the request. </li> <li> NOT_FOUND: If the customer or offer resource + * is not found for the reseller. </li> <li> ALREADY_EXISTS: If the SKU has been + * already transferred for the customer. </li> <li> CONDITION_NOT_MET or + * FAILED_PRECONDITION: This failure can happen in the following cases: <ul> <li> + * Transferring a SKU that requires domain verification and the domain has not been verified. + * </li> <li> Transferring an Add-On SKU like Vault or Drive without purchasing the + * pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for developer + * accounts: reseller and resold domain must follow the domain naming convention as follows: + * <ul> <li> Domain names must start with goog-test. </li> <li> Resold + * domain names must include the reseller domain. </li> </ul> </li> </ul> + * </li> <li> INTERNAL: Any non-user error related to a technical issue in the + * backend. Please contact Cloud Channel Support in this case. </li> <li> UNKNOWN: Any + * non-user error related to a technical issue in the backend. Please contact Cloud Channel + * Support in this case.</li> </ul> + * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The + * Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final OperationCallable + transferEntitlementsToGoogleOperationCallable() { + return stub.transferEntitlementsToGoogleOperationCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Transfers customer entitlements from current reseller to Google. + * + *

Possible Error Codes: <ul> <li> PERMISSION_DENIED: If the customer doesn't + * belong to the reseller. </li> <li> INVALID_ARGUMENT: Missing or invalid required + * parameters in the request. </li> <li> NOT_FOUND: If the customer or offer resource + * is not found for the reseller. </li> <li> ALREADY_EXISTS: If the SKU has been + * already transferred for the customer. </li> <li> CONDITION_NOT_MET or + * FAILED_PRECONDITION: This failure can happen in the following cases: <ul> <li> + * Transferring a SKU that requires domain verification and the domain has not been verified. + * </li> <li> Transferring an Add-On SKU like Vault or Drive without purchasing the + * pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for developer + * accounts: reseller and resold domain must follow the domain naming convention as follows: + * <ul> <li> Domain names must start with goog-test. </li> <li> Resold + * domain names must include the reseller domain. </li> </ul> </li> </ul> + * </li> <li> INTERNAL: Any non-user error related to a technical issue in the + * backend. Please contact Cloud Channel Support in this case. </li> <li> UNKNOWN: Any + * non-user error related to a technical issue in the backend. Please contact Cloud Channel + * Support in this case.</li> </ul> + * + *

Return Value: <br/> Long Running Operation ID. + * + *

To get the results of the operation, call the GetOperation method of + * CloudChannelOperationsService. The response will contain google.protobuf.Empty on success. The + * Operation metadata will contain an instance of + * [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + * + *

Sample code: + */ + public final UnaryCallable + transferEntitlementsToGoogleCallable() { + return stub.transferEntitlementsToGoogleCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a + * distributor. To call this method, you must be a distributor. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: <br/> If successful, returns the list of + * [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources for the distributor + * account, otherwise returns an error. + * + * @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 ListChannelPartnerLinksPagedResponse listChannelPartnerLinks( + ListChannelPartnerLinksRequest request) { + return listChannelPartnerLinksPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a + * distributor. To call this method, you must be a distributor. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: <br/> If successful, returns the list of + * [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources for the distributor + * account, otherwise returns an error. + * + *

Sample code: + */ + public final UnaryCallable + listChannelPartnerLinksPagedCallable() { + return stub.listChannelPartnerLinksPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a + * distributor. To call this method, you must be a distributor. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Return Value: <br/> If successful, returns the list of + * [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources for the distributor + * account, otherwise returns an error. + * + *

Sample code: + */ + public final UnaryCallable + listChannelPartnerLinksCallable() { + return stub.listChannelPartnerLinksCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a requested [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource. + * To call this method, you must be a distributor. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: ChannelPartnerLink resource not found. Results due invalid channel partner + * link name. + *
+ * + *

Return Value: <br/> [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] + * resource if found, otherwise returns an error. + * + * @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 ChannelPartnerLink getChannelPartnerLink(GetChannelPartnerLinkRequest request) { + return getChannelPartnerLinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Returns a requested [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource. + * To call this method, you must be a distributor. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • NOT_FOUND: ChannelPartnerLink resource not found. Results due invalid channel partner + * link name. + *
+ * + *

Return Value: <br/> [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] + * resource if found, otherwise returns an error. + * + *

Sample code: + */ + public final UnaryCallable + getChannelPartnerLinkCallable() { + return stub.getChannelPartnerLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Initiates a channel partner link between a distributor and a reseller or between resellers in + * an n-tier reseller channel. To accept the invite, the invited partner should follow the + * invite_link_uri provided in the response. If the link creation is accepted, a valid link is set + * up between the two involved parties. To call this method, you must be a distributor. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • ALREADY_EXISTS: If the ChannelPartnerLink sent in the request already exists. + *
  • NOT_FOUND: If no Cloud Identity customer exists for domain provided. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Newly created + * [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if successful, + * otherwise error is returned. + * + * @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 ChannelPartnerLink createChannelPartnerLink( + CreateChannelPartnerLinkRequest request) { + return createChannelPartnerLinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Initiates a channel partner link between a distributor and a reseller or between resellers in + * an n-tier reseller channel. To accept the invite, the invited partner should follow the + * invite_link_uri provided in the response. If the link creation is accepted, a valid link is set + * up between the two involved parties. To call this method, you must be a distributor. + * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the reseller account making the request and the reseller account + * being queried for are different. + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
  • ALREADY_EXISTS: If the ChannelPartnerLink sent in the request already exists. + *
  • NOT_FOUND: If no Cloud Identity customer exists for domain provided. + *
  • INTERNAL: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
  • UNKNOWN: Any non-user error related to a technical issue in the backend. In this case, + * contact Cloud Channel support. + *
+ * + *

Return Value: <br/> Newly created + * [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if successful, + * otherwise error is returned. + * + *

Sample code: + */ + public final UnaryCallable + createChannelPartnerLinkCallable() { + return stub.createChannelPartnerLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a channel partner link. A distributor calls this method to change a link's status. For + * example, suspend a partner link. To call this method, you must be a distributor. + * + *

Possible Error Codes: <ul> <li> PERMISSION_DENIED: If the reseller account + * making the request and the reseller account being queried for are different. </li> + * <li> INVALID_ARGUMENT: <ul> <li> Missing or invalid required parameters in + * the request. </li> <li> Updating link state from invited to active or suspended. + * </li> <li> Sending reseller_cloud_identity_id, invite_url or name in update mask. + * </li> </ul> </li> <li> NOT_FOUND: ChannelPartnerLink resource not + * found.</li> <li> INTERNAL: Any non-user error related to a technical issue in the + * backend. In this case, contact Cloud Channel support. </li> <li> UNKNOWN: Any + * non-user error related to a technical issue in the backend. In this case, contact Cloud Channel + * support.</li> </ul> + * + *

Return Value: <br/> If successful, the updated + * [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource, otherwise returns an + * error. + * + * @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 ChannelPartnerLink updateChannelPartnerLink( + UpdateChannelPartnerLinkRequest request) { + return updateChannelPartnerLinkCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Updates a channel partner link. A distributor calls this method to change a link's status. For + * example, suspend a partner link. To call this method, you must be a distributor. + * + *

Possible Error Codes: <ul> <li> PERMISSION_DENIED: If the reseller account + * making the request and the reseller account being queried for are different. </li> + * <li> INVALID_ARGUMENT: <ul> <li> Missing or invalid required parameters in + * the request. </li> <li> Updating link state from invited to active or suspended. + * </li> <li> Sending reseller_cloud_identity_id, invite_url or name in update mask. + * </li> </ul> </li> <li> NOT_FOUND: ChannelPartnerLink resource not + * found.</li> <li> INTERNAL: Any non-user error related to a technical issue in the + * backend. In this case, contact Cloud Channel support. </li> <li> UNKNOWN: Any + * non-user error related to a technical issue in the backend. In this case, contact Cloud Channel + * support.</li> </ul> + * + *

Return Value: <br/> If successful, the updated + * [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource, otherwise returns an + * error. + * + *

Sample code: + */ + public final UnaryCallable + updateChannelPartnerLinkCallable() { + return stub.updateChannelPartnerLinkCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products the reseller is authorized to sell. + * + *

Possible Error Codes: + * + *

    + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the 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 ListProductsPagedResponse listProducts(ListProductsRequest request) { + return listProductsPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products the reseller is authorized to sell. + * + *

Possible Error Codes: + * + *

    + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Sample code: + */ + public final UnaryCallable + listProductsPagedCallable() { + return stub.listProductsPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Products the reseller is authorized to sell. + * + *

Possible Error Codes: + * + *

    + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Sample code: + */ + public final UnaryCallable listProductsCallable() { + return stub.listProductsCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the SKUs for a product the reseller is authorized to sell. + * + *

Possible Error Codes: + * + *

    + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the 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 ListSkusPagedResponse listSkus(ListSkusRequest request) { + return listSkusPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the SKUs for a product the reseller is authorized to sell. + * + *

Possible Error Codes: + * + *

    + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Sample code: + */ + public final UnaryCallable listSkusPagedCallable() { + return stub.listSkusPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the SKUs for a product the reseller is authorized to sell. + * + *

Possible Error Codes: + * + *

    + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Sample code: + */ + public final UnaryCallable listSkusCallable() { + return stub.listSkusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Offers the reseller can sell. + * + *

Possible Error Codes: + * + *

    + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the 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 ListOffersPagedResponse listOffers(ListOffersRequest request) { + return listOffersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Offers the reseller can sell. + * + *

Possible Error Codes: + * + *

    + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Sample code: + */ + public final UnaryCallable listOffersPagedCallable() { + return stub.listOffersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Offers the reseller can sell. + * + *

Possible Error Codes: + * + *

    + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Sample code: + */ + public final UnaryCallable listOffersCallable() { + return stub.listOffersCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Purchasable SKUs for following cases: + * + *

    + *
  • SKUs that can be newly purchased for a customer + *
  • SKUs that can be upgraded/downgraded to, for an entitlement. + *
+ * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the 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 ListPurchasableSkusPagedResponse listPurchasableSkus( + ListPurchasableSkusRequest request) { + return listPurchasableSkusPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Purchasable SKUs for following cases: + * + *
    + *
  • SKUs that can be newly purchased for a customer + *
  • SKUs that can be upgraded/downgraded to, for an entitlement. + *
+ * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Sample code: + */ + public final UnaryCallable + listPurchasableSkusPagedCallable() { + return stub.listPurchasableSkusPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Purchasable SKUs for following cases: + * + *

    + *
  • SKUs that can be newly purchased for a customer + *
  • SKUs that can be upgraded/downgraded to, for an entitlement. + *
+ * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Sample code: + */ + public final UnaryCallable + listPurchasableSkusCallable() { + return stub.listPurchasableSkusCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Purchasable Offers for the following cases: + * + *

    + *
  • Offers that can be newly purchased for a customer + *
  • Offers that can be changed to, for an entitlement. + *
+ * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the 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 ListPurchasableOffersPagedResponse listPurchasableOffers( + ListPurchasableOffersRequest request) { + return listPurchasableOffersPagedCallable().call(request); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Purchasable Offers for the following cases: + * + *
    + *
  • Offers that can be newly purchased for a customer + *
  • Offers that can be changed to, for an entitlement. + *
+ * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Sample code: + */ + public final UnaryCallable + listPurchasableOffersPagedCallable() { + return stub.listPurchasableOffersPagedCallable(); + } + + // AUTO-GENERATED DOCUMENTATION AND METHOD. + /** + * Lists the Purchasable Offers for the following cases: + * + *

    + *
  • Offers that can be newly purchased for a customer + *
  • Offers that can be changed to, for an entitlement. + *
+ * + *

Possible Error Codes: + * + *

    + *
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller + *
  • INVALID_ARGUMENT: Missing or invalid required parameters in the request. + *
+ * + *

Sample code: + */ + public final UnaryCallable + listPurchasableOffersCallable() { + return stub.listPurchasableOffersCallable(); + } + + @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 ListCustomersPagedResponse + extends AbstractPagedListResponse< + ListCustomersRequest, + ListCustomersResponse, + Customer, + ListCustomersPage, + ListCustomersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListCustomersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListCustomersPagedResponse apply(ListCustomersPage input) { + return new ListCustomersPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListCustomersPagedResponse(ListCustomersPage page) { + super(page, ListCustomersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListCustomersPage + extends AbstractPage< + ListCustomersRequest, ListCustomersResponse, Customer, ListCustomersPage> { + + private ListCustomersPage( + PageContext context, + ListCustomersResponse response) { + super(context, response); + } + + private static ListCustomersPage createEmptyPage() { + return new ListCustomersPage(null, null); + } + + @Override + protected ListCustomersPage createPage( + PageContext context, + ListCustomersResponse response) { + return new ListCustomersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListCustomersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListCustomersRequest, + ListCustomersResponse, + Customer, + ListCustomersPage, + ListCustomersFixedSizeCollection> { + + private ListCustomersFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListCustomersFixedSizeCollection createEmptyCollection() { + return new ListCustomersFixedSizeCollection(null, 0); + } + + @Override + protected ListCustomersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListCustomersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListEntitlementsPagedResponse + extends AbstractPagedListResponse< + ListEntitlementsRequest, + ListEntitlementsResponse, + Entitlement, + ListEntitlementsPage, + ListEntitlementsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListEntitlementsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListEntitlementsPagedResponse apply(ListEntitlementsPage input) { + return new ListEntitlementsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListEntitlementsPagedResponse(ListEntitlementsPage page) { + super(page, ListEntitlementsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListEntitlementsPage + extends AbstractPage< + ListEntitlementsRequest, ListEntitlementsResponse, Entitlement, ListEntitlementsPage> { + + private ListEntitlementsPage( + PageContext context, + ListEntitlementsResponse response) { + super(context, response); + } + + private static ListEntitlementsPage createEmptyPage() { + return new ListEntitlementsPage(null, null); + } + + @Override + protected ListEntitlementsPage createPage( + PageContext context, + ListEntitlementsResponse response) { + return new ListEntitlementsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListEntitlementsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListEntitlementsRequest, + ListEntitlementsResponse, + Entitlement, + ListEntitlementsPage, + ListEntitlementsFixedSizeCollection> { + + private ListEntitlementsFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListEntitlementsFixedSizeCollection createEmptyCollection() { + return new ListEntitlementsFixedSizeCollection(null, 0); + } + + @Override + protected ListEntitlementsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListEntitlementsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTransferableSkusPagedResponse + extends AbstractPagedListResponse< + ListTransferableSkusRequest, + ListTransferableSkusResponse, + TransferableSku, + ListTransferableSkusPage, + ListTransferableSkusFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTransferableSkusPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTransferableSkusPagedResponse apply(ListTransferableSkusPage input) { + return new ListTransferableSkusPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTransferableSkusPagedResponse(ListTransferableSkusPage page) { + super(page, ListTransferableSkusFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTransferableSkusPage + extends AbstractPage< + ListTransferableSkusRequest, + ListTransferableSkusResponse, + TransferableSku, + ListTransferableSkusPage> { + + private ListTransferableSkusPage( + PageContext + context, + ListTransferableSkusResponse response) { + super(context, response); + } + + private static ListTransferableSkusPage createEmptyPage() { + return new ListTransferableSkusPage(null, null); + } + + @Override + protected ListTransferableSkusPage createPage( + PageContext + context, + ListTransferableSkusResponse response) { + return new ListTransferableSkusPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTransferableSkusFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTransferableSkusRequest, + ListTransferableSkusResponse, + TransferableSku, + ListTransferableSkusPage, + ListTransferableSkusFixedSizeCollection> { + + private ListTransferableSkusFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTransferableSkusFixedSizeCollection createEmptyCollection() { + return new ListTransferableSkusFixedSizeCollection(null, 0); + } + + @Override + protected ListTransferableSkusFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTransferableSkusFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListTransferableOffersPagedResponse + extends AbstractPagedListResponse< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + TransferableOffer, + ListTransferableOffersPage, + ListTransferableOffersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListTransferableOffersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListTransferableOffersPagedResponse apply(ListTransferableOffersPage input) { + return new ListTransferableOffersPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListTransferableOffersPagedResponse(ListTransferableOffersPage page) { + super(page, ListTransferableOffersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListTransferableOffersPage + extends AbstractPage< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + TransferableOffer, + ListTransferableOffersPage> { + + private ListTransferableOffersPage( + PageContext< + ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer> + context, + ListTransferableOffersResponse response) { + super(context, response); + } + + private static ListTransferableOffersPage createEmptyPage() { + return new ListTransferableOffersPage(null, null); + } + + @Override + protected ListTransferableOffersPage createPage( + PageContext< + ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer> + context, + ListTransferableOffersResponse response) { + return new ListTransferableOffersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListTransferableOffersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + TransferableOffer, + ListTransferableOffersPage, + ListTransferableOffersFixedSizeCollection> { + + private ListTransferableOffersFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListTransferableOffersFixedSizeCollection createEmptyCollection() { + return new ListTransferableOffersFixedSizeCollection(null, 0); + } + + @Override + protected ListTransferableOffersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListTransferableOffersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListChannelPartnerLinksPagedResponse + extends AbstractPagedListResponse< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ChannelPartnerLink, + ListChannelPartnerLinksPage, + ListChannelPartnerLinksFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext< + ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink> + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListChannelPartnerLinksPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListChannelPartnerLinksPagedResponse apply(ListChannelPartnerLinksPage input) { + return new ListChannelPartnerLinksPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListChannelPartnerLinksPagedResponse(ListChannelPartnerLinksPage page) { + super(page, ListChannelPartnerLinksFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListChannelPartnerLinksPage + extends AbstractPage< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ChannelPartnerLink, + ListChannelPartnerLinksPage> { + + private ListChannelPartnerLinksPage( + PageContext< + ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink> + context, + ListChannelPartnerLinksResponse response) { + super(context, response); + } + + private static ListChannelPartnerLinksPage createEmptyPage() { + return new ListChannelPartnerLinksPage(null, null); + } + + @Override + protected ListChannelPartnerLinksPage createPage( + PageContext< + ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink> + context, + ListChannelPartnerLinksResponse response) { + return new ListChannelPartnerLinksPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext< + ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink> + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListChannelPartnerLinksFixedSizeCollection + extends AbstractFixedSizeCollection< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ChannelPartnerLink, + ListChannelPartnerLinksPage, + ListChannelPartnerLinksFixedSizeCollection> { + + private ListChannelPartnerLinksFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListChannelPartnerLinksFixedSizeCollection createEmptyCollection() { + return new ListChannelPartnerLinksFixedSizeCollection(null, 0); + } + + @Override + protected ListChannelPartnerLinksFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListChannelPartnerLinksFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListProductsPagedResponse + extends AbstractPagedListResponse< + ListProductsRequest, + ListProductsResponse, + Product, + ListProductsPage, + ListProductsFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListProductsPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListProductsPagedResponse apply(ListProductsPage input) { + return new ListProductsPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListProductsPagedResponse(ListProductsPage page) { + super(page, ListProductsFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListProductsPage + extends AbstractPage { + + private ListProductsPage( + PageContext context, + ListProductsResponse response) { + super(context, response); + } + + private static ListProductsPage createEmptyPage() { + return new ListProductsPage(null, null); + } + + @Override + protected ListProductsPage createPage( + PageContext context, + ListProductsResponse response) { + return new ListProductsPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListProductsFixedSizeCollection + extends AbstractFixedSizeCollection< + ListProductsRequest, + ListProductsResponse, + Product, + ListProductsPage, + ListProductsFixedSizeCollection> { + + private ListProductsFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListProductsFixedSizeCollection createEmptyCollection() { + return new ListProductsFixedSizeCollection(null, 0); + } + + @Override + protected ListProductsFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListProductsFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListSkusPagedResponse + extends AbstractPagedListResponse< + ListSkusRequest, ListSkusResponse, Sku, ListSkusPage, ListSkusFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListSkusPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListSkusPagedResponse apply(ListSkusPage input) { + return new ListSkusPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListSkusPagedResponse(ListSkusPage page) { + super(page, ListSkusFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListSkusPage + extends AbstractPage { + + private ListSkusPage( + PageContext context, ListSkusResponse response) { + super(context, response); + } + + private static ListSkusPage createEmptyPage() { + return new ListSkusPage(null, null); + } + + @Override + protected ListSkusPage createPage( + PageContext context, ListSkusResponse response) { + return new ListSkusPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListSkusFixedSizeCollection + extends AbstractFixedSizeCollection< + ListSkusRequest, ListSkusResponse, Sku, ListSkusPage, ListSkusFixedSizeCollection> { + + private ListSkusFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListSkusFixedSizeCollection createEmptyCollection() { + return new ListSkusFixedSizeCollection(null, 0); + } + + @Override + protected ListSkusFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListSkusFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListOffersPagedResponse + extends AbstractPagedListResponse< + ListOffersRequest, + ListOffersResponse, + Offer, + ListOffersPage, + ListOffersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListOffersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListOffersPagedResponse apply(ListOffersPage input) { + return new ListOffersPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListOffersPagedResponse(ListOffersPage page) { + super(page, ListOffersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListOffersPage + extends AbstractPage { + + private ListOffersPage( + PageContext context, + ListOffersResponse response) { + super(context, response); + } + + private static ListOffersPage createEmptyPage() { + return new ListOffersPage(null, null); + } + + @Override + protected ListOffersPage createPage( + PageContext context, + ListOffersResponse response) { + return new ListOffersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListOffersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListOffersRequest, + ListOffersResponse, + Offer, + ListOffersPage, + ListOffersFixedSizeCollection> { + + private ListOffersFixedSizeCollection(List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListOffersFixedSizeCollection createEmptyCollection() { + return new ListOffersFixedSizeCollection(null, 0); + } + + @Override + protected ListOffersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListOffersFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListPurchasableSkusPagedResponse + extends AbstractPagedListResponse< + ListPurchasableSkusRequest, + ListPurchasableSkusResponse, + PurchasableSku, + ListPurchasableSkusPage, + ListPurchasableSkusFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPurchasableSkusPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListPurchasableSkusPagedResponse apply(ListPurchasableSkusPage input) { + return new ListPurchasableSkusPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListPurchasableSkusPagedResponse(ListPurchasableSkusPage page) { + super(page, ListPurchasableSkusFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPurchasableSkusPage + extends AbstractPage< + ListPurchasableSkusRequest, + ListPurchasableSkusResponse, + PurchasableSku, + ListPurchasableSkusPage> { + + private ListPurchasableSkusPage( + PageContext + context, + ListPurchasableSkusResponse response) { + super(context, response); + } + + private static ListPurchasableSkusPage createEmptyPage() { + return new ListPurchasableSkusPage(null, null); + } + + @Override + protected ListPurchasableSkusPage createPage( + PageContext + context, + ListPurchasableSkusResponse response) { + return new ListPurchasableSkusPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPurchasableSkusFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPurchasableSkusRequest, + ListPurchasableSkusResponse, + PurchasableSku, + ListPurchasableSkusPage, + ListPurchasableSkusFixedSizeCollection> { + + private ListPurchasableSkusFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPurchasableSkusFixedSizeCollection createEmptyCollection() { + return new ListPurchasableSkusFixedSizeCollection(null, 0); + } + + @Override + protected ListPurchasableSkusFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPurchasableSkusFixedSizeCollection(pages, collectionSize); + } + } + + public static class ListPurchasableOffersPagedResponse + extends AbstractPagedListResponse< + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + PurchasableOffer, + ListPurchasableOffersPage, + ListPurchasableOffersFixedSizeCollection> { + + public static ApiFuture createAsync( + PageContext + context, + ApiFuture futureResponse) { + ApiFuture futurePage = + ListPurchasableOffersPage.createEmptyPage().createPageAsync(context, futureResponse); + return ApiFutures.transform( + futurePage, + new ApiFunction() { + @Override + public ListPurchasableOffersPagedResponse apply(ListPurchasableOffersPage input) { + return new ListPurchasableOffersPagedResponse(input); + } + }, + MoreExecutors.directExecutor()); + } + + private ListPurchasableOffersPagedResponse(ListPurchasableOffersPage page) { + super(page, ListPurchasableOffersFixedSizeCollection.createEmptyCollection()); + } + } + + public static class ListPurchasableOffersPage + extends AbstractPage< + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + PurchasableOffer, + ListPurchasableOffersPage> { + + private ListPurchasableOffersPage( + PageContext + context, + ListPurchasableOffersResponse response) { + super(context, response); + } + + private static ListPurchasableOffersPage createEmptyPage() { + return new ListPurchasableOffersPage(null, null); + } + + @Override + protected ListPurchasableOffersPage createPage( + PageContext + context, + ListPurchasableOffersResponse response) { + return new ListPurchasableOffersPage(context, response); + } + + @Override + public ApiFuture createPageAsync( + PageContext + context, + ApiFuture futureResponse) { + return super.createPageAsync(context, futureResponse); + } + } + + public static class ListPurchasableOffersFixedSizeCollection + extends AbstractFixedSizeCollection< + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + PurchasableOffer, + ListPurchasableOffersPage, + ListPurchasableOffersFixedSizeCollection> { + + private ListPurchasableOffersFixedSizeCollection( + List pages, int collectionSize) { + super(pages, collectionSize); + } + + private static ListPurchasableOffersFixedSizeCollection createEmptyCollection() { + return new ListPurchasableOffersFixedSizeCollection(null, 0); + } + + @Override + protected ListPurchasableOffersFixedSizeCollection createCollection( + List pages, int collectionSize) { + return new ListPurchasableOffersFixedSizeCollection(pages, collectionSize); + } + } +} diff --git a/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceSettings.java b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceSettings.java new file mode 100644 index 00000000..214ce162 --- /dev/null +++ b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceSettings.java @@ -0,0 +1,711 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1; + +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListChannelPartnerLinksPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementsPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableSkusPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.ClientSettings; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.cloud.channel.v1.stub.CloudChannelServiceStubSettings; +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 CloudChannelServiceClient}. + * + *

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

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

{@code
+ * CloudChannelServiceSettings.Builder cloudChannelServiceSettingsBuilder =
+ *     CloudChannelServiceSettings.newBuilder();
+ * cloudChannelServiceSettingsBuilder
+ *     .getCustomerSettings()
+ *     .setRetrySettings(
+ *         cloudChannelServiceSettingsBuilder
+ *             .getCustomerSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CloudChannelServiceSettings cloudChannelServiceSettings =
+ *     cloudChannelServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class CloudChannelServiceSettings extends ClientSettings { + + /** Returns the object with the settings used for calls to listCustomers. */ + public PagedCallSettings + listCustomersSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listCustomersSettings(); + } + + /** Returns the object with the settings used for calls to getCustomer. */ + public UnaryCallSettings getCustomerSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).getCustomerSettings(); + } + + /** Returns the object with the settings used for calls to checkCloudIdentityAccountsExist. */ + public UnaryCallSettings< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .checkCloudIdentityAccountsExistSettings(); + } + + /** Returns the object with the settings used for calls to createCustomer. */ + public UnaryCallSettings createCustomerSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).createCustomerSettings(); + } + + /** Returns the object with the settings used for calls to updateCustomer. */ + public UnaryCallSettings updateCustomerSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).updateCustomerSettings(); + } + + /** Returns the object with the settings used for calls to deleteCustomer. */ + public UnaryCallSettings deleteCustomerSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).deleteCustomerSettings(); + } + + /** Returns the object with the settings used for calls to provisionCloudIdentity. */ + public UnaryCallSettings + provisionCloudIdentitySettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).provisionCloudIdentitySettings(); + } + + /** Returns the object with the settings used for calls to provisionCloudIdentity. */ + public OperationCallSettings + provisionCloudIdentityOperationSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .provisionCloudIdentityOperationSettings(); + } + + /** Returns the object with the settings used for calls to listEntitlements. */ + public PagedCallSettings< + ListEntitlementsRequest, ListEntitlementsResponse, ListEntitlementsPagedResponse> + listEntitlementsSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listEntitlementsSettings(); + } + + /** Returns the object with the settings used for calls to listTransferableSkus. */ + public PagedCallSettings< + ListTransferableSkusRequest, + ListTransferableSkusResponse, + ListTransferableSkusPagedResponse> + listTransferableSkusSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listTransferableSkusSettings(); + } + + /** Returns the object with the settings used for calls to listTransferableOffers. */ + public PagedCallSettings< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + ListTransferableOffersPagedResponse> + listTransferableOffersSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listTransferableOffersSettings(); + } + + /** Returns the object with the settings used for calls to getEntitlement. */ + public UnaryCallSettings getEntitlementSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).getEntitlementSettings(); + } + + /** Returns the object with the settings used for calls to createEntitlement. */ + public UnaryCallSettings createEntitlementSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).createEntitlementSettings(); + } + + /** Returns the object with the settings used for calls to createEntitlement. */ + public OperationCallSettings + createEntitlementOperationSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .createEntitlementOperationSettings(); + } + + /** Returns the object with the settings used for calls to changeParameters. */ + public UnaryCallSettings changeParametersSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).changeParametersSettings(); + } + + /** Returns the object with the settings used for calls to changeParameters. */ + public OperationCallSettings + changeParametersOperationSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .changeParametersOperationSettings(); + } + + /** Returns the object with the settings used for calls to changeRenewalSettings. */ + public UnaryCallSettings + changeRenewalSettingsSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).changeRenewalSettingsSettings(); + } + + /** Returns the object with the settings used for calls to changeRenewalSettings. */ + public OperationCallSettings + changeRenewalSettingsOperationSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .changeRenewalSettingsOperationSettings(); + } + + /** Returns the object with the settings used for calls to changeOffer. */ + public UnaryCallSettings changeOfferSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).changeOfferSettings(); + } + + /** Returns the object with the settings used for calls to changeOffer. */ + public OperationCallSettings + changeOfferOperationSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).changeOfferOperationSettings(); + } + + /** Returns the object with the settings used for calls to startPaidService. */ + public UnaryCallSettings startPaidServiceSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).startPaidServiceSettings(); + } + + /** Returns the object with the settings used for calls to startPaidService. */ + public OperationCallSettings + startPaidServiceOperationSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .startPaidServiceOperationSettings(); + } + + /** Returns the object with the settings used for calls to suspendEntitlement. */ + public UnaryCallSettings suspendEntitlementSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).suspendEntitlementSettings(); + } + + /** Returns the object with the settings used for calls to suspendEntitlement. */ + public OperationCallSettings + suspendEntitlementOperationSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .suspendEntitlementOperationSettings(); + } + + /** Returns the object with the settings used for calls to cancelEntitlement. */ + public UnaryCallSettings cancelEntitlementSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).cancelEntitlementSettings(); + } + + /** Returns the object with the settings used for calls to cancelEntitlement. */ + public OperationCallSettings + cancelEntitlementOperationSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .cancelEntitlementOperationSettings(); + } + + /** Returns the object with the settings used for calls to activateEntitlement. */ + public UnaryCallSettings activateEntitlementSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).activateEntitlementSettings(); + } + + /** Returns the object with the settings used for calls to activateEntitlement. */ + public OperationCallSettings + activateEntitlementOperationSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .activateEntitlementOperationSettings(); + } + + /** Returns the object with the settings used for calls to transferEntitlements. */ + public UnaryCallSettings transferEntitlementsSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).transferEntitlementsSettings(); + } + + /** Returns the object with the settings used for calls to transferEntitlements. */ + public OperationCallSettings< + TransferEntitlementsRequest, TransferEntitlementsResponse, OperationMetadata> + transferEntitlementsOperationSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .transferEntitlementsOperationSettings(); + } + + /** Returns the object with the settings used for calls to transferEntitlementsToGoogle. */ + public UnaryCallSettings + transferEntitlementsToGoogleSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .transferEntitlementsToGoogleSettings(); + } + + /** Returns the object with the settings used for calls to transferEntitlementsToGoogle. */ + public OperationCallSettings + transferEntitlementsToGoogleOperationSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()) + .transferEntitlementsToGoogleOperationSettings(); + } + + /** Returns the object with the settings used for calls to listChannelPartnerLinks. */ + public PagedCallSettings< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ListChannelPartnerLinksPagedResponse> + listChannelPartnerLinksSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listChannelPartnerLinksSettings(); + } + + /** Returns the object with the settings used for calls to getChannelPartnerLink. */ + public UnaryCallSettings + getChannelPartnerLinkSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).getChannelPartnerLinkSettings(); + } + + /** Returns the object with the settings used for calls to createChannelPartnerLink. */ + public UnaryCallSettings + createChannelPartnerLinkSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).createChannelPartnerLinkSettings(); + } + + /** Returns the object with the settings used for calls to updateChannelPartnerLink. */ + public UnaryCallSettings + updateChannelPartnerLinkSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).updateChannelPartnerLinkSettings(); + } + + /** Returns the object with the settings used for calls to listProducts. */ + public PagedCallSettings + listProductsSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listProductsSettings(); + } + + /** Returns the object with the settings used for calls to listSkus. */ + public PagedCallSettings + listSkusSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listSkusSettings(); + } + + /** Returns the object with the settings used for calls to listOffers. */ + public PagedCallSettings + listOffersSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listOffersSettings(); + } + + /** Returns the object with the settings used for calls to listPurchasableSkus. */ + public PagedCallSettings< + ListPurchasableSkusRequest, ListPurchasableSkusResponse, ListPurchasableSkusPagedResponse> + listPurchasableSkusSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listPurchasableSkusSettings(); + } + + /** Returns the object with the settings used for calls to listPurchasableOffers. */ + public PagedCallSettings< + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + ListPurchasableOffersPagedResponse> + listPurchasableOffersSettings() { + return ((CloudChannelServiceStubSettings) getStubSettings()).listPurchasableOffersSettings(); + } + + public static final CloudChannelServiceSettings create(CloudChannelServiceStubSettings stub) + throws IOException { + return new CloudChannelServiceSettings.Builder(stub.toBuilder()).build(); + } + + /** Returns a builder for the default ExecutorProvider for this service. */ + public static InstantiatingExecutorProvider.Builder defaultExecutorProviderBuilder() { + return CloudChannelServiceStubSettings.defaultExecutorProviderBuilder(); + } + + /** Returns the default service endpoint. */ + public static String getDefaultEndpoint() { + return CloudChannelServiceStubSettings.getDefaultEndpoint(); + } + + /** Returns the default service scopes. */ + public static List getDefaultServiceScopes() { + return CloudChannelServiceStubSettings.getDefaultServiceScopes(); + } + + /** Returns a builder for the default credentials for this service. */ + public static GoogleCredentialsProvider.Builder defaultCredentialsProviderBuilder() { + return CloudChannelServiceStubSettings.defaultCredentialsProviderBuilder(); + } + + /** Returns a builder for the default ChannelProvider for this service. */ + public static InstantiatingGrpcChannelProvider.Builder defaultGrpcTransportProviderBuilder() { + return CloudChannelServiceStubSettings.defaultGrpcTransportProviderBuilder(); + } + + public static TransportChannelProvider defaultTransportChannelProvider() { + return CloudChannelServiceStubSettings.defaultTransportChannelProvider(); + } + + @BetaApi("The surface for customizing headers is not stable yet and may change in the future.") + public static ApiClientHeaderProvider.Builder defaultApiClientHeaderProviderBuilder() { + return CloudChannelServiceStubSettings.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 CloudChannelServiceSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + } + + /** Builder for CloudChannelServiceSettings. */ + public static class Builder extends ClientSettings.Builder { + + protected Builder() throws IOException { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(CloudChannelServiceStubSettings.newBuilder(clientContext)); + } + + protected Builder(CloudChannelServiceSettings settings) { + super(settings.getStubSettings().toBuilder()); + } + + protected Builder(CloudChannelServiceStubSettings.Builder stubSettings) { + super(stubSettings); + } + + private static Builder createDefault() { + return new Builder(CloudChannelServiceStubSettings.newBuilder()); + } + + public CloudChannelServiceStubSettings.Builder getStubSettingsBuilder() { + return ((CloudChannelServiceStubSettings.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 listCustomers. */ + public PagedCallSettings.Builder< + ListCustomersRequest, ListCustomersResponse, ListCustomersPagedResponse> + listCustomersSettings() { + return getStubSettingsBuilder().listCustomersSettings(); + } + + /** Returns the builder for the settings used for calls to getCustomer. */ + public UnaryCallSettings.Builder getCustomerSettings() { + return getStubSettingsBuilder().getCustomerSettings(); + } + + /** Returns the builder for the settings used for calls to checkCloudIdentityAccountsExist. */ + public UnaryCallSettings.Builder< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistSettings() { + return getStubSettingsBuilder().checkCloudIdentityAccountsExistSettings(); + } + + /** Returns the builder for the settings used for calls to createCustomer. */ + public UnaryCallSettings.Builder createCustomerSettings() { + return getStubSettingsBuilder().createCustomerSettings(); + } + + /** Returns the builder for the settings used for calls to updateCustomer. */ + public UnaryCallSettings.Builder updateCustomerSettings() { + return getStubSettingsBuilder().updateCustomerSettings(); + } + + /** Returns the builder for the settings used for calls to deleteCustomer. */ + public UnaryCallSettings.Builder deleteCustomerSettings() { + return getStubSettingsBuilder().deleteCustomerSettings(); + } + + /** Returns the builder for the settings used for calls to provisionCloudIdentity. */ + public UnaryCallSettings.Builder + provisionCloudIdentitySettings() { + return getStubSettingsBuilder().provisionCloudIdentitySettings(); + } + + /** Returns the builder for the settings used for calls to provisionCloudIdentity. */ + public OperationCallSettings.Builder + provisionCloudIdentityOperationSettings() { + return getStubSettingsBuilder().provisionCloudIdentityOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listEntitlements. */ + public PagedCallSettings.Builder< + ListEntitlementsRequest, ListEntitlementsResponse, ListEntitlementsPagedResponse> + listEntitlementsSettings() { + return getStubSettingsBuilder().listEntitlementsSettings(); + } + + /** Returns the builder for the settings used for calls to listTransferableSkus. */ + public PagedCallSettings.Builder< + ListTransferableSkusRequest, + ListTransferableSkusResponse, + ListTransferableSkusPagedResponse> + listTransferableSkusSettings() { + return getStubSettingsBuilder().listTransferableSkusSettings(); + } + + /** Returns the builder for the settings used for calls to listTransferableOffers. */ + public PagedCallSettings.Builder< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + ListTransferableOffersPagedResponse> + listTransferableOffersSettings() { + return getStubSettingsBuilder().listTransferableOffersSettings(); + } + + /** Returns the builder for the settings used for calls to getEntitlement. */ + public UnaryCallSettings.Builder getEntitlementSettings() { + return getStubSettingsBuilder().getEntitlementSettings(); + } + + /** Returns the builder for the settings used for calls to createEntitlement. */ + public UnaryCallSettings.Builder + createEntitlementSettings() { + return getStubSettingsBuilder().createEntitlementSettings(); + } + + /** Returns the builder for the settings used for calls to createEntitlement. */ + public OperationCallSettings.Builder + createEntitlementOperationSettings() { + return getStubSettingsBuilder().createEntitlementOperationSettings(); + } + + /** Returns the builder for the settings used for calls to changeParameters. */ + public UnaryCallSettings.Builder + changeParametersSettings() { + return getStubSettingsBuilder().changeParametersSettings(); + } + + /** Returns the builder for the settings used for calls to changeParameters. */ + public OperationCallSettings.Builder + changeParametersOperationSettings() { + return getStubSettingsBuilder().changeParametersOperationSettings(); + } + + /** Returns the builder for the settings used for calls to changeRenewalSettings. */ + public UnaryCallSettings.Builder + changeRenewalSettingsSettings() { + return getStubSettingsBuilder().changeRenewalSettingsSettings(); + } + + /** Returns the builder for the settings used for calls to changeRenewalSettings. */ + public OperationCallSettings.Builder< + ChangeRenewalSettingsRequest, Entitlement, OperationMetadata> + changeRenewalSettingsOperationSettings() { + return getStubSettingsBuilder().changeRenewalSettingsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to changeOffer. */ + public UnaryCallSettings.Builder changeOfferSettings() { + return getStubSettingsBuilder().changeOfferSettings(); + } + + /** Returns the builder for the settings used for calls to changeOffer. */ + public OperationCallSettings.Builder + changeOfferOperationSettings() { + return getStubSettingsBuilder().changeOfferOperationSettings(); + } + + /** Returns the builder for the settings used for calls to startPaidService. */ + public UnaryCallSettings.Builder + startPaidServiceSettings() { + return getStubSettingsBuilder().startPaidServiceSettings(); + } + + /** Returns the builder for the settings used for calls to startPaidService. */ + public OperationCallSettings.Builder + startPaidServiceOperationSettings() { + return getStubSettingsBuilder().startPaidServiceOperationSettings(); + } + + /** Returns the builder for the settings used for calls to suspendEntitlement. */ + public UnaryCallSettings.Builder + suspendEntitlementSettings() { + return getStubSettingsBuilder().suspendEntitlementSettings(); + } + + /** Returns the builder for the settings used for calls to suspendEntitlement. */ + public OperationCallSettings.Builder + suspendEntitlementOperationSettings() { + return getStubSettingsBuilder().suspendEntitlementOperationSettings(); + } + + /** Returns the builder for the settings used for calls to cancelEntitlement. */ + public UnaryCallSettings.Builder + cancelEntitlementSettings() { + return getStubSettingsBuilder().cancelEntitlementSettings(); + } + + /** Returns the builder for the settings used for calls to cancelEntitlement. */ + public OperationCallSettings.Builder + cancelEntitlementOperationSettings() { + return getStubSettingsBuilder().cancelEntitlementOperationSettings(); + } + + /** Returns the builder for the settings used for calls to activateEntitlement. */ + public UnaryCallSettings.Builder + activateEntitlementSettings() { + return getStubSettingsBuilder().activateEntitlementSettings(); + } + + /** Returns the builder for the settings used for calls to activateEntitlement. */ + public OperationCallSettings.Builder + activateEntitlementOperationSettings() { + return getStubSettingsBuilder().activateEntitlementOperationSettings(); + } + + /** Returns the builder for the settings used for calls to transferEntitlements. */ + public UnaryCallSettings.Builder + transferEntitlementsSettings() { + return getStubSettingsBuilder().transferEntitlementsSettings(); + } + + /** Returns the builder for the settings used for calls to transferEntitlements. */ + public OperationCallSettings.Builder< + TransferEntitlementsRequest, TransferEntitlementsResponse, OperationMetadata> + transferEntitlementsOperationSettings() { + return getStubSettingsBuilder().transferEntitlementsOperationSettings(); + } + + /** Returns the builder for the settings used for calls to transferEntitlementsToGoogle. */ + public UnaryCallSettings.Builder + transferEntitlementsToGoogleSettings() { + return getStubSettingsBuilder().transferEntitlementsToGoogleSettings(); + } + + /** Returns the builder for the settings used for calls to transferEntitlementsToGoogle. */ + public OperationCallSettings.Builder< + TransferEntitlementsToGoogleRequest, Empty, OperationMetadata> + transferEntitlementsToGoogleOperationSettings() { + return getStubSettingsBuilder().transferEntitlementsToGoogleOperationSettings(); + } + + /** Returns the builder for the settings used for calls to listChannelPartnerLinks. */ + public PagedCallSettings.Builder< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ListChannelPartnerLinksPagedResponse> + listChannelPartnerLinksSettings() { + return getStubSettingsBuilder().listChannelPartnerLinksSettings(); + } + + /** Returns the builder for the settings used for calls to getChannelPartnerLink. */ + public UnaryCallSettings.Builder + getChannelPartnerLinkSettings() { + return getStubSettingsBuilder().getChannelPartnerLinkSettings(); + } + + /** Returns the builder for the settings used for calls to createChannelPartnerLink. */ + public UnaryCallSettings.Builder + createChannelPartnerLinkSettings() { + return getStubSettingsBuilder().createChannelPartnerLinkSettings(); + } + + /** Returns the builder for the settings used for calls to updateChannelPartnerLink. */ + public UnaryCallSettings.Builder + updateChannelPartnerLinkSettings() { + return getStubSettingsBuilder().updateChannelPartnerLinkSettings(); + } + + /** Returns the builder for the settings used for calls to listProducts. */ + public PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings() { + return getStubSettingsBuilder().listProductsSettings(); + } + + /** Returns the builder for the settings used for calls to listSkus. */ + public PagedCallSettings.Builder + listSkusSettings() { + return getStubSettingsBuilder().listSkusSettings(); + } + + /** Returns the builder for the settings used for calls to listOffers. */ + public PagedCallSettings.Builder + listOffersSettings() { + return getStubSettingsBuilder().listOffersSettings(); + } + + /** Returns the builder for the settings used for calls to listPurchasableSkus. */ + public PagedCallSettings.Builder< + ListPurchasableSkusRequest, + ListPurchasableSkusResponse, + ListPurchasableSkusPagedResponse> + listPurchasableSkusSettings() { + return getStubSettingsBuilder().listPurchasableSkusSettings(); + } + + /** Returns the builder for the settings used for calls to listPurchasableOffers. */ + public PagedCallSettings.Builder< + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + ListPurchasableOffersPagedResponse> + listPurchasableOffersSettings() { + return getStubSettingsBuilder().listPurchasableOffersSettings(); + } + + @Override + public CloudChannelServiceSettings build() throws IOException { + return new CloudChannelServiceSettings(this); + } + } +} diff --git a/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/package-info.java b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/package-info.java new file mode 100644 index 00000000..ac7e319e --- /dev/null +++ b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/package-info.java @@ -0,0 +1,47 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT 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. + * + *

======================= CloudChannelServiceClient ======================= + * + *

Service Description: CloudChannelService enables Google cloud resellers and distributors to + * manage their customers, channel partners, entitlements and reports. + * + *

Using this service: 1. Resellers or distributors can manage a customer entity. 2. Distributors + * can register an authorized reseller in their channel and then enable delegated admin access for + * the reseller. 3. Resellers or distributors can manage entitlements for their customers. + * + *

The service primarily exposes the following resources: - + * [Customer][google.cloud.channel.v1.Customer]s: A Customer represents an entity managed by a + * reseller or distributor. A customer typically represents an enterprise. In an n-tier resale + * channel hierarchy, customers are generally represented as leaf nodes. Customers primarily have an + * Entitlement sub-resource discussed below. + * + *

- [Entitlement][google.cloud.channel.v1.Entitlement]s: An Entitlement represents an entity + * which provides a customer means to start using a service. Entitlements are created or updated as + * a result of a successful fulfillment. + * + *

- [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s: A ChannelPartnerLink is + * an entity that identifies links between distributors and their indirect resellers in a channel. + * + *

Sample for CloudChannelServiceClient: + */ +@Generated("by gapic-generator-java") +package com.google.cloud.channel.v1; + +import javax.annotation.Generated; diff --git a/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStub.java b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStub.java new file mode 100644 index 00000000..7da2fb0f --- /dev/null +++ b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStub.java @@ -0,0 +1,347 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1.stub; + +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListChannelPartnerLinksPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementsPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableSkusPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.channel.v1.ActivateEntitlementRequest; +import com.google.cloud.channel.v1.CancelEntitlementRequest; +import com.google.cloud.channel.v1.ChangeOfferRequest; +import com.google.cloud.channel.v1.ChangeParametersRequest; +import com.google.cloud.channel.v1.ChangeRenewalSettingsRequest; +import com.google.cloud.channel.v1.ChannelPartnerLink; +import com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest; +import com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse; +import com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest; +import com.google.cloud.channel.v1.CreateCustomerRequest; +import com.google.cloud.channel.v1.CreateEntitlementRequest; +import com.google.cloud.channel.v1.Customer; +import com.google.cloud.channel.v1.DeleteCustomerRequest; +import com.google.cloud.channel.v1.Entitlement; +import com.google.cloud.channel.v1.GetChannelPartnerLinkRequest; +import com.google.cloud.channel.v1.GetCustomerRequest; +import com.google.cloud.channel.v1.GetEntitlementRequest; +import com.google.cloud.channel.v1.ListChannelPartnerLinksRequest; +import com.google.cloud.channel.v1.ListChannelPartnerLinksResponse; +import com.google.cloud.channel.v1.ListCustomersRequest; +import com.google.cloud.channel.v1.ListCustomersResponse; +import com.google.cloud.channel.v1.ListEntitlementsRequest; +import com.google.cloud.channel.v1.ListEntitlementsResponse; +import com.google.cloud.channel.v1.ListOffersRequest; +import com.google.cloud.channel.v1.ListOffersResponse; +import com.google.cloud.channel.v1.ListProductsRequest; +import com.google.cloud.channel.v1.ListProductsResponse; +import com.google.cloud.channel.v1.ListPurchasableOffersRequest; +import com.google.cloud.channel.v1.ListPurchasableOffersResponse; +import com.google.cloud.channel.v1.ListPurchasableSkusRequest; +import com.google.cloud.channel.v1.ListPurchasableSkusResponse; +import com.google.cloud.channel.v1.ListSkusRequest; +import com.google.cloud.channel.v1.ListSkusResponse; +import com.google.cloud.channel.v1.ListTransferableOffersRequest; +import com.google.cloud.channel.v1.ListTransferableOffersResponse; +import com.google.cloud.channel.v1.ListTransferableSkusRequest; +import com.google.cloud.channel.v1.ListTransferableSkusResponse; +import com.google.cloud.channel.v1.OperationMetadata; +import com.google.cloud.channel.v1.ProvisionCloudIdentityRequest; +import com.google.cloud.channel.v1.StartPaidServiceRequest; +import com.google.cloud.channel.v1.SuspendEntitlementRequest; +import com.google.cloud.channel.v1.TransferEntitlementsRequest; +import com.google.cloud.channel.v1.TransferEntitlementsResponse; +import com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest; +import com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest; +import com.google.cloud.channel.v1.UpdateCustomerRequest; +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 CloudChannelService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public abstract class CloudChannelServiceStub implements BackgroundResource { + + public OperationsStub getOperationsStub() { + throw new UnsupportedOperationException("Not implemented: getOperationsStub()"); + } + + public UnaryCallable + listCustomersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listCustomersPagedCallable()"); + } + + public UnaryCallable listCustomersCallable() { + throw new UnsupportedOperationException("Not implemented: listCustomersCallable()"); + } + + public UnaryCallable getCustomerCallable() { + throw new UnsupportedOperationException("Not implemented: getCustomerCallable()"); + } + + public UnaryCallable< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistCallable() { + throw new UnsupportedOperationException( + "Not implemented: checkCloudIdentityAccountsExistCallable()"); + } + + public UnaryCallable createCustomerCallable() { + throw new UnsupportedOperationException("Not implemented: createCustomerCallable()"); + } + + public UnaryCallable updateCustomerCallable() { + throw new UnsupportedOperationException("Not implemented: updateCustomerCallable()"); + } + + public UnaryCallable deleteCustomerCallable() { + throw new UnsupportedOperationException("Not implemented: deleteCustomerCallable()"); + } + + public OperationCallable + provisionCloudIdentityOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: provisionCloudIdentityOperationCallable()"); + } + + public UnaryCallable provisionCloudIdentityCallable() { + throw new UnsupportedOperationException("Not implemented: provisionCloudIdentityCallable()"); + } + + public UnaryCallable + listEntitlementsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listEntitlementsPagedCallable()"); + } + + public UnaryCallable + listEntitlementsCallable() { + throw new UnsupportedOperationException("Not implemented: listEntitlementsCallable()"); + } + + public UnaryCallable + listTransferableSkusPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listTransferableSkusPagedCallable()"); + } + + public UnaryCallable + listTransferableSkusCallable() { + throw new UnsupportedOperationException("Not implemented: listTransferableSkusCallable()"); + } + + public UnaryCallable + listTransferableOffersPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listTransferableOffersPagedCallable()"); + } + + public UnaryCallable + listTransferableOffersCallable() { + throw new UnsupportedOperationException("Not implemented: listTransferableOffersCallable()"); + } + + public UnaryCallable getEntitlementCallable() { + throw new UnsupportedOperationException("Not implemented: getEntitlementCallable()"); + } + + public OperationCallable + createEntitlementOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: createEntitlementOperationCallable()"); + } + + public UnaryCallable createEntitlementCallable() { + throw new UnsupportedOperationException("Not implemented: createEntitlementCallable()"); + } + + public OperationCallable + changeParametersOperationCallable() { + throw new UnsupportedOperationException("Not implemented: changeParametersOperationCallable()"); + } + + public UnaryCallable changeParametersCallable() { + throw new UnsupportedOperationException("Not implemented: changeParametersCallable()"); + } + + public OperationCallable + changeRenewalSettingsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: changeRenewalSettingsOperationCallable()"); + } + + public UnaryCallable changeRenewalSettingsCallable() { + throw new UnsupportedOperationException("Not implemented: changeRenewalSettingsCallable()"); + } + + public OperationCallable + changeOfferOperationCallable() { + throw new UnsupportedOperationException("Not implemented: changeOfferOperationCallable()"); + } + + public UnaryCallable changeOfferCallable() { + throw new UnsupportedOperationException("Not implemented: changeOfferCallable()"); + } + + public OperationCallable + startPaidServiceOperationCallable() { + throw new UnsupportedOperationException("Not implemented: startPaidServiceOperationCallable()"); + } + + public UnaryCallable startPaidServiceCallable() { + throw new UnsupportedOperationException("Not implemented: startPaidServiceCallable()"); + } + + public OperationCallable + suspendEntitlementOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: suspendEntitlementOperationCallable()"); + } + + public UnaryCallable suspendEntitlementCallable() { + throw new UnsupportedOperationException("Not implemented: suspendEntitlementCallable()"); + } + + public OperationCallable + cancelEntitlementOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: cancelEntitlementOperationCallable()"); + } + + public UnaryCallable cancelEntitlementCallable() { + throw new UnsupportedOperationException("Not implemented: cancelEntitlementCallable()"); + } + + public OperationCallable + activateEntitlementOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: activateEntitlementOperationCallable()"); + } + + public UnaryCallable activateEntitlementCallable() { + throw new UnsupportedOperationException("Not implemented: activateEntitlementCallable()"); + } + + public OperationCallable< + TransferEntitlementsRequest, TransferEntitlementsResponse, OperationMetadata> + transferEntitlementsOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: transferEntitlementsOperationCallable()"); + } + + public UnaryCallable transferEntitlementsCallable() { + throw new UnsupportedOperationException("Not implemented: transferEntitlementsCallable()"); + } + + public OperationCallable + transferEntitlementsToGoogleOperationCallable() { + throw new UnsupportedOperationException( + "Not implemented: transferEntitlementsToGoogleOperationCallable()"); + } + + public UnaryCallable + transferEntitlementsToGoogleCallable() { + throw new UnsupportedOperationException( + "Not implemented: transferEntitlementsToGoogleCallable()"); + } + + public UnaryCallable + listChannelPartnerLinksPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listChannelPartnerLinksPagedCallable()"); + } + + public UnaryCallable + listChannelPartnerLinksCallable() { + throw new UnsupportedOperationException("Not implemented: listChannelPartnerLinksCallable()"); + } + + public UnaryCallable + getChannelPartnerLinkCallable() { + throw new UnsupportedOperationException("Not implemented: getChannelPartnerLinkCallable()"); + } + + public UnaryCallable + createChannelPartnerLinkCallable() { + throw new UnsupportedOperationException("Not implemented: createChannelPartnerLinkCallable()"); + } + + public UnaryCallable + updateChannelPartnerLinkCallable() { + throw new UnsupportedOperationException("Not implemented: updateChannelPartnerLinkCallable()"); + } + + public UnaryCallable listProductsPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsPagedCallable()"); + } + + public UnaryCallable listProductsCallable() { + throw new UnsupportedOperationException("Not implemented: listProductsCallable()"); + } + + public UnaryCallable listSkusPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listSkusPagedCallable()"); + } + + public UnaryCallable listSkusCallable() { + throw new UnsupportedOperationException("Not implemented: listSkusCallable()"); + } + + public UnaryCallable listOffersPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listOffersPagedCallable()"); + } + + public UnaryCallable listOffersCallable() { + throw new UnsupportedOperationException("Not implemented: listOffersCallable()"); + } + + public UnaryCallable + listPurchasableSkusPagedCallable() { + throw new UnsupportedOperationException("Not implemented: listPurchasableSkusPagedCallable()"); + } + + public UnaryCallable + listPurchasableSkusCallable() { + throw new UnsupportedOperationException("Not implemented: listPurchasableSkusCallable()"); + } + + public UnaryCallable + listPurchasableOffersPagedCallable() { + throw new UnsupportedOperationException( + "Not implemented: listPurchasableOffersPagedCallable()"); + } + + public UnaryCallable + listPurchasableOffersCallable() { + throw new UnsupportedOperationException("Not implemented: listPurchasableOffersCallable()"); + } + + @Override + public abstract void close(); +} diff --git a/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStubSettings.java b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStubSettings.java new file mode 100644 index 00000000..7edcbd9b --- /dev/null +++ b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/CloudChannelServiceStubSettings.java @@ -0,0 +1,2286 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1.stub; + +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListChannelPartnerLinksPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementsPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableSkusPagedResponse; + +import com.google.api.core.ApiFunction; +import com.google.api.core.ApiFuture; +import com.google.api.core.BetaApi; +import com.google.api.gax.core.GaxProperties; +import com.google.api.gax.core.GoogleCredentialsProvider; +import com.google.api.gax.core.InstantiatingExecutorProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.GrpcTransportChannel; +import com.google.api.gax.grpc.InstantiatingGrpcChannelProvider; +import com.google.api.gax.grpc.ProtoOperationTransformers; +import com.google.api.gax.longrunning.OperationSnapshot; +import com.google.api.gax.longrunning.OperationTimedPollAlgorithm; +import com.google.api.gax.retrying.RetrySettings; +import com.google.api.gax.rpc.ApiCallContext; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallSettings; +import com.google.api.gax.rpc.PageContext; +import com.google.api.gax.rpc.PagedCallSettings; +import com.google.api.gax.rpc.PagedListDescriptor; +import com.google.api.gax.rpc.PagedListResponseFactory; +import com.google.api.gax.rpc.StatusCode; +import com.google.api.gax.rpc.StubSettings; +import com.google.api.gax.rpc.TransportChannelProvider; +import com.google.api.gax.rpc.UnaryCallSettings; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.channel.v1.ActivateEntitlementRequest; +import com.google.cloud.channel.v1.CancelEntitlementRequest; +import com.google.cloud.channel.v1.ChangeOfferRequest; +import com.google.cloud.channel.v1.ChangeParametersRequest; +import com.google.cloud.channel.v1.ChangeRenewalSettingsRequest; +import com.google.cloud.channel.v1.ChannelPartnerLink; +import com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest; +import com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse; +import com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest; +import com.google.cloud.channel.v1.CreateCustomerRequest; +import com.google.cloud.channel.v1.CreateEntitlementRequest; +import com.google.cloud.channel.v1.Customer; +import com.google.cloud.channel.v1.DeleteCustomerRequest; +import com.google.cloud.channel.v1.Entitlement; +import com.google.cloud.channel.v1.GetChannelPartnerLinkRequest; +import com.google.cloud.channel.v1.GetCustomerRequest; +import com.google.cloud.channel.v1.GetEntitlementRequest; +import com.google.cloud.channel.v1.ListChannelPartnerLinksRequest; +import com.google.cloud.channel.v1.ListChannelPartnerLinksResponse; +import com.google.cloud.channel.v1.ListCustomersRequest; +import com.google.cloud.channel.v1.ListCustomersResponse; +import com.google.cloud.channel.v1.ListEntitlementsRequest; +import com.google.cloud.channel.v1.ListEntitlementsResponse; +import com.google.cloud.channel.v1.ListOffersRequest; +import com.google.cloud.channel.v1.ListOffersResponse; +import com.google.cloud.channel.v1.ListProductsRequest; +import com.google.cloud.channel.v1.ListProductsResponse; +import com.google.cloud.channel.v1.ListPurchasableOffersRequest; +import com.google.cloud.channel.v1.ListPurchasableOffersResponse; +import com.google.cloud.channel.v1.ListPurchasableSkusRequest; +import com.google.cloud.channel.v1.ListPurchasableSkusResponse; +import com.google.cloud.channel.v1.ListSkusRequest; +import com.google.cloud.channel.v1.ListSkusResponse; +import com.google.cloud.channel.v1.ListTransferableOffersRequest; +import com.google.cloud.channel.v1.ListTransferableOffersResponse; +import com.google.cloud.channel.v1.ListTransferableSkusRequest; +import com.google.cloud.channel.v1.ListTransferableSkusResponse; +import com.google.cloud.channel.v1.Offer; +import com.google.cloud.channel.v1.OperationMetadata; +import com.google.cloud.channel.v1.Product; +import com.google.cloud.channel.v1.ProvisionCloudIdentityRequest; +import com.google.cloud.channel.v1.PurchasableOffer; +import com.google.cloud.channel.v1.PurchasableSku; +import com.google.cloud.channel.v1.Sku; +import com.google.cloud.channel.v1.StartPaidServiceRequest; +import com.google.cloud.channel.v1.SuspendEntitlementRequest; +import com.google.cloud.channel.v1.TransferEntitlementsRequest; +import com.google.cloud.channel.v1.TransferEntitlementsResponse; +import com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest; +import com.google.cloud.channel.v1.TransferableOffer; +import com.google.cloud.channel.v1.TransferableSku; +import com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest; +import com.google.cloud.channel.v1.UpdateCustomerRequest; +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 CloudChannelServiceStub}. + * + *

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

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

{@code
+ * CloudChannelServiceStubSettings.Builder cloudChannelServiceSettingsBuilder =
+ *     CloudChannelServiceStubSettings.newBuilder();
+ * cloudChannelServiceSettingsBuilder
+ *     .getCustomerSettings()
+ *     .setRetrySettings(
+ *         cloudChannelServiceSettingsBuilder
+ *             .getCustomerSettings()
+ *             .getRetrySettings()
+ *             .toBuilder()
+ *             .setTotalTimeout(Duration.ofSeconds(30))
+ *             .build());
+ * CloudChannelServiceStubSettings cloudChannelServiceSettings =
+ *     cloudChannelServiceSettingsBuilder.build();
+ * }
+ */ +@Generated("by gapic-generator-java") +public class CloudChannelServiceStubSettings extends StubSettings { + /** The default scopes of the service. */ + private static final ImmutableList DEFAULT_SERVICE_SCOPES = + ImmutableList.builder().add("https://www.googleapis.com/auth/apps.order").build(); + + private final PagedCallSettings< + ListCustomersRequest, ListCustomersResponse, ListCustomersPagedResponse> + listCustomersSettings; + private final UnaryCallSettings getCustomerSettings; + private final UnaryCallSettings< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistSettings; + private final UnaryCallSettings createCustomerSettings; + private final UnaryCallSettings updateCustomerSettings; + private final UnaryCallSettings deleteCustomerSettings; + private final UnaryCallSettings + provisionCloudIdentitySettings; + private final OperationCallSettings + provisionCloudIdentityOperationSettings; + private final PagedCallSettings< + ListEntitlementsRequest, ListEntitlementsResponse, ListEntitlementsPagedResponse> + listEntitlementsSettings; + private final PagedCallSettings< + ListTransferableSkusRequest, + ListTransferableSkusResponse, + ListTransferableSkusPagedResponse> + listTransferableSkusSettings; + private final PagedCallSettings< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + ListTransferableOffersPagedResponse> + listTransferableOffersSettings; + private final UnaryCallSettings getEntitlementSettings; + private final UnaryCallSettings createEntitlementSettings; + private final OperationCallSettings + createEntitlementOperationSettings; + private final UnaryCallSettings changeParametersSettings; + private final OperationCallSettings + changeParametersOperationSettings; + private final UnaryCallSettings + changeRenewalSettingsSettings; + private final OperationCallSettings + changeRenewalSettingsOperationSettings; + private final UnaryCallSettings changeOfferSettings; + private final OperationCallSettings + changeOfferOperationSettings; + private final UnaryCallSettings startPaidServiceSettings; + private final OperationCallSettings + startPaidServiceOperationSettings; + private final UnaryCallSettings suspendEntitlementSettings; + private final OperationCallSettings + suspendEntitlementOperationSettings; + private final UnaryCallSettings cancelEntitlementSettings; + private final OperationCallSettings + cancelEntitlementOperationSettings; + private final UnaryCallSettings + activateEntitlementSettings; + private final OperationCallSettings + activateEntitlementOperationSettings; + private final UnaryCallSettings + transferEntitlementsSettings; + private final OperationCallSettings< + TransferEntitlementsRequest, TransferEntitlementsResponse, OperationMetadata> + transferEntitlementsOperationSettings; + private final UnaryCallSettings + transferEntitlementsToGoogleSettings; + private final OperationCallSettings + transferEntitlementsToGoogleOperationSettings; + private final PagedCallSettings< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ListChannelPartnerLinksPagedResponse> + listChannelPartnerLinksSettings; + private final UnaryCallSettings + getChannelPartnerLinkSettings; + private final UnaryCallSettings + createChannelPartnerLinkSettings; + private final UnaryCallSettings + updateChannelPartnerLinkSettings; + private final PagedCallSettings< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings; + private final PagedCallSettings + listSkusSettings; + private final PagedCallSettings + listOffersSettings; + private final PagedCallSettings< + ListPurchasableSkusRequest, ListPurchasableSkusResponse, ListPurchasableSkusPagedResponse> + listPurchasableSkusSettings; + private final PagedCallSettings< + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + ListPurchasableOffersPagedResponse> + listPurchasableOffersSettings; + + private static final PagedListDescriptor + LIST_CUSTOMERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListCustomersRequest injectToken(ListCustomersRequest payload, String token) { + return ListCustomersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListCustomersRequest injectPageSize(ListCustomersRequest payload, int pageSize) { + return ListCustomersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListCustomersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListCustomersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListCustomersResponse payload) { + return payload.getCustomersList() == null + ? ImmutableList.of() + : payload.getCustomersList(); + } + }; + + private static final PagedListDescriptor< + ListEntitlementsRequest, ListEntitlementsResponse, Entitlement> + LIST_ENTITLEMENTS_PAGE_STR_DESC = + new PagedListDescriptor< + ListEntitlementsRequest, ListEntitlementsResponse, Entitlement>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListEntitlementsRequest injectToken( + ListEntitlementsRequest payload, String token) { + return ListEntitlementsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListEntitlementsRequest injectPageSize( + ListEntitlementsRequest payload, int pageSize) { + return ListEntitlementsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListEntitlementsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListEntitlementsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListEntitlementsResponse payload) { + return payload.getEntitlementsList() == null + ? ImmutableList.of() + : payload.getEntitlementsList(); + } + }; + + private static final PagedListDescriptor< + ListTransferableSkusRequest, ListTransferableSkusResponse, TransferableSku> + LIST_TRANSFERABLE_SKUS_PAGE_STR_DESC = + new PagedListDescriptor< + ListTransferableSkusRequest, ListTransferableSkusResponse, TransferableSku>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTransferableSkusRequest injectToken( + ListTransferableSkusRequest payload, String token) { + return ListTransferableSkusRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTransferableSkusRequest injectPageSize( + ListTransferableSkusRequest payload, int pageSize) { + return ListTransferableSkusRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListTransferableSkusRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTransferableSkusResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListTransferableSkusResponse payload) { + return payload.getTransferableSkusList() == null + ? ImmutableList.of() + : payload.getTransferableSkusList(); + } + }; + + private static final PagedListDescriptor< + ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer> + LIST_TRANSFERABLE_OFFERS_PAGE_STR_DESC = + new PagedListDescriptor< + ListTransferableOffersRequest, ListTransferableOffersResponse, TransferableOffer>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListTransferableOffersRequest injectToken( + ListTransferableOffersRequest payload, String token) { + return ListTransferableOffersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListTransferableOffersRequest injectPageSize( + ListTransferableOffersRequest payload, int pageSize) { + return ListTransferableOffersRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListTransferableOffersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListTransferableOffersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListTransferableOffersResponse payload) { + return payload.getTransferableOffersList() == null + ? ImmutableList.of() + : payload.getTransferableOffersList(); + } + }; + + private static final PagedListDescriptor< + ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse, ChannelPartnerLink> + LIST_CHANNEL_PARTNER_LINKS_PAGE_STR_DESC = + new PagedListDescriptor< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ChannelPartnerLink>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListChannelPartnerLinksRequest injectToken( + ListChannelPartnerLinksRequest payload, String token) { + return ListChannelPartnerLinksRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListChannelPartnerLinksRequest injectPageSize( + ListChannelPartnerLinksRequest payload, int pageSize) { + return ListChannelPartnerLinksRequest.newBuilder(payload) + .setPageSize(pageSize) + .build(); + } + + @Override + public Integer extractPageSize(ListChannelPartnerLinksRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListChannelPartnerLinksResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListChannelPartnerLinksResponse payload) { + return payload.getChannelPartnerLinksList() == null + ? ImmutableList.of() + : payload.getChannelPartnerLinksList(); + } + }; + + private static final PagedListDescriptor + LIST_PRODUCTS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListProductsRequest injectToken(ListProductsRequest payload, String token) { + return ListProductsRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListProductsRequest injectPageSize(ListProductsRequest payload, int pageSize) { + return ListProductsRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListProductsRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListProductsResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListProductsResponse payload) { + return payload.getProductsList() == null + ? ImmutableList.of() + : payload.getProductsList(); + } + }; + + private static final PagedListDescriptor + LIST_SKUS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListSkusRequest injectToken(ListSkusRequest payload, String token) { + return ListSkusRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListSkusRequest injectPageSize(ListSkusRequest payload, int pageSize) { + return ListSkusRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListSkusRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListSkusResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListSkusResponse payload) { + return payload.getSkusList() == null + ? ImmutableList.of() + : payload.getSkusList(); + } + }; + + private static final PagedListDescriptor + LIST_OFFERS_PAGE_STR_DESC = + new PagedListDescriptor() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListOffersRequest injectToken(ListOffersRequest payload, String token) { + return ListOffersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListOffersRequest injectPageSize(ListOffersRequest payload, int pageSize) { + return ListOffersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListOffersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListOffersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListOffersResponse payload) { + return payload.getOffersList() == null + ? ImmutableList.of() + : payload.getOffersList(); + } + }; + + private static final PagedListDescriptor< + ListPurchasableSkusRequest, ListPurchasableSkusResponse, PurchasableSku> + LIST_PURCHASABLE_SKUS_PAGE_STR_DESC = + new PagedListDescriptor< + ListPurchasableSkusRequest, ListPurchasableSkusResponse, PurchasableSku>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPurchasableSkusRequest injectToken( + ListPurchasableSkusRequest payload, String token) { + return ListPurchasableSkusRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPurchasableSkusRequest injectPageSize( + ListPurchasableSkusRequest payload, int pageSize) { + return ListPurchasableSkusRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPurchasableSkusRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPurchasableSkusResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources(ListPurchasableSkusResponse payload) { + return payload.getPurchasableSkusList() == null + ? ImmutableList.of() + : payload.getPurchasableSkusList(); + } + }; + + private static final PagedListDescriptor< + ListPurchasableOffersRequest, ListPurchasableOffersResponse, PurchasableOffer> + LIST_PURCHASABLE_OFFERS_PAGE_STR_DESC = + new PagedListDescriptor< + ListPurchasableOffersRequest, ListPurchasableOffersResponse, PurchasableOffer>() { + @Override + public String emptyToken() { + return ""; + } + + @Override + public ListPurchasableOffersRequest injectToken( + ListPurchasableOffersRequest payload, String token) { + return ListPurchasableOffersRequest.newBuilder(payload).setPageToken(token).build(); + } + + @Override + public ListPurchasableOffersRequest injectPageSize( + ListPurchasableOffersRequest payload, int pageSize) { + return ListPurchasableOffersRequest.newBuilder(payload).setPageSize(pageSize).build(); + } + + @Override + public Integer extractPageSize(ListPurchasableOffersRequest payload) { + return payload.getPageSize(); + } + + @Override + public String extractNextToken(ListPurchasableOffersResponse payload) { + return payload.getNextPageToken(); + } + + @Override + public Iterable extractResources( + ListPurchasableOffersResponse payload) { + return payload.getPurchasableOffersList() == null + ? ImmutableList.of() + : payload.getPurchasableOffersList(); + } + }; + + private static final PagedListResponseFactory< + ListCustomersRequest, ListCustomersResponse, ListCustomersPagedResponse> + LIST_CUSTOMERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListCustomersRequest, ListCustomersResponse, ListCustomersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListCustomersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_CUSTOMERS_PAGE_STR_DESC, request, context); + return ListCustomersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListEntitlementsRequest, ListEntitlementsResponse, ListEntitlementsPagedResponse> + LIST_ENTITLEMENTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListEntitlementsRequest, ListEntitlementsResponse, ListEntitlementsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListEntitlementsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_ENTITLEMENTS_PAGE_STR_DESC, request, context); + return ListEntitlementsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTransferableSkusRequest, + ListTransferableSkusResponse, + ListTransferableSkusPagedResponse> + LIST_TRANSFERABLE_SKUS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTransferableSkusRequest, + ListTransferableSkusResponse, + ListTransferableSkusPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListTransferableSkusRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListTransferableSkusRequest, ListTransferableSkusResponse, TransferableSku> + pageContext = + PageContext.create( + callable, LIST_TRANSFERABLE_SKUS_PAGE_STR_DESC, request, context); + return ListTransferableSkusPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + ListTransferableOffersPagedResponse> + LIST_TRANSFERABLE_OFFERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + ListTransferableOffersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListTransferableOffersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + TransferableOffer> + pageContext = + PageContext.create( + callable, LIST_TRANSFERABLE_OFFERS_PAGE_STR_DESC, request, context); + return ListTransferableOffersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ListChannelPartnerLinksPagedResponse> + LIST_CHANNEL_PARTNER_LINKS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ListChannelPartnerLinksPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable + callable, + ListChannelPartnerLinksRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ChannelPartnerLink> + pageContext = + PageContext.create( + callable, LIST_CHANNEL_PARTNER_LINKS_PAGE_STR_DESC, request, context); + return ListChannelPartnerLinksPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + LIST_PRODUCTS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListProductsRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_PRODUCTS_PAGE_STR_DESC, request, context); + return ListProductsPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListSkusRequest, ListSkusResponse, ListSkusPagedResponse> + LIST_SKUS_PAGE_STR_FACT = + new PagedListResponseFactory() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListSkusRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_SKUS_PAGE_STR_DESC, request, context); + return ListSkusPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListOffersRequest, ListOffersResponse, ListOffersPagedResponse> + LIST_OFFERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListOffersRequest, ListOffersResponse, ListOffersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListOffersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext pageContext = + PageContext.create(callable, LIST_OFFERS_PAGE_STR_DESC, request, context); + return ListOffersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListPurchasableSkusRequest, ListPurchasableSkusResponse, ListPurchasableSkusPagedResponse> + LIST_PURCHASABLE_SKUS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPurchasableSkusRequest, + ListPurchasableSkusResponse, + ListPurchasableSkusPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPurchasableSkusRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext + pageContext = + PageContext.create( + callable, LIST_PURCHASABLE_SKUS_PAGE_STR_DESC, request, context); + return ListPurchasableSkusPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + private static final PagedListResponseFactory< + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + ListPurchasableOffersPagedResponse> + LIST_PURCHASABLE_OFFERS_PAGE_STR_FACT = + new PagedListResponseFactory< + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + ListPurchasableOffersPagedResponse>() { + @Override + public ApiFuture getFuturePagedResponse( + UnaryCallable callable, + ListPurchasableOffersRequest request, + ApiCallContext context, + ApiFuture futureResponse) { + PageContext< + ListPurchasableOffersRequest, ListPurchasableOffersResponse, PurchasableOffer> + pageContext = + PageContext.create( + callable, LIST_PURCHASABLE_OFFERS_PAGE_STR_DESC, request, context); + return ListPurchasableOffersPagedResponse.createAsync(pageContext, futureResponse); + } + }; + + /** Returns the object with the settings used for calls to listCustomers. */ + public PagedCallSettings + listCustomersSettings() { + return listCustomersSettings; + } + + /** Returns the object with the settings used for calls to getCustomer. */ + public UnaryCallSettings getCustomerSettings() { + return getCustomerSettings; + } + + /** Returns the object with the settings used for calls to checkCloudIdentityAccountsExist. */ + public UnaryCallSettings< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistSettings() { + return checkCloudIdentityAccountsExistSettings; + } + + /** Returns the object with the settings used for calls to createCustomer. */ + public UnaryCallSettings createCustomerSettings() { + return createCustomerSettings; + } + + /** Returns the object with the settings used for calls to updateCustomer. */ + public UnaryCallSettings updateCustomerSettings() { + return updateCustomerSettings; + } + + /** Returns the object with the settings used for calls to deleteCustomer. */ + public UnaryCallSettings deleteCustomerSettings() { + return deleteCustomerSettings; + } + + /** Returns the object with the settings used for calls to provisionCloudIdentity. */ + public UnaryCallSettings + provisionCloudIdentitySettings() { + return provisionCloudIdentitySettings; + } + + /** Returns the object with the settings used for calls to provisionCloudIdentity. */ + public OperationCallSettings + provisionCloudIdentityOperationSettings() { + return provisionCloudIdentityOperationSettings; + } + + /** Returns the object with the settings used for calls to listEntitlements. */ + public PagedCallSettings< + ListEntitlementsRequest, ListEntitlementsResponse, ListEntitlementsPagedResponse> + listEntitlementsSettings() { + return listEntitlementsSettings; + } + + /** Returns the object with the settings used for calls to listTransferableSkus. */ + public PagedCallSettings< + ListTransferableSkusRequest, + ListTransferableSkusResponse, + ListTransferableSkusPagedResponse> + listTransferableSkusSettings() { + return listTransferableSkusSettings; + } + + /** Returns the object with the settings used for calls to listTransferableOffers. */ + public PagedCallSettings< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + ListTransferableOffersPagedResponse> + listTransferableOffersSettings() { + return listTransferableOffersSettings; + } + + /** Returns the object with the settings used for calls to getEntitlement. */ + public UnaryCallSettings getEntitlementSettings() { + return getEntitlementSettings; + } + + /** Returns the object with the settings used for calls to createEntitlement. */ + public UnaryCallSettings createEntitlementSettings() { + return createEntitlementSettings; + } + + /** Returns the object with the settings used for calls to createEntitlement. */ + public OperationCallSettings + createEntitlementOperationSettings() { + return createEntitlementOperationSettings; + } + + /** Returns the object with the settings used for calls to changeParameters. */ + public UnaryCallSettings changeParametersSettings() { + return changeParametersSettings; + } + + /** Returns the object with the settings used for calls to changeParameters. */ + public OperationCallSettings + changeParametersOperationSettings() { + return changeParametersOperationSettings; + } + + /** Returns the object with the settings used for calls to changeRenewalSettings. */ + public UnaryCallSettings + changeRenewalSettingsSettings() { + return changeRenewalSettingsSettings; + } + + /** Returns the object with the settings used for calls to changeRenewalSettings. */ + public OperationCallSettings + changeRenewalSettingsOperationSettings() { + return changeRenewalSettingsOperationSettings; + } + + /** Returns the object with the settings used for calls to changeOffer. */ + public UnaryCallSettings changeOfferSettings() { + return changeOfferSettings; + } + + /** Returns the object with the settings used for calls to changeOffer. */ + public OperationCallSettings + changeOfferOperationSettings() { + return changeOfferOperationSettings; + } + + /** Returns the object with the settings used for calls to startPaidService. */ + public UnaryCallSettings startPaidServiceSettings() { + return startPaidServiceSettings; + } + + /** Returns the object with the settings used for calls to startPaidService. */ + public OperationCallSettings + startPaidServiceOperationSettings() { + return startPaidServiceOperationSettings; + } + + /** Returns the object with the settings used for calls to suspendEntitlement. */ + public UnaryCallSettings suspendEntitlementSettings() { + return suspendEntitlementSettings; + } + + /** Returns the object with the settings used for calls to suspendEntitlement. */ + public OperationCallSettings + suspendEntitlementOperationSettings() { + return suspendEntitlementOperationSettings; + } + + /** Returns the object with the settings used for calls to cancelEntitlement. */ + public UnaryCallSettings cancelEntitlementSettings() { + return cancelEntitlementSettings; + } + + /** Returns the object with the settings used for calls to cancelEntitlement. */ + public OperationCallSettings + cancelEntitlementOperationSettings() { + return cancelEntitlementOperationSettings; + } + + /** Returns the object with the settings used for calls to activateEntitlement. */ + public UnaryCallSettings activateEntitlementSettings() { + return activateEntitlementSettings; + } + + /** Returns the object with the settings used for calls to activateEntitlement. */ + public OperationCallSettings + activateEntitlementOperationSettings() { + return activateEntitlementOperationSettings; + } + + /** Returns the object with the settings used for calls to transferEntitlements. */ + public UnaryCallSettings transferEntitlementsSettings() { + return transferEntitlementsSettings; + } + + /** Returns the object with the settings used for calls to transferEntitlements. */ + public OperationCallSettings< + TransferEntitlementsRequest, TransferEntitlementsResponse, OperationMetadata> + transferEntitlementsOperationSettings() { + return transferEntitlementsOperationSettings; + } + + /** Returns the object with the settings used for calls to transferEntitlementsToGoogle. */ + public UnaryCallSettings + transferEntitlementsToGoogleSettings() { + return transferEntitlementsToGoogleSettings; + } + + /** Returns the object with the settings used for calls to transferEntitlementsToGoogle. */ + public OperationCallSettings + transferEntitlementsToGoogleOperationSettings() { + return transferEntitlementsToGoogleOperationSettings; + } + + /** Returns the object with the settings used for calls to listChannelPartnerLinks. */ + public PagedCallSettings< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ListChannelPartnerLinksPagedResponse> + listChannelPartnerLinksSettings() { + return listChannelPartnerLinksSettings; + } + + /** Returns the object with the settings used for calls to getChannelPartnerLink. */ + public UnaryCallSettings + getChannelPartnerLinkSettings() { + return getChannelPartnerLinkSettings; + } + + /** Returns the object with the settings used for calls to createChannelPartnerLink. */ + public UnaryCallSettings + createChannelPartnerLinkSettings() { + return createChannelPartnerLinkSettings; + } + + /** Returns the object with the settings used for calls to updateChannelPartnerLink. */ + public UnaryCallSettings + updateChannelPartnerLinkSettings() { + return updateChannelPartnerLinkSettings; + } + + /** Returns the object with the settings used for calls to listProducts. */ + public PagedCallSettings + listProductsSettings() { + return listProductsSettings; + } + + /** Returns the object with the settings used for calls to listSkus. */ + public PagedCallSettings + listSkusSettings() { + return listSkusSettings; + } + + /** Returns the object with the settings used for calls to listOffers. */ + public PagedCallSettings + listOffersSettings() { + return listOffersSettings; + } + + /** Returns the object with the settings used for calls to listPurchasableSkus. */ + public PagedCallSettings< + ListPurchasableSkusRequest, ListPurchasableSkusResponse, ListPurchasableSkusPagedResponse> + listPurchasableSkusSettings() { + return listPurchasableSkusSettings; + } + + /** Returns the object with the settings used for calls to listPurchasableOffers. */ + public PagedCallSettings< + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + ListPurchasableOffersPagedResponse> + listPurchasableOffersSettings() { + return listPurchasableOffersSettings; + } + + @BetaApi("A restructuring of stub classes is planned, so this may break in the future") + public CloudChannelServiceStub createStub() throws IOException { + if (getTransportChannelProvider() + .getTransportName() + .equals(GrpcTransportChannel.getGrpcTransportName())) { + return GrpcCloudChannelServiceStub.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 "cloudchannel.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(CloudChannelServiceStubSettings.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 CloudChannelServiceStubSettings(Builder settingsBuilder) throws IOException { + super(settingsBuilder); + + listCustomersSettings = settingsBuilder.listCustomersSettings().build(); + getCustomerSettings = settingsBuilder.getCustomerSettings().build(); + checkCloudIdentityAccountsExistSettings = + settingsBuilder.checkCloudIdentityAccountsExistSettings().build(); + createCustomerSettings = settingsBuilder.createCustomerSettings().build(); + updateCustomerSettings = settingsBuilder.updateCustomerSettings().build(); + deleteCustomerSettings = settingsBuilder.deleteCustomerSettings().build(); + provisionCloudIdentitySettings = settingsBuilder.provisionCloudIdentitySettings().build(); + provisionCloudIdentityOperationSettings = + settingsBuilder.provisionCloudIdentityOperationSettings().build(); + listEntitlementsSettings = settingsBuilder.listEntitlementsSettings().build(); + listTransferableSkusSettings = settingsBuilder.listTransferableSkusSettings().build(); + listTransferableOffersSettings = settingsBuilder.listTransferableOffersSettings().build(); + getEntitlementSettings = settingsBuilder.getEntitlementSettings().build(); + createEntitlementSettings = settingsBuilder.createEntitlementSettings().build(); + createEntitlementOperationSettings = + settingsBuilder.createEntitlementOperationSettings().build(); + changeParametersSettings = settingsBuilder.changeParametersSettings().build(); + changeParametersOperationSettings = settingsBuilder.changeParametersOperationSettings().build(); + changeRenewalSettingsSettings = settingsBuilder.changeRenewalSettingsSettings().build(); + changeRenewalSettingsOperationSettings = + settingsBuilder.changeRenewalSettingsOperationSettings().build(); + changeOfferSettings = settingsBuilder.changeOfferSettings().build(); + changeOfferOperationSettings = settingsBuilder.changeOfferOperationSettings().build(); + startPaidServiceSettings = settingsBuilder.startPaidServiceSettings().build(); + startPaidServiceOperationSettings = settingsBuilder.startPaidServiceOperationSettings().build(); + suspendEntitlementSettings = settingsBuilder.suspendEntitlementSettings().build(); + suspendEntitlementOperationSettings = + settingsBuilder.suspendEntitlementOperationSettings().build(); + cancelEntitlementSettings = settingsBuilder.cancelEntitlementSettings().build(); + cancelEntitlementOperationSettings = + settingsBuilder.cancelEntitlementOperationSettings().build(); + activateEntitlementSettings = settingsBuilder.activateEntitlementSettings().build(); + activateEntitlementOperationSettings = + settingsBuilder.activateEntitlementOperationSettings().build(); + transferEntitlementsSettings = settingsBuilder.transferEntitlementsSettings().build(); + transferEntitlementsOperationSettings = + settingsBuilder.transferEntitlementsOperationSettings().build(); + transferEntitlementsToGoogleSettings = + settingsBuilder.transferEntitlementsToGoogleSettings().build(); + transferEntitlementsToGoogleOperationSettings = + settingsBuilder.transferEntitlementsToGoogleOperationSettings().build(); + listChannelPartnerLinksSettings = settingsBuilder.listChannelPartnerLinksSettings().build(); + getChannelPartnerLinkSettings = settingsBuilder.getChannelPartnerLinkSettings().build(); + createChannelPartnerLinkSettings = settingsBuilder.createChannelPartnerLinkSettings().build(); + updateChannelPartnerLinkSettings = settingsBuilder.updateChannelPartnerLinkSettings().build(); + listProductsSettings = settingsBuilder.listProductsSettings().build(); + listSkusSettings = settingsBuilder.listSkusSettings().build(); + listOffersSettings = settingsBuilder.listOffersSettings().build(); + listPurchasableSkusSettings = settingsBuilder.listPurchasableSkusSettings().build(); + listPurchasableOffersSettings = settingsBuilder.listPurchasableOffersSettings().build(); + } + + /** Builder for CloudChannelServiceStubSettings. */ + public static class Builder + extends StubSettings.Builder { + private final ImmutableList> unaryMethodSettingsBuilders; + private final PagedCallSettings.Builder< + ListCustomersRequest, ListCustomersResponse, ListCustomersPagedResponse> + listCustomersSettings; + private final UnaryCallSettings.Builder getCustomerSettings; + private final UnaryCallSettings.Builder< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistSettings; + private final UnaryCallSettings.Builder createCustomerSettings; + private final UnaryCallSettings.Builder updateCustomerSettings; + private final UnaryCallSettings.Builder deleteCustomerSettings; + private final UnaryCallSettings.Builder + provisionCloudIdentitySettings; + private final OperationCallSettings.Builder< + ProvisionCloudIdentityRequest, Customer, OperationMetadata> + provisionCloudIdentityOperationSettings; + private final PagedCallSettings.Builder< + ListEntitlementsRequest, ListEntitlementsResponse, ListEntitlementsPagedResponse> + listEntitlementsSettings; + private final PagedCallSettings.Builder< + ListTransferableSkusRequest, + ListTransferableSkusResponse, + ListTransferableSkusPagedResponse> + listTransferableSkusSettings; + private final PagedCallSettings.Builder< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + ListTransferableOffersPagedResponse> + listTransferableOffersSettings; + private final UnaryCallSettings.Builder + getEntitlementSettings; + private final UnaryCallSettings.Builder + createEntitlementSettings; + private final OperationCallSettings.Builder< + CreateEntitlementRequest, Entitlement, OperationMetadata> + createEntitlementOperationSettings; + private final UnaryCallSettings.Builder + changeParametersSettings; + private final OperationCallSettings.Builder< + ChangeParametersRequest, Entitlement, OperationMetadata> + changeParametersOperationSettings; + private final UnaryCallSettings.Builder + changeRenewalSettingsSettings; + private final OperationCallSettings.Builder< + ChangeRenewalSettingsRequest, Entitlement, OperationMetadata> + changeRenewalSettingsOperationSettings; + private final UnaryCallSettings.Builder changeOfferSettings; + private final OperationCallSettings.Builder + changeOfferOperationSettings; + private final UnaryCallSettings.Builder + startPaidServiceSettings; + private final OperationCallSettings.Builder< + StartPaidServiceRequest, Entitlement, OperationMetadata> + startPaidServiceOperationSettings; + private final UnaryCallSettings.Builder + suspendEntitlementSettings; + private final OperationCallSettings.Builder< + SuspendEntitlementRequest, Entitlement, OperationMetadata> + suspendEntitlementOperationSettings; + private final UnaryCallSettings.Builder + cancelEntitlementSettings; + private final OperationCallSettings.Builder + cancelEntitlementOperationSettings; + private final UnaryCallSettings.Builder + activateEntitlementSettings; + private final OperationCallSettings.Builder< + ActivateEntitlementRequest, Entitlement, OperationMetadata> + activateEntitlementOperationSettings; + private final UnaryCallSettings.Builder + transferEntitlementsSettings; + private final OperationCallSettings.Builder< + TransferEntitlementsRequest, TransferEntitlementsResponse, OperationMetadata> + transferEntitlementsOperationSettings; + private final UnaryCallSettings.Builder + transferEntitlementsToGoogleSettings; + private final OperationCallSettings.Builder< + TransferEntitlementsToGoogleRequest, Empty, OperationMetadata> + transferEntitlementsToGoogleOperationSettings; + private final PagedCallSettings.Builder< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ListChannelPartnerLinksPagedResponse> + listChannelPartnerLinksSettings; + private final UnaryCallSettings.Builder + getChannelPartnerLinkSettings; + private final UnaryCallSettings.Builder + createChannelPartnerLinkSettings; + private final UnaryCallSettings.Builder + updateChannelPartnerLinkSettings; + private final PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings; + private final PagedCallSettings.Builder< + ListSkusRequest, ListSkusResponse, ListSkusPagedResponse> + listSkusSettings; + private final PagedCallSettings.Builder< + ListOffersRequest, ListOffersResponse, ListOffersPagedResponse> + listOffersSettings; + private final PagedCallSettings.Builder< + ListPurchasableSkusRequest, + ListPurchasableSkusResponse, + ListPurchasableSkusPagedResponse> + listPurchasableSkusSettings; + private final PagedCallSettings.Builder< + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + ListPurchasableOffersPagedResponse> + listPurchasableOffersSettings; + private static final ImmutableMap> + RETRYABLE_CODE_DEFINITIONS; + + static { + ImmutableMap.Builder> definitions = + ImmutableMap.builder(); + definitions.put( + "retry_policy_0_codes", + ImmutableSet.copyOf(Lists.newArrayList(StatusCode.Code.UNAVAILABLE))); + definitions.put( + "no_retry_1_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() + .setInitialRetryDelay(Duration.ofMillis(1000L)) + .setRetryDelayMultiplier(1.3) + .setMaxRetryDelay(Duration.ofMillis(10000L)) + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("retry_policy_0_params", settings); + settings = + RetrySettings.newBuilder() + .setInitialRpcTimeout(Duration.ofMillis(60000L)) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ofMillis(60000L)) + .setTotalTimeout(Duration.ofMillis(60000L)) + .build(); + definitions.put("no_retry_1_params", settings); + RETRY_PARAM_DEFINITIONS = definitions.build(); + } + + protected Builder() { + this(((ClientContext) null)); + } + + protected Builder(ClientContext clientContext) { + super(clientContext); + + listCustomersSettings = PagedCallSettings.newBuilder(LIST_CUSTOMERS_PAGE_STR_FACT); + getCustomerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + checkCloudIdentityAccountsExistSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createCustomerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateCustomerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + deleteCustomerSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + provisionCloudIdentitySettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + provisionCloudIdentityOperationSettings = OperationCallSettings.newBuilder(); + listEntitlementsSettings = PagedCallSettings.newBuilder(LIST_ENTITLEMENTS_PAGE_STR_FACT); + listTransferableSkusSettings = + PagedCallSettings.newBuilder(LIST_TRANSFERABLE_SKUS_PAGE_STR_FACT); + listTransferableOffersSettings = + PagedCallSettings.newBuilder(LIST_TRANSFERABLE_OFFERS_PAGE_STR_FACT); + getEntitlementSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createEntitlementSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createEntitlementOperationSettings = OperationCallSettings.newBuilder(); + changeParametersSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + changeParametersOperationSettings = OperationCallSettings.newBuilder(); + changeRenewalSettingsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + changeRenewalSettingsOperationSettings = OperationCallSettings.newBuilder(); + changeOfferSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + changeOfferOperationSettings = OperationCallSettings.newBuilder(); + startPaidServiceSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + startPaidServiceOperationSettings = OperationCallSettings.newBuilder(); + suspendEntitlementSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + suspendEntitlementOperationSettings = OperationCallSettings.newBuilder(); + cancelEntitlementSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + cancelEntitlementOperationSettings = OperationCallSettings.newBuilder(); + activateEntitlementSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + activateEntitlementOperationSettings = OperationCallSettings.newBuilder(); + transferEntitlementsSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + transferEntitlementsOperationSettings = OperationCallSettings.newBuilder(); + transferEntitlementsToGoogleSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + transferEntitlementsToGoogleOperationSettings = OperationCallSettings.newBuilder(); + listChannelPartnerLinksSettings = + PagedCallSettings.newBuilder(LIST_CHANNEL_PARTNER_LINKS_PAGE_STR_FACT); + getChannelPartnerLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + createChannelPartnerLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + updateChannelPartnerLinkSettings = UnaryCallSettings.newUnaryCallSettingsBuilder(); + listProductsSettings = PagedCallSettings.newBuilder(LIST_PRODUCTS_PAGE_STR_FACT); + listSkusSettings = PagedCallSettings.newBuilder(LIST_SKUS_PAGE_STR_FACT); + listOffersSettings = PagedCallSettings.newBuilder(LIST_OFFERS_PAGE_STR_FACT); + listPurchasableSkusSettings = + PagedCallSettings.newBuilder(LIST_PURCHASABLE_SKUS_PAGE_STR_FACT); + listPurchasableOffersSettings = + PagedCallSettings.newBuilder(LIST_PURCHASABLE_OFFERS_PAGE_STR_FACT); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listCustomersSettings, + getCustomerSettings, + checkCloudIdentityAccountsExistSettings, + createCustomerSettings, + updateCustomerSettings, + deleteCustomerSettings, + provisionCloudIdentitySettings, + listEntitlementsSettings, + listTransferableSkusSettings, + listTransferableOffersSettings, + getEntitlementSettings, + createEntitlementSettings, + changeParametersSettings, + changeRenewalSettingsSettings, + changeOfferSettings, + startPaidServiceSettings, + suspendEntitlementSettings, + cancelEntitlementSettings, + activateEntitlementSettings, + transferEntitlementsSettings, + transferEntitlementsToGoogleSettings, + listChannelPartnerLinksSettings, + getChannelPartnerLinkSettings, + createChannelPartnerLinkSettings, + updateChannelPartnerLinkSettings, + listProductsSettings, + listSkusSettings, + listOffersSettings, + listPurchasableSkusSettings, + listPurchasableOffersSettings); + initDefaults(this); + } + + protected Builder(CloudChannelServiceStubSettings settings) { + super(settings); + + listCustomersSettings = settings.listCustomersSettings.toBuilder(); + getCustomerSettings = settings.getCustomerSettings.toBuilder(); + checkCloudIdentityAccountsExistSettings = + settings.checkCloudIdentityAccountsExistSettings.toBuilder(); + createCustomerSettings = settings.createCustomerSettings.toBuilder(); + updateCustomerSettings = settings.updateCustomerSettings.toBuilder(); + deleteCustomerSettings = settings.deleteCustomerSettings.toBuilder(); + provisionCloudIdentitySettings = settings.provisionCloudIdentitySettings.toBuilder(); + provisionCloudIdentityOperationSettings = + settings.provisionCloudIdentityOperationSettings.toBuilder(); + listEntitlementsSettings = settings.listEntitlementsSettings.toBuilder(); + listTransferableSkusSettings = settings.listTransferableSkusSettings.toBuilder(); + listTransferableOffersSettings = settings.listTransferableOffersSettings.toBuilder(); + getEntitlementSettings = settings.getEntitlementSettings.toBuilder(); + createEntitlementSettings = settings.createEntitlementSettings.toBuilder(); + createEntitlementOperationSettings = settings.createEntitlementOperationSettings.toBuilder(); + changeParametersSettings = settings.changeParametersSettings.toBuilder(); + changeParametersOperationSettings = settings.changeParametersOperationSettings.toBuilder(); + changeRenewalSettingsSettings = settings.changeRenewalSettingsSettings.toBuilder(); + changeRenewalSettingsOperationSettings = + settings.changeRenewalSettingsOperationSettings.toBuilder(); + changeOfferSettings = settings.changeOfferSettings.toBuilder(); + changeOfferOperationSettings = settings.changeOfferOperationSettings.toBuilder(); + startPaidServiceSettings = settings.startPaidServiceSettings.toBuilder(); + startPaidServiceOperationSettings = settings.startPaidServiceOperationSettings.toBuilder(); + suspendEntitlementSettings = settings.suspendEntitlementSettings.toBuilder(); + suspendEntitlementOperationSettings = + settings.suspendEntitlementOperationSettings.toBuilder(); + cancelEntitlementSettings = settings.cancelEntitlementSettings.toBuilder(); + cancelEntitlementOperationSettings = settings.cancelEntitlementOperationSettings.toBuilder(); + activateEntitlementSettings = settings.activateEntitlementSettings.toBuilder(); + activateEntitlementOperationSettings = + settings.activateEntitlementOperationSettings.toBuilder(); + transferEntitlementsSettings = settings.transferEntitlementsSettings.toBuilder(); + transferEntitlementsOperationSettings = + settings.transferEntitlementsOperationSettings.toBuilder(); + transferEntitlementsToGoogleSettings = + settings.transferEntitlementsToGoogleSettings.toBuilder(); + transferEntitlementsToGoogleOperationSettings = + settings.transferEntitlementsToGoogleOperationSettings.toBuilder(); + listChannelPartnerLinksSettings = settings.listChannelPartnerLinksSettings.toBuilder(); + getChannelPartnerLinkSettings = settings.getChannelPartnerLinkSettings.toBuilder(); + createChannelPartnerLinkSettings = settings.createChannelPartnerLinkSettings.toBuilder(); + updateChannelPartnerLinkSettings = settings.updateChannelPartnerLinkSettings.toBuilder(); + listProductsSettings = settings.listProductsSettings.toBuilder(); + listSkusSettings = settings.listSkusSettings.toBuilder(); + listOffersSettings = settings.listOffersSettings.toBuilder(); + listPurchasableSkusSettings = settings.listPurchasableSkusSettings.toBuilder(); + listPurchasableOffersSettings = settings.listPurchasableOffersSettings.toBuilder(); + + unaryMethodSettingsBuilders = + ImmutableList.>of( + listCustomersSettings, + getCustomerSettings, + checkCloudIdentityAccountsExistSettings, + createCustomerSettings, + updateCustomerSettings, + deleteCustomerSettings, + provisionCloudIdentitySettings, + listEntitlementsSettings, + listTransferableSkusSettings, + listTransferableOffersSettings, + getEntitlementSettings, + createEntitlementSettings, + changeParametersSettings, + changeRenewalSettingsSettings, + changeOfferSettings, + startPaidServiceSettings, + suspendEntitlementSettings, + cancelEntitlementSettings, + activateEntitlementSettings, + transferEntitlementsSettings, + transferEntitlementsToGoogleSettings, + listChannelPartnerLinksSettings, + getChannelPartnerLinkSettings, + createChannelPartnerLinkSettings, + updateChannelPartnerLinkSettings, + listProductsSettings, + listSkusSettings, + listOffersSettings, + listPurchasableSkusSettings, + listPurchasableOffersSettings); + } + + 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 + .listCustomersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getCustomerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .checkCloudIdentityAccountsExistSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createCustomerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateCustomerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .deleteCustomerSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .provisionCloudIdentitySettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listEntitlementsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listTransferableSkusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listTransferableOffersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getEntitlementSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createEntitlementSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .changeParametersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .changeRenewalSettingsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .changeOfferSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .startPaidServiceSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .suspendEntitlementSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .cancelEntitlementSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .activateEntitlementSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .transferEntitlementsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .transferEntitlementsToGoogleSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")); + + builder + .listChannelPartnerLinksSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .getChannelPartnerLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .createChannelPartnerLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .updateChannelPartnerLinkSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listProductsSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listSkusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listOffersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listPurchasableSkusSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .listPurchasableOffersSettings() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("retry_policy_0_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("retry_policy_0_params")); + + builder + .provisionCloudIdentityOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Customer.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 + .createEntitlementOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Entitlement.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 + .changeParametersOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Entitlement.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 + .changeRenewalSettingsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Entitlement.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 + .changeOfferOperationSettings() + .setInitialCallSettings( + UnaryCallSettings.newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Entitlement.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 + .startPaidServiceOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Entitlement.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 + .suspendEntitlementOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Entitlement.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 + .cancelEntitlementOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_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 + .activateEntitlementOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Entitlement.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 + .transferEntitlementsOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + .newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create( + TransferEntitlementsResponse.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 + .transferEntitlementsToGoogleOperationSettings() + .setInitialCallSettings( + UnaryCallSettings + . + newUnaryCallSettingsBuilder() + .setRetryableCodes(RETRYABLE_CODE_DEFINITIONS.get("no_retry_1_codes")) + .setRetrySettings(RETRY_PARAM_DEFINITIONS.get("no_retry_1_params")) + .build()) + .setResponseTransformer( + ProtoOperationTransformers.ResponseTransformer.create(Empty.class)) + .setMetadataTransformer( + ProtoOperationTransformers.MetadataTransformer.create(OperationMetadata.class)) + .setPollingAlgorithm( + OperationTimedPollAlgorithm.create( + RetrySettings.newBuilder() + .setInitialRetryDelay(Duration.ofMillis(5000L)) + .setRetryDelayMultiplier(1.5) + .setMaxRetryDelay(Duration.ofMillis(45000L)) + .setInitialRpcTimeout(Duration.ZERO) + .setRpcTimeoutMultiplier(1.0) + .setMaxRpcTimeout(Duration.ZERO) + .setTotalTimeout(Duration.ofMillis(300000L)) + .build())); + + return builder; + } + + // NEXT_MAJOR_VER: remove 'throws Exception'. + /** + * Applies the given settings updater function to all of the unary API methods in this service. + * + *

Note: This method does not support applying settings to streaming methods. + */ + public Builder applyToAllUnaryMethods( + ApiFunction, Void> settingsUpdater) throws Exception { + super.applyToAllUnaryMethods(unaryMethodSettingsBuilders, settingsUpdater); + return this; + } + + public ImmutableList> unaryMethodSettingsBuilders() { + return unaryMethodSettingsBuilders; + } + + /** Returns the builder for the settings used for calls to listCustomers. */ + public PagedCallSettings.Builder< + ListCustomersRequest, ListCustomersResponse, ListCustomersPagedResponse> + listCustomersSettings() { + return listCustomersSettings; + } + + /** Returns the builder for the settings used for calls to getCustomer. */ + public UnaryCallSettings.Builder getCustomerSettings() { + return getCustomerSettings; + } + + /** Returns the builder for the settings used for calls to checkCloudIdentityAccountsExist. */ + public UnaryCallSettings.Builder< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistSettings() { + return checkCloudIdentityAccountsExistSettings; + } + + /** Returns the builder for the settings used for calls to createCustomer. */ + public UnaryCallSettings.Builder createCustomerSettings() { + return createCustomerSettings; + } + + /** Returns the builder for the settings used for calls to updateCustomer. */ + public UnaryCallSettings.Builder updateCustomerSettings() { + return updateCustomerSettings; + } + + /** Returns the builder for the settings used for calls to deleteCustomer. */ + public UnaryCallSettings.Builder deleteCustomerSettings() { + return deleteCustomerSettings; + } + + /** Returns the builder for the settings used for calls to provisionCloudIdentity. */ + public UnaryCallSettings.Builder + provisionCloudIdentitySettings() { + return provisionCloudIdentitySettings; + } + + /** Returns the builder for the settings used for calls to provisionCloudIdentity. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + provisionCloudIdentityOperationSettings() { + return provisionCloudIdentityOperationSettings; + } + + /** Returns the builder for the settings used for calls to listEntitlements. */ + public PagedCallSettings.Builder< + ListEntitlementsRequest, ListEntitlementsResponse, ListEntitlementsPagedResponse> + listEntitlementsSettings() { + return listEntitlementsSettings; + } + + /** Returns the builder for the settings used for calls to listTransferableSkus. */ + public PagedCallSettings.Builder< + ListTransferableSkusRequest, + ListTransferableSkusResponse, + ListTransferableSkusPagedResponse> + listTransferableSkusSettings() { + return listTransferableSkusSettings; + } + + /** Returns the builder for the settings used for calls to listTransferableOffers. */ + public PagedCallSettings.Builder< + ListTransferableOffersRequest, + ListTransferableOffersResponse, + ListTransferableOffersPagedResponse> + listTransferableOffersSettings() { + return listTransferableOffersSettings; + } + + /** Returns the builder for the settings used for calls to getEntitlement. */ + public UnaryCallSettings.Builder getEntitlementSettings() { + return getEntitlementSettings; + } + + /** Returns the builder for the settings used for calls to createEntitlement. */ + public UnaryCallSettings.Builder + createEntitlementSettings() { + return createEntitlementSettings; + } + + /** Returns the builder for the settings used for calls to createEntitlement. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + createEntitlementOperationSettings() { + return createEntitlementOperationSettings; + } + + /** Returns the builder for the settings used for calls to changeParameters. */ + public UnaryCallSettings.Builder + changeParametersSettings() { + return changeParametersSettings; + } + + /** Returns the builder for the settings used for calls to changeParameters. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + changeParametersOperationSettings() { + return changeParametersOperationSettings; + } + + /** Returns the builder for the settings used for calls to changeRenewalSettings. */ + public UnaryCallSettings.Builder + changeRenewalSettingsSettings() { + return changeRenewalSettingsSettings; + } + + /** Returns the builder for the settings used for calls to changeRenewalSettings. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + ChangeRenewalSettingsRequest, Entitlement, OperationMetadata> + changeRenewalSettingsOperationSettings() { + return changeRenewalSettingsOperationSettings; + } + + /** Returns the builder for the settings used for calls to changeOffer. */ + public UnaryCallSettings.Builder changeOfferSettings() { + return changeOfferSettings; + } + + /** Returns the builder for the settings used for calls to changeOffer. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + changeOfferOperationSettings() { + return changeOfferOperationSettings; + } + + /** Returns the builder for the settings used for calls to startPaidService. */ + public UnaryCallSettings.Builder + startPaidServiceSettings() { + return startPaidServiceSettings; + } + + /** Returns the builder for the settings used for calls to startPaidService. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + startPaidServiceOperationSettings() { + return startPaidServiceOperationSettings; + } + + /** Returns the builder for the settings used for calls to suspendEntitlement. */ + public UnaryCallSettings.Builder + suspendEntitlementSettings() { + return suspendEntitlementSettings; + } + + /** Returns the builder for the settings used for calls to suspendEntitlement. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + suspendEntitlementOperationSettings() { + return suspendEntitlementOperationSettings; + } + + /** Returns the builder for the settings used for calls to cancelEntitlement. */ + public UnaryCallSettings.Builder + cancelEntitlementSettings() { + return cancelEntitlementSettings; + } + + /** Returns the builder for the settings used for calls to cancelEntitlement. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + cancelEntitlementOperationSettings() { + return cancelEntitlementOperationSettings; + } + + /** Returns the builder for the settings used for calls to activateEntitlement. */ + public UnaryCallSettings.Builder + activateEntitlementSettings() { + return activateEntitlementSettings; + } + + /** Returns the builder for the settings used for calls to activateEntitlement. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder + activateEntitlementOperationSettings() { + return activateEntitlementOperationSettings; + } + + /** Returns the builder for the settings used for calls to transferEntitlements. */ + public UnaryCallSettings.Builder + transferEntitlementsSettings() { + return transferEntitlementsSettings; + } + + /** Returns the builder for the settings used for calls to transferEntitlements. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + TransferEntitlementsRequest, TransferEntitlementsResponse, OperationMetadata> + transferEntitlementsOperationSettings() { + return transferEntitlementsOperationSettings; + } + + /** Returns the builder for the settings used for calls to transferEntitlementsToGoogle. */ + public UnaryCallSettings.Builder + transferEntitlementsToGoogleSettings() { + return transferEntitlementsToGoogleSettings; + } + + /** Returns the builder for the settings used for calls to transferEntitlementsToGoogle. */ + @BetaApi( + "The surface for use by generated code is not stable yet and may change in the future.") + public OperationCallSettings.Builder< + TransferEntitlementsToGoogleRequest, Empty, OperationMetadata> + transferEntitlementsToGoogleOperationSettings() { + return transferEntitlementsToGoogleOperationSettings; + } + + /** Returns the builder for the settings used for calls to listChannelPartnerLinks. */ + public PagedCallSettings.Builder< + ListChannelPartnerLinksRequest, + ListChannelPartnerLinksResponse, + ListChannelPartnerLinksPagedResponse> + listChannelPartnerLinksSettings() { + return listChannelPartnerLinksSettings; + } + + /** Returns the builder for the settings used for calls to getChannelPartnerLink. */ + public UnaryCallSettings.Builder + getChannelPartnerLinkSettings() { + return getChannelPartnerLinkSettings; + } + + /** Returns the builder for the settings used for calls to createChannelPartnerLink. */ + public UnaryCallSettings.Builder + createChannelPartnerLinkSettings() { + return createChannelPartnerLinkSettings; + } + + /** Returns the builder for the settings used for calls to updateChannelPartnerLink. */ + public UnaryCallSettings.Builder + updateChannelPartnerLinkSettings() { + return updateChannelPartnerLinkSettings; + } + + /** Returns the builder for the settings used for calls to listProducts. */ + public PagedCallSettings.Builder< + ListProductsRequest, ListProductsResponse, ListProductsPagedResponse> + listProductsSettings() { + return listProductsSettings; + } + + /** Returns the builder for the settings used for calls to listSkus. */ + public PagedCallSettings.Builder + listSkusSettings() { + return listSkusSettings; + } + + /** Returns the builder for the settings used for calls to listOffers. */ + public PagedCallSettings.Builder + listOffersSettings() { + return listOffersSettings; + } + + /** Returns the builder for the settings used for calls to listPurchasableSkus. */ + public PagedCallSettings.Builder< + ListPurchasableSkusRequest, + ListPurchasableSkusResponse, + ListPurchasableSkusPagedResponse> + listPurchasableSkusSettings() { + return listPurchasableSkusSettings; + } + + /** Returns the builder for the settings used for calls to listPurchasableOffers. */ + public PagedCallSettings.Builder< + ListPurchasableOffersRequest, + ListPurchasableOffersResponse, + ListPurchasableOffersPagedResponse> + listPurchasableOffersSettings() { + return listPurchasableOffersSettings; + } + + @Override + public CloudChannelServiceStubSettings build() throws IOException { + return new CloudChannelServiceStubSettings(this); + } + } +} diff --git a/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/GrpcCloudChannelServiceCallableFactory.java b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/GrpcCloudChannelServiceCallableFactory.java new file mode 100644 index 00000000..74cdefdb --- /dev/null +++ b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/GrpcCloudChannelServiceCallableFactory.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.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 CloudChannelService service API. + * + *

This class is for advanced usage. + */ +@Generated("by gapic-generator-java") +public class GrpcCloudChannelServiceCallableFactory 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-channel/src/main/java/com/google/cloud/channel/v1/stub/GrpcCloudChannelServiceStub.java b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/GrpcCloudChannelServiceStub.java new file mode 100644 index 00000000..bfd30f62 --- /dev/null +++ b/google-cloud-channel/src/main/java/com/google/cloud/channel/v1/stub/GrpcCloudChannelServiceStub.java @@ -0,0 +1,1460 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1.stub; + +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListChannelPartnerLinksPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementsPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableSkusPagedResponse; + +import com.google.api.gax.core.BackgroundResource; +import com.google.api.gax.core.BackgroundResourceAggregation; +import com.google.api.gax.grpc.GrpcCallSettings; +import com.google.api.gax.grpc.GrpcStubCallableFactory; +import com.google.api.gax.rpc.ClientContext; +import com.google.api.gax.rpc.OperationCallable; +import com.google.api.gax.rpc.RequestParamsExtractor; +import com.google.api.gax.rpc.UnaryCallable; +import com.google.cloud.channel.v1.ActivateEntitlementRequest; +import com.google.cloud.channel.v1.CancelEntitlementRequest; +import com.google.cloud.channel.v1.ChangeOfferRequest; +import com.google.cloud.channel.v1.ChangeParametersRequest; +import com.google.cloud.channel.v1.ChangeRenewalSettingsRequest; +import com.google.cloud.channel.v1.ChannelPartnerLink; +import com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest; +import com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse; +import com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest; +import com.google.cloud.channel.v1.CreateCustomerRequest; +import com.google.cloud.channel.v1.CreateEntitlementRequest; +import com.google.cloud.channel.v1.Customer; +import com.google.cloud.channel.v1.DeleteCustomerRequest; +import com.google.cloud.channel.v1.Entitlement; +import com.google.cloud.channel.v1.GetChannelPartnerLinkRequest; +import com.google.cloud.channel.v1.GetCustomerRequest; +import com.google.cloud.channel.v1.GetEntitlementRequest; +import com.google.cloud.channel.v1.ListChannelPartnerLinksRequest; +import com.google.cloud.channel.v1.ListChannelPartnerLinksResponse; +import com.google.cloud.channel.v1.ListCustomersRequest; +import com.google.cloud.channel.v1.ListCustomersResponse; +import com.google.cloud.channel.v1.ListEntitlementsRequest; +import com.google.cloud.channel.v1.ListEntitlementsResponse; +import com.google.cloud.channel.v1.ListOffersRequest; +import com.google.cloud.channel.v1.ListOffersResponse; +import com.google.cloud.channel.v1.ListProductsRequest; +import com.google.cloud.channel.v1.ListProductsResponse; +import com.google.cloud.channel.v1.ListPurchasableOffersRequest; +import com.google.cloud.channel.v1.ListPurchasableOffersResponse; +import com.google.cloud.channel.v1.ListPurchasableSkusRequest; +import com.google.cloud.channel.v1.ListPurchasableSkusResponse; +import com.google.cloud.channel.v1.ListSkusRequest; +import com.google.cloud.channel.v1.ListSkusResponse; +import com.google.cloud.channel.v1.ListTransferableOffersRequest; +import com.google.cloud.channel.v1.ListTransferableOffersResponse; +import com.google.cloud.channel.v1.ListTransferableSkusRequest; +import com.google.cloud.channel.v1.ListTransferableSkusResponse; +import com.google.cloud.channel.v1.OperationMetadata; +import com.google.cloud.channel.v1.ProvisionCloudIdentityRequest; +import com.google.cloud.channel.v1.StartPaidServiceRequest; +import com.google.cloud.channel.v1.SuspendEntitlementRequest; +import com.google.cloud.channel.v1.TransferEntitlementsRequest; +import com.google.cloud.channel.v1.TransferEntitlementsResponse; +import com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest; +import com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest; +import com.google.cloud.channel.v1.UpdateCustomerRequest; +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 CloudChannelService service API. + * + *

This class is for advanced usage and reflects the underlying API directly. + */ +@Generated("by gapic-generator-java") +public class GrpcCloudChannelServiceStub extends CloudChannelServiceStub { + private static final MethodDescriptor + listCustomersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ListCustomers") + .setRequestMarshaller( + ProtoUtils.marshaller(ListCustomersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListCustomersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor getCustomerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/GetCustomer") + .setRequestMarshaller(ProtoUtils.marshaller(GetCustomerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Customer.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistMethodDescriptor = + MethodDescriptor + . + newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/CheckCloudIdentityAccountsExist") + .setRequestMarshaller( + ProtoUtils.marshaller( + CheckCloudIdentityAccountsExistRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller( + CheckCloudIdentityAccountsExistResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createCustomerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/CreateCustomer") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateCustomerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Customer.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateCustomerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/UpdateCustomer") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateCustomerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Customer.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + deleteCustomerMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/DeleteCustomer") + .setRequestMarshaller( + ProtoUtils.marshaller(DeleteCustomerRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Empty.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + provisionCloudIdentityMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/ProvisionCloudIdentity") + .setRequestMarshaller( + ProtoUtils.marshaller(ProvisionCloudIdentityRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listEntitlementsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ListEntitlements") + .setRequestMarshaller( + ProtoUtils.marshaller(ListEntitlementsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListEntitlementsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listTransferableSkusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ListTransferableSkus") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTransferableSkusRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTransferableSkusResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListTransferableOffersRequest, ListTransferableOffersResponse> + listTransferableOffersMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/ListTransferableOffers") + .setRequestMarshaller( + ProtoUtils.marshaller(ListTransferableOffersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListTransferableOffersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getEntitlementMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/GetEntitlement") + .setRequestMarshaller( + ProtoUtils.marshaller(GetEntitlementRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Entitlement.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createEntitlementMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/CreateEntitlement") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateEntitlementRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + changeParametersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ChangeParameters") + .setRequestMarshaller( + ProtoUtils.marshaller(ChangeParametersRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + changeRenewalSettingsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/ChangeRenewalSettings") + .setRequestMarshaller( + ProtoUtils.marshaller(ChangeRenewalSettingsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor changeOfferMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ChangeOffer") + .setRequestMarshaller(ProtoUtils.marshaller(ChangeOfferRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + startPaidServiceMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/StartPaidService") + .setRequestMarshaller( + ProtoUtils.marshaller(StartPaidServiceRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + suspendEntitlementMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/SuspendEntitlement") + .setRequestMarshaller( + ProtoUtils.marshaller(SuspendEntitlementRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + cancelEntitlementMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/CancelEntitlement") + .setRequestMarshaller( + ProtoUtils.marshaller(CancelEntitlementRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + activateEntitlementMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ActivateEntitlement") + .setRequestMarshaller( + ProtoUtils.marshaller(ActivateEntitlementRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + transferEntitlementsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/TransferEntitlements") + .setRequestMarshaller( + ProtoUtils.marshaller(TransferEntitlementsRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + transferEntitlementsToGoogleMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/TransferEntitlementsToGoogle") + .setRequestMarshaller( + ProtoUtils.marshaller(TransferEntitlementsToGoogleRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(Operation.getDefaultInstance())) + .build(); + + private static final MethodDescriptor< + ListChannelPartnerLinksRequest, ListChannelPartnerLinksResponse> + listChannelPartnerLinksMethodDescriptor = + MethodDescriptor + .newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/ListChannelPartnerLinks") + .setRequestMarshaller( + ProtoUtils.marshaller(ListChannelPartnerLinksRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListChannelPartnerLinksResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + getChannelPartnerLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/GetChannelPartnerLink") + .setRequestMarshaller( + ProtoUtils.marshaller(GetChannelPartnerLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ChannelPartnerLink.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + createChannelPartnerLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/CreateChannelPartnerLink") + .setRequestMarshaller( + ProtoUtils.marshaller(CreateChannelPartnerLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ChannelPartnerLink.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + updateChannelPartnerLinkMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/UpdateChannelPartnerLink") + .setRequestMarshaller( + ProtoUtils.marshaller(UpdateChannelPartnerLinkRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ChannelPartnerLink.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listProductsMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ListProducts") + .setRequestMarshaller(ProtoUtils.marshaller(ListProductsRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListProductsResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listSkusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ListSkus") + .setRequestMarshaller(ProtoUtils.marshaller(ListSkusRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListSkusResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listOffersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ListOffers") + .setRequestMarshaller(ProtoUtils.marshaller(ListOffersRequest.getDefaultInstance())) + .setResponseMarshaller(ProtoUtils.marshaller(ListOffersResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listPurchasableSkusMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName("google.cloud.channel.v1.CloudChannelService/ListPurchasableSkus") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPurchasableSkusRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPurchasableSkusResponse.getDefaultInstance())) + .build(); + + private static final MethodDescriptor + listPurchasableOffersMethodDescriptor = + MethodDescriptor.newBuilder() + .setType(MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + "google.cloud.channel.v1.CloudChannelService/ListPurchasableOffers") + .setRequestMarshaller( + ProtoUtils.marshaller(ListPurchasableOffersRequest.getDefaultInstance())) + .setResponseMarshaller( + ProtoUtils.marshaller(ListPurchasableOffersResponse.getDefaultInstance())) + .build(); + + private final UnaryCallable listCustomersCallable; + private final UnaryCallable + listCustomersPagedCallable; + private final UnaryCallable getCustomerCallable; + private final UnaryCallable< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistCallable; + private final UnaryCallable createCustomerCallable; + private final UnaryCallable updateCustomerCallable; + private final UnaryCallable deleteCustomerCallable; + private final UnaryCallable + provisionCloudIdentityCallable; + private final OperationCallable + provisionCloudIdentityOperationCallable; + private final UnaryCallable + listEntitlementsCallable; + private final UnaryCallable + listEntitlementsPagedCallable; + private final UnaryCallable + listTransferableSkusCallable; + private final UnaryCallable + listTransferableSkusPagedCallable; + private final UnaryCallable + listTransferableOffersCallable; + private final UnaryCallable + listTransferableOffersPagedCallable; + private final UnaryCallable getEntitlementCallable; + private final UnaryCallable createEntitlementCallable; + private final OperationCallable + createEntitlementOperationCallable; + private final UnaryCallable changeParametersCallable; + private final OperationCallable + changeParametersOperationCallable; + private final UnaryCallable + changeRenewalSettingsCallable; + private final OperationCallable + changeRenewalSettingsOperationCallable; + private final UnaryCallable changeOfferCallable; + private final OperationCallable + changeOfferOperationCallable; + private final UnaryCallable startPaidServiceCallable; + private final OperationCallable + startPaidServiceOperationCallable; + private final UnaryCallable suspendEntitlementCallable; + private final OperationCallable + suspendEntitlementOperationCallable; + private final UnaryCallable cancelEntitlementCallable; + private final OperationCallable + cancelEntitlementOperationCallable; + private final UnaryCallable activateEntitlementCallable; + private final OperationCallable + activateEntitlementOperationCallable; + private final UnaryCallable transferEntitlementsCallable; + private final OperationCallable< + TransferEntitlementsRequest, TransferEntitlementsResponse, OperationMetadata> + transferEntitlementsOperationCallable; + private final UnaryCallable + transferEntitlementsToGoogleCallable; + private final OperationCallable + transferEntitlementsToGoogleOperationCallable; + private final UnaryCallable + listChannelPartnerLinksCallable; + private final UnaryCallable + listChannelPartnerLinksPagedCallable; + private final UnaryCallable + getChannelPartnerLinkCallable; + private final UnaryCallable + createChannelPartnerLinkCallable; + private final UnaryCallable + updateChannelPartnerLinkCallable; + private final UnaryCallable listProductsCallable; + private final UnaryCallable + listProductsPagedCallable; + private final UnaryCallable listSkusCallable; + private final UnaryCallable listSkusPagedCallable; + private final UnaryCallable listOffersCallable; + private final UnaryCallable listOffersPagedCallable; + private final UnaryCallable + listPurchasableSkusCallable; + private final UnaryCallable + listPurchasableSkusPagedCallable; + private final UnaryCallable + listPurchasableOffersCallable; + private final UnaryCallable + listPurchasableOffersPagedCallable; + + private final BackgroundResource backgroundResources; + private final GrpcOperationsStub operationsStub; + private final GrpcStubCallableFactory callableFactory; + + public static final GrpcCloudChannelServiceStub create(CloudChannelServiceStubSettings settings) + throws IOException { + return new GrpcCloudChannelServiceStub(settings, ClientContext.create(settings)); + } + + public static final GrpcCloudChannelServiceStub create(ClientContext clientContext) + throws IOException { + return new GrpcCloudChannelServiceStub( + CloudChannelServiceStubSettings.newBuilder().build(), clientContext); + } + + public static final GrpcCloudChannelServiceStub create( + ClientContext clientContext, GrpcStubCallableFactory callableFactory) throws IOException { + return new GrpcCloudChannelServiceStub( + CloudChannelServiceStubSettings.newBuilder().build(), clientContext, callableFactory); + } + + /** + * Constructs an instance of GrpcCloudChannelServiceStub, 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 GrpcCloudChannelServiceStub( + CloudChannelServiceStubSettings settings, ClientContext clientContext) throws IOException { + this(settings, clientContext, new GrpcCloudChannelServiceCallableFactory()); + } + + /** + * Constructs an instance of GrpcCloudChannelServiceStub, 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 GrpcCloudChannelServiceStub( + CloudChannelServiceStubSettings settings, + ClientContext clientContext, + GrpcStubCallableFactory callableFactory) + throws IOException { + this.callableFactory = callableFactory; + this.operationsStub = GrpcOperationsStub.create(clientContext, callableFactory); + + GrpcCallSettings listCustomersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listCustomersMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListCustomersRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getCustomerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getCustomerMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetCustomerRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistTransportSettings = + GrpcCallSettings + . + newBuilder() + .setMethodDescriptor(checkCloudIdentityAccountsExistMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + CheckCloudIdentityAccountsExistRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createCustomerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createCustomerMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateCustomerRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings updateCustomerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateCustomerMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateCustomerRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("customer.name", String.valueOf(request.getCustomer().getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings deleteCustomerTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(deleteCustomerMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(DeleteCustomerRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + provisionCloudIdentityTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(provisionCloudIdentityMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ProvisionCloudIdentityRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("customer", String.valueOf(request.getCustomer())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listEntitlementsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listEntitlementsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListEntitlementsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listTransferableSkusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listTransferableSkusMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTransferableSkusRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listTransferableOffersTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listTransferableOffersMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListTransferableOffersRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings getEntitlementTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getEntitlementMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetEntitlementRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings createEntitlementTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createEntitlementMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateEntitlementRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings changeParametersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(changeParametersMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ChangeParametersRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + changeRenewalSettingsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(changeRenewalSettingsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ChangeRenewalSettingsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings changeOfferTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(changeOfferMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ChangeOfferRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings startPaidServiceTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(startPaidServiceMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(StartPaidServiceRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings suspendEntitlementTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(suspendEntitlementMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(SuspendEntitlementRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings cancelEntitlementTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(cancelEntitlementMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CancelEntitlementRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings activateEntitlementTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(activateEntitlementMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ActivateEntitlementRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings transferEntitlementsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(transferEntitlementsMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(TransferEntitlementsRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + transferEntitlementsToGoogleTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(transferEntitlementsToGoogleMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract( + TransferEntitlementsToGoogleRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listChannelPartnerLinksTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listChannelPartnerLinksMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListChannelPartnerLinksRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + getChannelPartnerLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(getChannelPartnerLinkMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(GetChannelPartnerLinkRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + createChannelPartnerLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(createChannelPartnerLinkMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(CreateChannelPartnerLinkRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + updateChannelPartnerLinkTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(updateChannelPartnerLinkMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(UpdateChannelPartnerLinkRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("name", String.valueOf(request.getName())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listProductsTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listProductsMethodDescriptor) + .build(); + GrpcCallSettings listSkusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listSkusMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListSkusRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings listOffersTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listOffersMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListOffersRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("parent", String.valueOf(request.getParent())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listPurchasableSkusTransportSettings = + GrpcCallSettings.newBuilder() + .setMethodDescriptor(listPurchasableSkusMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListPurchasableSkusRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("customer", String.valueOf(request.getCustomer())); + return params.build(); + } + }) + .build(); + GrpcCallSettings + listPurchasableOffersTransportSettings = + GrpcCallSettings + .newBuilder() + .setMethodDescriptor(listPurchasableOffersMethodDescriptor) + .setParamsExtractor( + new RequestParamsExtractor() { + @Override + public Map extract(ListPurchasableOffersRequest request) { + ImmutableMap.Builder params = ImmutableMap.builder(); + params.put("customer", String.valueOf(request.getCustomer())); + return params.build(); + } + }) + .build(); + + this.listCustomersCallable = + callableFactory.createUnaryCallable( + listCustomersTransportSettings, settings.listCustomersSettings(), clientContext); + this.listCustomersPagedCallable = + callableFactory.createPagedCallable( + listCustomersTransportSettings, settings.listCustomersSettings(), clientContext); + this.getCustomerCallable = + callableFactory.createUnaryCallable( + getCustomerTransportSettings, settings.getCustomerSettings(), clientContext); + this.checkCloudIdentityAccountsExistCallable = + callableFactory.createUnaryCallable( + checkCloudIdentityAccountsExistTransportSettings, + settings.checkCloudIdentityAccountsExistSettings(), + clientContext); + this.createCustomerCallable = + callableFactory.createUnaryCallable( + createCustomerTransportSettings, settings.createCustomerSettings(), clientContext); + this.updateCustomerCallable = + callableFactory.createUnaryCallable( + updateCustomerTransportSettings, settings.updateCustomerSettings(), clientContext); + this.deleteCustomerCallable = + callableFactory.createUnaryCallable( + deleteCustomerTransportSettings, settings.deleteCustomerSettings(), clientContext); + this.provisionCloudIdentityCallable = + callableFactory.createUnaryCallable( + provisionCloudIdentityTransportSettings, + settings.provisionCloudIdentitySettings(), + clientContext); + this.provisionCloudIdentityOperationCallable = + callableFactory.createOperationCallable( + provisionCloudIdentityTransportSettings, + settings.provisionCloudIdentityOperationSettings(), + clientContext, + operationsStub); + this.listEntitlementsCallable = + callableFactory.createUnaryCallable( + listEntitlementsTransportSettings, settings.listEntitlementsSettings(), clientContext); + this.listEntitlementsPagedCallable = + callableFactory.createPagedCallable( + listEntitlementsTransportSettings, settings.listEntitlementsSettings(), clientContext); + this.listTransferableSkusCallable = + callableFactory.createUnaryCallable( + listTransferableSkusTransportSettings, + settings.listTransferableSkusSettings(), + clientContext); + this.listTransferableSkusPagedCallable = + callableFactory.createPagedCallable( + listTransferableSkusTransportSettings, + settings.listTransferableSkusSettings(), + clientContext); + this.listTransferableOffersCallable = + callableFactory.createUnaryCallable( + listTransferableOffersTransportSettings, + settings.listTransferableOffersSettings(), + clientContext); + this.listTransferableOffersPagedCallable = + callableFactory.createPagedCallable( + listTransferableOffersTransportSettings, + settings.listTransferableOffersSettings(), + clientContext); + this.getEntitlementCallable = + callableFactory.createUnaryCallable( + getEntitlementTransportSettings, settings.getEntitlementSettings(), clientContext); + this.createEntitlementCallable = + callableFactory.createUnaryCallable( + createEntitlementTransportSettings, + settings.createEntitlementSettings(), + clientContext); + this.createEntitlementOperationCallable = + callableFactory.createOperationCallable( + createEntitlementTransportSettings, + settings.createEntitlementOperationSettings(), + clientContext, + operationsStub); + this.changeParametersCallable = + callableFactory.createUnaryCallable( + changeParametersTransportSettings, settings.changeParametersSettings(), clientContext); + this.changeParametersOperationCallable = + callableFactory.createOperationCallable( + changeParametersTransportSettings, + settings.changeParametersOperationSettings(), + clientContext, + operationsStub); + this.changeRenewalSettingsCallable = + callableFactory.createUnaryCallable( + changeRenewalSettingsTransportSettings, + settings.changeRenewalSettingsSettings(), + clientContext); + this.changeRenewalSettingsOperationCallable = + callableFactory.createOperationCallable( + changeRenewalSettingsTransportSettings, + settings.changeRenewalSettingsOperationSettings(), + clientContext, + operationsStub); + this.changeOfferCallable = + callableFactory.createUnaryCallable( + changeOfferTransportSettings, settings.changeOfferSettings(), clientContext); + this.changeOfferOperationCallable = + callableFactory.createOperationCallable( + changeOfferTransportSettings, + settings.changeOfferOperationSettings(), + clientContext, + operationsStub); + this.startPaidServiceCallable = + callableFactory.createUnaryCallable( + startPaidServiceTransportSettings, settings.startPaidServiceSettings(), clientContext); + this.startPaidServiceOperationCallable = + callableFactory.createOperationCallable( + startPaidServiceTransportSettings, + settings.startPaidServiceOperationSettings(), + clientContext, + operationsStub); + this.suspendEntitlementCallable = + callableFactory.createUnaryCallable( + suspendEntitlementTransportSettings, + settings.suspendEntitlementSettings(), + clientContext); + this.suspendEntitlementOperationCallable = + callableFactory.createOperationCallable( + suspendEntitlementTransportSettings, + settings.suspendEntitlementOperationSettings(), + clientContext, + operationsStub); + this.cancelEntitlementCallable = + callableFactory.createUnaryCallable( + cancelEntitlementTransportSettings, + settings.cancelEntitlementSettings(), + clientContext); + this.cancelEntitlementOperationCallable = + callableFactory.createOperationCallable( + cancelEntitlementTransportSettings, + settings.cancelEntitlementOperationSettings(), + clientContext, + operationsStub); + this.activateEntitlementCallable = + callableFactory.createUnaryCallable( + activateEntitlementTransportSettings, + settings.activateEntitlementSettings(), + clientContext); + this.activateEntitlementOperationCallable = + callableFactory.createOperationCallable( + activateEntitlementTransportSettings, + settings.activateEntitlementOperationSettings(), + clientContext, + operationsStub); + this.transferEntitlementsCallable = + callableFactory.createUnaryCallable( + transferEntitlementsTransportSettings, + settings.transferEntitlementsSettings(), + clientContext); + this.transferEntitlementsOperationCallable = + callableFactory.createOperationCallable( + transferEntitlementsTransportSettings, + settings.transferEntitlementsOperationSettings(), + clientContext, + operationsStub); + this.transferEntitlementsToGoogleCallable = + callableFactory.createUnaryCallable( + transferEntitlementsToGoogleTransportSettings, + settings.transferEntitlementsToGoogleSettings(), + clientContext); + this.transferEntitlementsToGoogleOperationCallable = + callableFactory.createOperationCallable( + transferEntitlementsToGoogleTransportSettings, + settings.transferEntitlementsToGoogleOperationSettings(), + clientContext, + operationsStub); + this.listChannelPartnerLinksCallable = + callableFactory.createUnaryCallable( + listChannelPartnerLinksTransportSettings, + settings.listChannelPartnerLinksSettings(), + clientContext); + this.listChannelPartnerLinksPagedCallable = + callableFactory.createPagedCallable( + listChannelPartnerLinksTransportSettings, + settings.listChannelPartnerLinksSettings(), + clientContext); + this.getChannelPartnerLinkCallable = + callableFactory.createUnaryCallable( + getChannelPartnerLinkTransportSettings, + settings.getChannelPartnerLinkSettings(), + clientContext); + this.createChannelPartnerLinkCallable = + callableFactory.createUnaryCallable( + createChannelPartnerLinkTransportSettings, + settings.createChannelPartnerLinkSettings(), + clientContext); + this.updateChannelPartnerLinkCallable = + callableFactory.createUnaryCallable( + updateChannelPartnerLinkTransportSettings, + settings.updateChannelPartnerLinkSettings(), + clientContext); + this.listProductsCallable = + callableFactory.createUnaryCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.listProductsPagedCallable = + callableFactory.createPagedCallable( + listProductsTransportSettings, settings.listProductsSettings(), clientContext); + this.listSkusCallable = + callableFactory.createUnaryCallable( + listSkusTransportSettings, settings.listSkusSettings(), clientContext); + this.listSkusPagedCallable = + callableFactory.createPagedCallable( + listSkusTransportSettings, settings.listSkusSettings(), clientContext); + this.listOffersCallable = + callableFactory.createUnaryCallable( + listOffersTransportSettings, settings.listOffersSettings(), clientContext); + this.listOffersPagedCallable = + callableFactory.createPagedCallable( + listOffersTransportSettings, settings.listOffersSettings(), clientContext); + this.listPurchasableSkusCallable = + callableFactory.createUnaryCallable( + listPurchasableSkusTransportSettings, + settings.listPurchasableSkusSettings(), + clientContext); + this.listPurchasableSkusPagedCallable = + callableFactory.createPagedCallable( + listPurchasableSkusTransportSettings, + settings.listPurchasableSkusSettings(), + clientContext); + this.listPurchasableOffersCallable = + callableFactory.createUnaryCallable( + listPurchasableOffersTransportSettings, + settings.listPurchasableOffersSettings(), + clientContext); + this.listPurchasableOffersPagedCallable = + callableFactory.createPagedCallable( + listPurchasableOffersTransportSettings, + settings.listPurchasableOffersSettings(), + clientContext); + + this.backgroundResources = + new BackgroundResourceAggregation(clientContext.getBackgroundResources()); + } + + public GrpcOperationsStub getOperationsStub() { + return operationsStub; + } + + public UnaryCallable listCustomersCallable() { + return listCustomersCallable; + } + + public UnaryCallable + listCustomersPagedCallable() { + return listCustomersPagedCallable; + } + + public UnaryCallable getCustomerCallable() { + return getCustomerCallable; + } + + public UnaryCallable< + CheckCloudIdentityAccountsExistRequest, CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExistCallable() { + return checkCloudIdentityAccountsExistCallable; + } + + public UnaryCallable createCustomerCallable() { + return createCustomerCallable; + } + + public UnaryCallable updateCustomerCallable() { + return updateCustomerCallable; + } + + public UnaryCallable deleteCustomerCallable() { + return deleteCustomerCallable; + } + + public UnaryCallable provisionCloudIdentityCallable() { + return provisionCloudIdentityCallable; + } + + public OperationCallable + provisionCloudIdentityOperationCallable() { + return provisionCloudIdentityOperationCallable; + } + + public UnaryCallable + listEntitlementsCallable() { + return listEntitlementsCallable; + } + + public UnaryCallable + listEntitlementsPagedCallable() { + return listEntitlementsPagedCallable; + } + + public UnaryCallable + listTransferableSkusCallable() { + return listTransferableSkusCallable; + } + + public UnaryCallable + listTransferableSkusPagedCallable() { + return listTransferableSkusPagedCallable; + } + + public UnaryCallable + listTransferableOffersCallable() { + return listTransferableOffersCallable; + } + + public UnaryCallable + listTransferableOffersPagedCallable() { + return listTransferableOffersPagedCallable; + } + + public UnaryCallable getEntitlementCallable() { + return getEntitlementCallable; + } + + public UnaryCallable createEntitlementCallable() { + return createEntitlementCallable; + } + + public OperationCallable + createEntitlementOperationCallable() { + return createEntitlementOperationCallable; + } + + public UnaryCallable changeParametersCallable() { + return changeParametersCallable; + } + + public OperationCallable + changeParametersOperationCallable() { + return changeParametersOperationCallable; + } + + public UnaryCallable changeRenewalSettingsCallable() { + return changeRenewalSettingsCallable; + } + + public OperationCallable + changeRenewalSettingsOperationCallable() { + return changeRenewalSettingsOperationCallable; + } + + public UnaryCallable changeOfferCallable() { + return changeOfferCallable; + } + + public OperationCallable + changeOfferOperationCallable() { + return changeOfferOperationCallable; + } + + public UnaryCallable startPaidServiceCallable() { + return startPaidServiceCallable; + } + + public OperationCallable + startPaidServiceOperationCallable() { + return startPaidServiceOperationCallable; + } + + public UnaryCallable suspendEntitlementCallable() { + return suspendEntitlementCallable; + } + + public OperationCallable + suspendEntitlementOperationCallable() { + return suspendEntitlementOperationCallable; + } + + public UnaryCallable cancelEntitlementCallable() { + return cancelEntitlementCallable; + } + + public OperationCallable + cancelEntitlementOperationCallable() { + return cancelEntitlementOperationCallable; + } + + public UnaryCallable activateEntitlementCallable() { + return activateEntitlementCallable; + } + + public OperationCallable + activateEntitlementOperationCallable() { + return activateEntitlementOperationCallable; + } + + public UnaryCallable transferEntitlementsCallable() { + return transferEntitlementsCallable; + } + + public OperationCallable< + TransferEntitlementsRequest, TransferEntitlementsResponse, OperationMetadata> + transferEntitlementsOperationCallable() { + return transferEntitlementsOperationCallable; + } + + public UnaryCallable + transferEntitlementsToGoogleCallable() { + return transferEntitlementsToGoogleCallable; + } + + public OperationCallable + transferEntitlementsToGoogleOperationCallable() { + return transferEntitlementsToGoogleOperationCallable; + } + + public UnaryCallable + listChannelPartnerLinksCallable() { + return listChannelPartnerLinksCallable; + } + + public UnaryCallable + listChannelPartnerLinksPagedCallable() { + return listChannelPartnerLinksPagedCallable; + } + + public UnaryCallable + getChannelPartnerLinkCallable() { + return getChannelPartnerLinkCallable; + } + + public UnaryCallable + createChannelPartnerLinkCallable() { + return createChannelPartnerLinkCallable; + } + + public UnaryCallable + updateChannelPartnerLinkCallable() { + return updateChannelPartnerLinkCallable; + } + + public UnaryCallable listProductsCallable() { + return listProductsCallable; + } + + public UnaryCallable listProductsPagedCallable() { + return listProductsPagedCallable; + } + + public UnaryCallable listSkusCallable() { + return listSkusCallable; + } + + public UnaryCallable listSkusPagedCallable() { + return listSkusPagedCallable; + } + + public UnaryCallable listOffersCallable() { + return listOffersCallable; + } + + public UnaryCallable listOffersPagedCallable() { + return listOffersPagedCallable; + } + + public UnaryCallable + listPurchasableSkusCallable() { + return listPurchasableSkusCallable; + } + + public UnaryCallable + listPurchasableSkusPagedCallable() { + return listPurchasableSkusPagedCallable; + } + + public UnaryCallable + listPurchasableOffersCallable() { + return listPurchasableOffersCallable; + } + + public UnaryCallable + listPurchasableOffersPagedCallable() { + return listPurchasableOffersPagedCallable; + } + + @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-channel/src/test/java/com/google/cloud/channel/v1/CloudChannelServiceClientTest.java b/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/CloudChannelServiceClientTest.java new file mode 100644 index 00000000..c5e60fa7 --- /dev/null +++ b/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/CloudChannelServiceClientTest.java @@ -0,0 +1,1972 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1; + +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListChannelPartnerLinksPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListCustomersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListEntitlementsPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListProductsPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListPurchasableSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListSkusPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableOffersPagedResponse; +import static com.google.cloud.channel.v1.CloudChannelServiceClient.ListTransferableSkusPagedResponse; + +import com.google.api.gax.core.NoCredentialsProvider; +import com.google.api.gax.grpc.GaxGrpcProperties; +import com.google.api.gax.grpc.testing.LocalChannelProvider; +import com.google.api.gax.grpc.testing.MockGrpcService; +import com.google.api.gax.grpc.testing.MockServiceHelper; +import com.google.api.gax.rpc.ApiClientHeaderProvider; +import com.google.api.gax.rpc.InvalidArgumentException; +import com.google.api.gax.rpc.StatusCode; +import com.google.common.collect.Lists; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Any; +import com.google.protobuf.Empty; +import com.google.protobuf.FieldMask; +import com.google.protobuf.Timestamp; +import com.google.type.PostalAddress; +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 CloudChannelServiceClientTest { + private static MockServiceHelper mockServiceHelper; + private static MockCloudChannelService mockCloudChannelService; + private CloudChannelServiceClient client; + private LocalChannelProvider channelProvider; + + @BeforeClass + public static void startStaticServer() { + mockCloudChannelService = new MockCloudChannelService(); + mockServiceHelper = + new MockServiceHelper( + UUID.randomUUID().toString(), Arrays.asList(mockCloudChannelService)); + mockServiceHelper.start(); + } + + @AfterClass + public static void stopServer() { + mockServiceHelper.stop(); + } + + @Before + public void setUp() throws IOException { + mockServiceHelper.reset(); + channelProvider = mockServiceHelper.createChannelProvider(); + CloudChannelServiceSettings settings = + CloudChannelServiceSettings.newBuilder() + .setTransportChannelProvider(channelProvider) + .setCredentialsProvider(NoCredentialsProvider.create()) + .build(); + client = CloudChannelServiceClient.create(settings); + } + + @After + public void tearDown() throws Exception { + client.close(); + } + + @Test + public void listCustomersTest() throws Exception { + Customer responsesElement = Customer.newBuilder().build(); + ListCustomersResponse expectedResponse = + ListCustomersResponse.newBuilder() + .setNextPageToken("") + .addAllCustomers(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + ListCustomersRequest request = + ListCustomersRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListCustomersPagedResponse pagedListResponse = client.listCustomers(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getCustomersList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListCustomersRequest actualRequest = ((ListCustomersRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listCustomersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ListCustomersRequest request = + ListCustomersRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listCustomers(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomerTest() throws Exception { + Customer expectedResponse = + Customer.newBuilder() + .setName(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setOrgDisplayName("orgDisplayName127031529") + .setOrgPostalAddress(PostalAddress.newBuilder().build()) + .setPrimaryContactInfo(ContactInfo.newBuilder().build()) + .setAlternateEmail("alternateEmail-232564926") + .setDomain("domain-1326197564") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCloudIdentityId("cloudIdentityId941784718") + .setLanguageCode("languageCode-2092349083") + .setCloudIdentityInfo(CloudIdentityInfo.newBuilder().build()) + .setChannelPartnerId("channelPartnerId-170366400") + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + CustomerName name = CustomerName.of("[ACCOUNT]", "[CUSTOMER]"); + + Customer actualResponse = client.getCustomer(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCustomerRequest actualRequest = ((GetCustomerRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCustomerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + CustomerName name = CustomerName.of("[ACCOUNT]", "[CUSTOMER]"); + client.getCustomer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getCustomerTest2() throws Exception { + Customer expectedResponse = + Customer.newBuilder() + .setName(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setOrgDisplayName("orgDisplayName127031529") + .setOrgPostalAddress(PostalAddress.newBuilder().build()) + .setPrimaryContactInfo(ContactInfo.newBuilder().build()) + .setAlternateEmail("alternateEmail-232564926") + .setDomain("domain-1326197564") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCloudIdentityId("cloudIdentityId941784718") + .setLanguageCode("languageCode-2092349083") + .setCloudIdentityInfo(CloudIdentityInfo.newBuilder().build()) + .setChannelPartnerId("channelPartnerId-170366400") + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + String name = "name3373707"; + + Customer actualResponse = client.getCustomer(name); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetCustomerRequest actualRequest = ((GetCustomerRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getCustomerExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + String name = "name3373707"; + client.getCustomer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void checkCloudIdentityAccountsExistTest() throws Exception { + CheckCloudIdentityAccountsExistResponse expectedResponse = + CheckCloudIdentityAccountsExistResponse.newBuilder() + .addAllCloudIdentityAccounts(new ArrayList()) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + CheckCloudIdentityAccountsExistRequest request = + CheckCloudIdentityAccountsExistRequest.newBuilder() + .setParent("parent-995424086") + .setDomain("domain-1326197564") + .build(); + + CheckCloudIdentityAccountsExistResponse actualResponse = + client.checkCloudIdentityAccountsExist(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CheckCloudIdentityAccountsExistRequest actualRequest = + ((CheckCloudIdentityAccountsExistRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getDomain(), actualRequest.getDomain()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void checkCloudIdentityAccountsExistExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + CheckCloudIdentityAccountsExistRequest request = + CheckCloudIdentityAccountsExistRequest.newBuilder() + .setParent("parent-995424086") + .setDomain("domain-1326197564") + .build(); + client.checkCloudIdentityAccountsExist(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createCustomerTest() throws Exception { + Customer expectedResponse = + Customer.newBuilder() + .setName(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setOrgDisplayName("orgDisplayName127031529") + .setOrgPostalAddress(PostalAddress.newBuilder().build()) + .setPrimaryContactInfo(ContactInfo.newBuilder().build()) + .setAlternateEmail("alternateEmail-232564926") + .setDomain("domain-1326197564") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCloudIdentityId("cloudIdentityId941784718") + .setLanguageCode("languageCode-2092349083") + .setCloudIdentityInfo(CloudIdentityInfo.newBuilder().build()) + .setChannelPartnerId("channelPartnerId-170366400") + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + CreateCustomerRequest request = + CreateCustomerRequest.newBuilder() + .setParent("parent-995424086") + .setCustomer(Customer.newBuilder().build()) + .build(); + + Customer actualResponse = client.createCustomer(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateCustomerRequest actualRequest = ((CreateCustomerRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getCustomer(), actualRequest.getCustomer()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createCustomerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + CreateCustomerRequest request = + CreateCustomerRequest.newBuilder() + .setParent("parent-995424086") + .setCustomer(Customer.newBuilder().build()) + .build(); + client.createCustomer(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateCustomerTest() throws Exception { + Customer expectedResponse = + Customer.newBuilder() + .setName(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setOrgDisplayName("orgDisplayName127031529") + .setOrgPostalAddress(PostalAddress.newBuilder().build()) + .setPrimaryContactInfo(ContactInfo.newBuilder().build()) + .setAlternateEmail("alternateEmail-232564926") + .setDomain("domain-1326197564") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCloudIdentityId("cloudIdentityId941784718") + .setLanguageCode("languageCode-2092349083") + .setCloudIdentityInfo(CloudIdentityInfo.newBuilder().build()) + .setChannelPartnerId("channelPartnerId-170366400") + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + UpdateCustomerRequest request = + UpdateCustomerRequest.newBuilder() + .setCustomer(Customer.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + Customer actualResponse = client.updateCustomer(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateCustomerRequest actualRequest = ((UpdateCustomerRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getCustomer(), actualRequest.getCustomer()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateCustomerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + UpdateCustomerRequest request = + UpdateCustomerRequest.newBuilder() + .setCustomer(Customer.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.updateCustomer(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteCustomerTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockCloudChannelService.addResponse(expectedResponse); + + CustomerName name = CustomerName.of("[ACCOUNT]", "[CUSTOMER]"); + + client.deleteCustomer(name); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCustomerRequest actualRequest = ((DeleteCustomerRequest) actualRequests.get(0)); + + Assert.assertEquals(name.toString(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCustomerExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + CustomerName name = CustomerName.of("[ACCOUNT]", "[CUSTOMER]"); + client.deleteCustomer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void deleteCustomerTest2() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + mockCloudChannelService.addResponse(expectedResponse); + + String name = "name3373707"; + + client.deleteCustomer(name); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + DeleteCustomerRequest actualRequest = ((DeleteCustomerRequest) actualRequests.get(0)); + + Assert.assertEquals(name, actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void deleteCustomerExceptionTest2() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + String name = "name3373707"; + client.deleteCustomer(name); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void provisionCloudIdentityTest() throws Exception { + Customer expectedResponse = + Customer.newBuilder() + .setName(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setOrgDisplayName("orgDisplayName127031529") + .setOrgPostalAddress(PostalAddress.newBuilder().build()) + .setPrimaryContactInfo(ContactInfo.newBuilder().build()) + .setAlternateEmail("alternateEmail-232564926") + .setDomain("domain-1326197564") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setCloudIdentityId("cloudIdentityId941784718") + .setLanguageCode("languageCode-2092349083") + .setCloudIdentityInfo(CloudIdentityInfo.newBuilder().build()) + .setChannelPartnerId("channelPartnerId-170366400") + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("provisionCloudIdentityTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudChannelService.addResponse(resultOperation); + + ProvisionCloudIdentityRequest request = + ProvisionCloudIdentityRequest.newBuilder() + .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setCloudIdentityInfo(CloudIdentityInfo.newBuilder().build()) + .setUser(AdminUser.newBuilder().build()) + .setValidateOnly(true) + .build(); + + Customer actualResponse = client.provisionCloudIdentityAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ProvisionCloudIdentityRequest actualRequest = + ((ProvisionCloudIdentityRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getCustomer(), actualRequest.getCustomer()); + Assert.assertEquals(request.getCloudIdentityInfo(), actualRequest.getCloudIdentityInfo()); + Assert.assertEquals(request.getUser(), actualRequest.getUser()); + Assert.assertEquals(request.getValidateOnly(), actualRequest.getValidateOnly()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void provisionCloudIdentityExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ProvisionCloudIdentityRequest request = + ProvisionCloudIdentityRequest.newBuilder() + .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setCloudIdentityInfo(CloudIdentityInfo.newBuilder().build()) + .setUser(AdminUser.newBuilder().build()) + .setValidateOnly(true) + .build(); + client.provisionCloudIdentityAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listEntitlementsTest() throws Exception { + Entitlement responsesElement = Entitlement.newBuilder().build(); + ListEntitlementsResponse expectedResponse = + ListEntitlementsResponse.newBuilder() + .setNextPageToken("") + .addAllEntitlements(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + ListEntitlementsRequest request = + ListEntitlementsRequest.newBuilder() + .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListEntitlementsPagedResponse pagedListResponse = client.listEntitlements(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getEntitlementsList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListEntitlementsRequest actualRequest = ((ListEntitlementsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listEntitlementsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ListEntitlementsRequest request = + ListEntitlementsRequest.newBuilder() + .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listEntitlements(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTransferableSkusTest() throws Exception { + TransferableSku responsesElement = TransferableSku.newBuilder().build(); + ListTransferableSkusResponse expectedResponse = + ListTransferableSkusResponse.newBuilder() + .setNextPageToken("") + .addAllTransferableSkus(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + ListTransferableSkusRequest request = + ListTransferableSkusRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setAuthToken("authToken1450587441") + .setLanguageCode("languageCode-2092349083") + .build(); + + ListTransferableSkusPagedResponse pagedListResponse = client.listTransferableSkus(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransferableSkusList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTransferableSkusRequest actualRequest = + ((ListTransferableSkusRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getCloudIdentityId(), actualRequest.getCloudIdentityId()); + Assert.assertEquals(request.getCustomerName(), actualRequest.getCustomerName()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getAuthToken(), actualRequest.getAuthToken()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTransferableSkusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ListTransferableSkusRequest request = + ListTransferableSkusRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setAuthToken("authToken1450587441") + .setLanguageCode("languageCode-2092349083") + .build(); + client.listTransferableSkus(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listTransferableOffersTest() throws Exception { + TransferableOffer responsesElement = TransferableOffer.newBuilder().build(); + ListTransferableOffersResponse expectedResponse = + ListTransferableOffersResponse.newBuilder() + .setNextPageToken("") + .addAllTransferableOffers(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + ListTransferableOffersRequest request = + ListTransferableOffersRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setSku("sku113949") + .setLanguageCode("languageCode-2092349083") + .build(); + + ListTransferableOffersPagedResponse pagedListResponse = client.listTransferableOffers(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getTransferableOffersList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListTransferableOffersRequest actualRequest = + ((ListTransferableOffersRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getCloudIdentityId(), actualRequest.getCloudIdentityId()); + Assert.assertEquals(request.getCustomerName(), actualRequest.getCustomerName()); + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getSku(), actualRequest.getSku()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listTransferableOffersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ListTransferableOffersRequest request = + ListTransferableOffersRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setSku("sku113949") + .setLanguageCode("languageCode-2092349083") + .build(); + client.listTransferableOffers(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getEntitlementTest() throws Exception { + Entitlement expectedResponse = + Entitlement.newBuilder() + .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString()) + .setCommitmentSettings(CommitmentSettings.newBuilder().build()) + .setProvisionedService(ProvisionedService.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setPurchaseOrderId("purchaseOrderId2029917384") + .setTrialSettings(TrialSettings.newBuilder().build()) + .setAssociationInfo(AssociationInfo.newBuilder().build()) + .addAllParameters(new ArrayList()) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + GetEntitlementRequest request = + GetEntitlementRequest.newBuilder() + .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString()) + .build(); + + Entitlement actualResponse = client.getEntitlement(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetEntitlementRequest actualRequest = ((GetEntitlementRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getEntitlementExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + GetEntitlementRequest request = + GetEntitlementRequest.newBuilder() + .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString()) + .build(); + client.getEntitlement(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createEntitlementTest() throws Exception { + Entitlement expectedResponse = + Entitlement.newBuilder() + .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString()) + .setCommitmentSettings(CommitmentSettings.newBuilder().build()) + .setProvisionedService(ProvisionedService.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setPurchaseOrderId("purchaseOrderId2029917384") + .setTrialSettings(TrialSettings.newBuilder().build()) + .setAssociationInfo(AssociationInfo.newBuilder().build()) + .addAllParameters(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("createEntitlementTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudChannelService.addResponse(resultOperation); + + CreateEntitlementRequest request = + CreateEntitlementRequest.newBuilder() + .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setEntitlement(Entitlement.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + + Entitlement actualResponse = client.createEntitlementAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateEntitlementRequest actualRequest = ((CreateEntitlementRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getEntitlement(), actualRequest.getEntitlement()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createEntitlementExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + CreateEntitlementRequest request = + CreateEntitlementRequest.newBuilder() + .setParent(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setEntitlement(Entitlement.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + client.createEntitlementAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void changeParametersTest() throws Exception { + Entitlement expectedResponse = + Entitlement.newBuilder() + .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString()) + .setCommitmentSettings(CommitmentSettings.newBuilder().build()) + .setProvisionedService(ProvisionedService.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setPurchaseOrderId("purchaseOrderId2029917384") + .setTrialSettings(TrialSettings.newBuilder().build()) + .setAssociationInfo(AssociationInfo.newBuilder().build()) + .addAllParameters(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("changeParametersTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudChannelService.addResponse(resultOperation); + + ChangeParametersRequest request = + ChangeParametersRequest.newBuilder() + .setName("name3373707") + .addAllParameters(new ArrayList()) + .setRequestId("requestId693933066") + .setPurchaseOrderId("purchaseOrderId2029917384") + .build(); + + Entitlement actualResponse = client.changeParametersAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ChangeParametersRequest actualRequest = ((ChangeParametersRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getParametersList(), actualRequest.getParametersList()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertEquals(request.getPurchaseOrderId(), actualRequest.getPurchaseOrderId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void changeParametersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ChangeParametersRequest request = + ChangeParametersRequest.newBuilder() + .setName("name3373707") + .addAllParameters(new ArrayList()) + .setRequestId("requestId693933066") + .setPurchaseOrderId("purchaseOrderId2029917384") + .build(); + client.changeParametersAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void changeRenewalSettingsTest() throws Exception { + Entitlement expectedResponse = + Entitlement.newBuilder() + .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString()) + .setCommitmentSettings(CommitmentSettings.newBuilder().build()) + .setProvisionedService(ProvisionedService.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setPurchaseOrderId("purchaseOrderId2029917384") + .setTrialSettings(TrialSettings.newBuilder().build()) + .setAssociationInfo(AssociationInfo.newBuilder().build()) + .addAllParameters(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("changeRenewalSettingsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudChannelService.addResponse(resultOperation); + + ChangeRenewalSettingsRequest request = + ChangeRenewalSettingsRequest.newBuilder() + .setName("name3373707") + .setRenewalSettings(RenewalSettings.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + + Entitlement actualResponse = client.changeRenewalSettingsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ChangeRenewalSettingsRequest actualRequest = + ((ChangeRenewalSettingsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getRenewalSettings(), actualRequest.getRenewalSettings()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void changeRenewalSettingsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ChangeRenewalSettingsRequest request = + ChangeRenewalSettingsRequest.newBuilder() + .setName("name3373707") + .setRenewalSettings(RenewalSettings.newBuilder().build()) + .setRequestId("requestId693933066") + .build(); + client.changeRenewalSettingsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void changeOfferTest() throws Exception { + Entitlement expectedResponse = + Entitlement.newBuilder() + .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString()) + .setCommitmentSettings(CommitmentSettings.newBuilder().build()) + .setProvisionedService(ProvisionedService.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setPurchaseOrderId("purchaseOrderId2029917384") + .setTrialSettings(TrialSettings.newBuilder().build()) + .setAssociationInfo(AssociationInfo.newBuilder().build()) + .addAllParameters(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("changeOfferTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudChannelService.addResponse(resultOperation); + + ChangeOfferRequest request = + ChangeOfferRequest.newBuilder() + .setName("name3373707") + .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString()) + .addAllParameters(new ArrayList()) + .setPurchaseOrderId("purchaseOrderId2029917384") + .setRequestId("requestId693933066") + .build(); + + Entitlement actualResponse = client.changeOfferAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ChangeOfferRequest actualRequest = ((ChangeOfferRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getOffer(), actualRequest.getOffer()); + Assert.assertEquals(request.getParametersList(), actualRequest.getParametersList()); + Assert.assertEquals(request.getPurchaseOrderId(), actualRequest.getPurchaseOrderId()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void changeOfferExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ChangeOfferRequest request = + ChangeOfferRequest.newBuilder() + .setName("name3373707") + .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString()) + .addAllParameters(new ArrayList()) + .setPurchaseOrderId("purchaseOrderId2029917384") + .setRequestId("requestId693933066") + .build(); + client.changeOfferAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void startPaidServiceTest() throws Exception { + Entitlement expectedResponse = + Entitlement.newBuilder() + .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString()) + .setCommitmentSettings(CommitmentSettings.newBuilder().build()) + .setProvisionedService(ProvisionedService.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setPurchaseOrderId("purchaseOrderId2029917384") + .setTrialSettings(TrialSettings.newBuilder().build()) + .setAssociationInfo(AssociationInfo.newBuilder().build()) + .addAllParameters(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("startPaidServiceTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudChannelService.addResponse(resultOperation); + + StartPaidServiceRequest request = + StartPaidServiceRequest.newBuilder() + .setName("name3373707") + .setRequestId("requestId693933066") + .build(); + + Entitlement actualResponse = client.startPaidServiceAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + StartPaidServiceRequest actualRequest = ((StartPaidServiceRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void startPaidServiceExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + StartPaidServiceRequest request = + StartPaidServiceRequest.newBuilder() + .setName("name3373707") + .setRequestId("requestId693933066") + .build(); + client.startPaidServiceAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void suspendEntitlementTest() throws Exception { + Entitlement expectedResponse = + Entitlement.newBuilder() + .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString()) + .setCommitmentSettings(CommitmentSettings.newBuilder().build()) + .setProvisionedService(ProvisionedService.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setPurchaseOrderId("purchaseOrderId2029917384") + .setTrialSettings(TrialSettings.newBuilder().build()) + .setAssociationInfo(AssociationInfo.newBuilder().build()) + .addAllParameters(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("suspendEntitlementTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudChannelService.addResponse(resultOperation); + + SuspendEntitlementRequest request = + SuspendEntitlementRequest.newBuilder() + .setName("name3373707") + .setRequestId("requestId693933066") + .build(); + + Entitlement actualResponse = client.suspendEntitlementAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + SuspendEntitlementRequest actualRequest = ((SuspendEntitlementRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void suspendEntitlementExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + SuspendEntitlementRequest request = + SuspendEntitlementRequest.newBuilder() + .setName("name3373707") + .setRequestId("requestId693933066") + .build(); + client.suspendEntitlementAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void cancelEntitlementTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("cancelEntitlementTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudChannelService.addResponse(resultOperation); + + CancelEntitlementRequest request = + CancelEntitlementRequest.newBuilder() + .setName("name3373707") + .setRequestId("requestId693933066") + .build(); + + client.cancelEntitlementAsync(request).get(); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CancelEntitlementRequest actualRequest = ((CancelEntitlementRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void cancelEntitlementExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + CancelEntitlementRequest request = + CancelEntitlementRequest.newBuilder() + .setName("name3373707") + .setRequestId("requestId693933066") + .build(); + client.cancelEntitlementAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void activateEntitlementTest() throws Exception { + Entitlement expectedResponse = + Entitlement.newBuilder() + .setName(EntitlementName.of("[ACCOUNT]", "[CUSTOMER]", "[ENTITLEMENT]").toString()) + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setOffer(OfferName.of("[ACCOUNT]", "[OFFER]").toString()) + .setCommitmentSettings(CommitmentSettings.newBuilder().build()) + .setProvisionedService(ProvisionedService.newBuilder().build()) + .addAllSuspensionReasons(new ArrayList()) + .setPurchaseOrderId("purchaseOrderId2029917384") + .setTrialSettings(TrialSettings.newBuilder().build()) + .setAssociationInfo(AssociationInfo.newBuilder().build()) + .addAllParameters(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("activateEntitlementTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudChannelService.addResponse(resultOperation); + + ActivateEntitlementRequest request = + ActivateEntitlementRequest.newBuilder() + .setName("name3373707") + .setRequestId("requestId693933066") + .build(); + + Entitlement actualResponse = client.activateEntitlementAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ActivateEntitlementRequest actualRequest = ((ActivateEntitlementRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void activateEntitlementExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ActivateEntitlementRequest request = + ActivateEntitlementRequest.newBuilder() + .setName("name3373707") + .setRequestId("requestId693933066") + .build(); + client.activateEntitlementAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void transferEntitlementsTest() throws Exception { + TransferEntitlementsResponse expectedResponse = + TransferEntitlementsResponse.newBuilder() + .addAllEntitlements(new ArrayList()) + .build(); + Operation resultOperation = + Operation.newBuilder() + .setName("transferEntitlementsTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudChannelService.addResponse(resultOperation); + + TransferEntitlementsRequest request = + TransferEntitlementsRequest.newBuilder() + .setParent("parent-995424086") + .addAllEntitlements(new ArrayList()) + .setAuthToken("authToken1450587441") + .setRequestId("requestId693933066") + .build(); + + TransferEntitlementsResponse actualResponse = client.transferEntitlementsAsync(request).get(); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TransferEntitlementsRequest actualRequest = + ((TransferEntitlementsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getEntitlementsList(), actualRequest.getEntitlementsList()); + Assert.assertEquals(request.getAuthToken(), actualRequest.getAuthToken()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void transferEntitlementsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + TransferEntitlementsRequest request = + TransferEntitlementsRequest.newBuilder() + .setParent("parent-995424086") + .addAllEntitlements(new ArrayList()) + .setAuthToken("authToken1450587441") + .setRequestId("requestId693933066") + .build(); + client.transferEntitlementsAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void transferEntitlementsToGoogleTest() throws Exception { + Empty expectedResponse = Empty.newBuilder().build(); + Operation resultOperation = + Operation.newBuilder() + .setName("transferEntitlementsToGoogleTest") + .setDone(true) + .setResponse(Any.pack(expectedResponse)) + .build(); + mockCloudChannelService.addResponse(resultOperation); + + TransferEntitlementsToGoogleRequest request = + TransferEntitlementsToGoogleRequest.newBuilder() + .setParent("parent-995424086") + .addAllEntitlements(new ArrayList()) + .setRequestId("requestId693933066") + .build(); + + client.transferEntitlementsToGoogleAsync(request).get(); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + TransferEntitlementsToGoogleRequest actualRequest = + ((TransferEntitlementsToGoogleRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getEntitlementsList(), actualRequest.getEntitlementsList()); + Assert.assertEquals(request.getRequestId(), actualRequest.getRequestId()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void transferEntitlementsToGoogleExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + TransferEntitlementsToGoogleRequest request = + TransferEntitlementsToGoogleRequest.newBuilder() + .setParent("parent-995424086") + .addAllEntitlements(new ArrayList()) + .setRequestId("requestId693933066") + .build(); + client.transferEntitlementsToGoogleAsync(request).get(); + Assert.fail("No exception raised"); + } catch (ExecutionException e) { + Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass()); + InvalidArgumentException apiException = ((InvalidArgumentException) e.getCause()); + Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode()); + } + } + + @Test + public void listChannelPartnerLinksTest() throws Exception { + ChannelPartnerLink responsesElement = ChannelPartnerLink.newBuilder().build(); + ListChannelPartnerLinksResponse expectedResponse = + ListChannelPartnerLinksResponse.newBuilder() + .setNextPageToken("") + .addAllChannelPartnerLinks(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + ListChannelPartnerLinksRequest request = + ListChannelPartnerLinksRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + + ListChannelPartnerLinksPagedResponse pagedListResponse = + client.listChannelPartnerLinks(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getChannelPartnerLinksList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListChannelPartnerLinksRequest actualRequest = + ((ListChannelPartnerLinksRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getView(), actualRequest.getView()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listChannelPartnerLinksExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ListChannelPartnerLinksRequest request = + ListChannelPartnerLinksRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .build(); + client.listChannelPartnerLinks(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void getChannelPartnerLinkTest() throws Exception { + ChannelPartnerLink expectedResponse = + ChannelPartnerLink.newBuilder() + .setName("name3373707") + .setResellerCloudIdentityId("resellerCloudIdentityId478410940") + .setInviteLinkUri("inviteLinkUri-1908670519") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPublicId("publicId1293600100") + .setChannelPartnerCloudIdentityInfo(CloudIdentityInfo.newBuilder().build()) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + GetChannelPartnerLinkRequest request = + GetChannelPartnerLinkRequest.newBuilder().setName("name3373707").build(); + + ChannelPartnerLink actualResponse = client.getChannelPartnerLink(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + GetChannelPartnerLinkRequest actualRequest = + ((GetChannelPartnerLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getView(), actualRequest.getView()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void getChannelPartnerLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + GetChannelPartnerLinkRequest request = + GetChannelPartnerLinkRequest.newBuilder().setName("name3373707").build(); + client.getChannelPartnerLink(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void createChannelPartnerLinkTest() throws Exception { + ChannelPartnerLink expectedResponse = + ChannelPartnerLink.newBuilder() + .setName("name3373707") + .setResellerCloudIdentityId("resellerCloudIdentityId478410940") + .setInviteLinkUri("inviteLinkUri-1908670519") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPublicId("publicId1293600100") + .setChannelPartnerCloudIdentityInfo(CloudIdentityInfo.newBuilder().build()) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + CreateChannelPartnerLinkRequest request = + CreateChannelPartnerLinkRequest.newBuilder() + .setParent("parent-995424086") + .setChannelPartnerLink(ChannelPartnerLink.newBuilder().build()) + .setDomain("domain-1326197564") + .build(); + + ChannelPartnerLink actualResponse = client.createChannelPartnerLink(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + CreateChannelPartnerLinkRequest actualRequest = + ((CreateChannelPartnerLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getChannelPartnerLink(), actualRequest.getChannelPartnerLink()); + Assert.assertEquals(request.getDomain(), actualRequest.getDomain()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void createChannelPartnerLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + CreateChannelPartnerLinkRequest request = + CreateChannelPartnerLinkRequest.newBuilder() + .setParent("parent-995424086") + .setChannelPartnerLink(ChannelPartnerLink.newBuilder().build()) + .setDomain("domain-1326197564") + .build(); + client.createChannelPartnerLink(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void updateChannelPartnerLinkTest() throws Exception { + ChannelPartnerLink expectedResponse = + ChannelPartnerLink.newBuilder() + .setName("name3373707") + .setResellerCloudIdentityId("resellerCloudIdentityId478410940") + .setInviteLinkUri("inviteLinkUri-1908670519") + .setCreateTime(Timestamp.newBuilder().build()) + .setUpdateTime(Timestamp.newBuilder().build()) + .setPublicId("publicId1293600100") + .setChannelPartnerCloudIdentityInfo(CloudIdentityInfo.newBuilder().build()) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + UpdateChannelPartnerLinkRequest request = + UpdateChannelPartnerLinkRequest.newBuilder() + .setName("name3373707") + .setChannelPartnerLink(ChannelPartnerLink.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + + ChannelPartnerLink actualResponse = client.updateChannelPartnerLink(request); + Assert.assertEquals(expectedResponse, actualResponse); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + UpdateChannelPartnerLinkRequest actualRequest = + ((UpdateChannelPartnerLinkRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getName(), actualRequest.getName()); + Assert.assertEquals(request.getChannelPartnerLink(), actualRequest.getChannelPartnerLink()); + Assert.assertEquals(request.getUpdateMask(), actualRequest.getUpdateMask()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void updateChannelPartnerLinkExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + UpdateChannelPartnerLinkRequest request = + UpdateChannelPartnerLinkRequest.newBuilder() + .setName("name3373707") + .setChannelPartnerLink(ChannelPartnerLink.newBuilder().build()) + .setUpdateMask(FieldMask.newBuilder().build()) + .build(); + client.updateChannelPartnerLink(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listProductsTest() throws Exception { + Product responsesElement = Product.newBuilder().build(); + ListProductsResponse expectedResponse = + ListProductsResponse.newBuilder() + .setNextPageToken("") + .addAllProducts(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setAccount("account-1177318867") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + + ListProductsPagedResponse pagedListResponse = client.listProducts(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getProductsList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListProductsRequest actualRequest = ((ListProductsRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getAccount(), actualRequest.getAccount()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listProductsExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ListProductsRequest request = + ListProductsRequest.newBuilder() + .setAccount("account-1177318867") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + client.listProducts(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listSkusTest() throws Exception { + Sku responsesElement = Sku.newBuilder().build(); + ListSkusResponse expectedResponse = + ListSkusResponse.newBuilder() + .setNextPageToken("") + .addAllSkus(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + ListSkusRequest request = + ListSkusRequest.newBuilder() + .setParent(ProductName.of("[PRODUCT]").toString()) + .setAccount("account-1177318867") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + + ListSkusPagedResponse pagedListResponse = client.listSkus(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getSkusList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListSkusRequest actualRequest = ((ListSkusRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getAccount(), actualRequest.getAccount()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listSkusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ListSkusRequest request = + ListSkusRequest.newBuilder() + .setParent(ProductName.of("[PRODUCT]").toString()) + .setAccount("account-1177318867") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + client.listSkus(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listOffersTest() throws Exception { + Offer responsesElement = Offer.newBuilder().build(); + ListOffersResponse expectedResponse = + ListOffersResponse.newBuilder() + .setNextPageToken("") + .addAllOffers(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + ListOffersRequest request = + ListOffersRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setLanguageCode("languageCode-2092349083") + .build(); + + ListOffersPagedResponse pagedListResponse = client.listOffers(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getOffersList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListOffersRequest actualRequest = ((ListOffersRequest) actualRequests.get(0)); + + Assert.assertEquals(request.getParent(), actualRequest.getParent()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getFilter(), actualRequest.getFilter()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listOffersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ListOffersRequest request = + ListOffersRequest.newBuilder() + .setParent("parent-995424086") + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setFilter("filter-1274492040") + .setLanguageCode("languageCode-2092349083") + .build(); + client.listOffers(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPurchasableSkusTest() throws Exception { + PurchasableSku responsesElement = PurchasableSku.newBuilder().build(); + ListPurchasableSkusResponse expectedResponse = + ListPurchasableSkusResponse.newBuilder() + .setNextPageToken("") + .addAllPurchasableSkus(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + ListPurchasableSkusRequest request = + ListPurchasableSkusRequest.newBuilder() + .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + + ListPurchasableSkusPagedResponse pagedListResponse = client.listPurchasableSkus(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPurchasableSkusList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPurchasableSkusRequest actualRequest = ((ListPurchasableSkusRequest) actualRequests.get(0)); + + Assert.assertEquals( + request.getCreateEntitlementPurchase(), actualRequest.getCreateEntitlementPurchase()); + Assert.assertEquals(request.getChangeOfferPurchase(), actualRequest.getChangeOfferPurchase()); + Assert.assertEquals(request.getCustomer(), actualRequest.getCustomer()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPurchasableSkusExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ListPurchasableSkusRequest request = + ListPurchasableSkusRequest.newBuilder() + .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + client.listPurchasableSkus(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } + + @Test + public void listPurchasableOffersTest() throws Exception { + PurchasableOffer responsesElement = PurchasableOffer.newBuilder().build(); + ListPurchasableOffersResponse expectedResponse = + ListPurchasableOffersResponse.newBuilder() + .setNextPageToken("") + .addAllPurchasableOffers(Arrays.asList(responsesElement)) + .build(); + mockCloudChannelService.addResponse(expectedResponse); + + ListPurchasableOffersRequest request = + ListPurchasableOffersRequest.newBuilder() + .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + + ListPurchasableOffersPagedResponse pagedListResponse = client.listPurchasableOffers(request); + + List resources = Lists.newArrayList(pagedListResponse.iterateAll()); + + Assert.assertEquals(1, resources.size()); + Assert.assertEquals(expectedResponse.getPurchasableOffersList().get(0), resources.get(0)); + + List actualRequests = mockCloudChannelService.getRequests(); + Assert.assertEquals(1, actualRequests.size()); + ListPurchasableOffersRequest actualRequest = + ((ListPurchasableOffersRequest) actualRequests.get(0)); + + Assert.assertEquals( + request.getCreateEntitlementPurchase(), actualRequest.getCreateEntitlementPurchase()); + Assert.assertEquals(request.getChangeOfferPurchase(), actualRequest.getChangeOfferPurchase()); + Assert.assertEquals(request.getCustomer(), actualRequest.getCustomer()); + Assert.assertEquals(request.getPageSize(), actualRequest.getPageSize()); + Assert.assertEquals(request.getPageToken(), actualRequest.getPageToken()); + Assert.assertEquals(request.getLanguageCode(), actualRequest.getLanguageCode()); + Assert.assertTrue( + channelProvider.isHeaderSent( + ApiClientHeaderProvider.getDefaultApiClientHeaderKey(), + GaxGrpcProperties.getDefaultApiClientHeaderPattern())); + } + + @Test + public void listPurchasableOffersExceptionTest() throws Exception { + StatusRuntimeException exception = new StatusRuntimeException(io.grpc.Status.INVALID_ARGUMENT); + mockCloudChannelService.addException(exception); + + try { + ListPurchasableOffersRequest request = + ListPurchasableOffersRequest.newBuilder() + .setCustomer(CustomerName.of("[ACCOUNT]", "[CUSTOMER]").toString()) + .setPageSize(883849137) + .setPageToken("pageToken873572522") + .setLanguageCode("languageCode-2092349083") + .build(); + client.listPurchasableOffers(request); + Assert.fail("No exception raised"); + } catch (InvalidArgumentException e) { + // Expected exception. + } + } +} diff --git a/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/MockCloudChannelService.java b/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/MockCloudChannelService.java new file mode 100644 index 00000000..a81c5d23 --- /dev/null +++ b/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/MockCloudChannelService.java @@ -0,0 +1,59 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.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 MockCloudChannelService implements MockGrpcService { + private final MockCloudChannelServiceImpl serviceImpl; + + public MockCloudChannelService() { + serviceImpl = new MockCloudChannelServiceImpl(); + } + + @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-channel/src/test/java/com/google/cloud/channel/v1/MockCloudChannelServiceImpl.java b/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/MockCloudChannelServiceImpl.java new file mode 100644 index 00000000..0f47621e --- /dev/null +++ b/google-cloud-channel/src/test/java/com/google/cloud/channel/v1/MockCloudChannelServiceImpl.java @@ -0,0 +1,517 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1; + +import com.google.api.core.BetaApi; +import com.google.cloud.channel.v1.CloudChannelServiceGrpc.CloudChannelServiceImplBase; +import com.google.longrunning.Operation; +import com.google.protobuf.AbstractMessage; +import com.google.protobuf.Empty; +import io.grpc.stub.StreamObserver; +import java.util.ArrayList; +import java.util.LinkedList; +import java.util.List; +import java.util.Queue; +import javax.annotation.Generated; + +@BetaApi +@Generated("by gapic-generator-java") +public class MockCloudChannelServiceImpl extends CloudChannelServiceImplBase { + private List requests; + private Queue responses; + + public MockCloudChannelServiceImpl() { + 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 listCustomers( + ListCustomersRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListCustomersResponse) { + requests.add(request); + responseObserver.onNext(((ListCustomersResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getCustomer(GetCustomerRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Customer) { + requests.add(request); + responseObserver.onNext(((Customer) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void checkCloudIdentityAccountsExist( + CheckCloudIdentityAccountsExistRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof CheckCloudIdentityAccountsExistResponse) { + requests.add(request); + responseObserver.onNext(((CheckCloudIdentityAccountsExistResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createCustomer( + CreateCustomerRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Customer) { + requests.add(request); + responseObserver.onNext(((Customer) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateCustomer( + UpdateCustomerRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Customer) { + requests.add(request); + responseObserver.onNext(((Customer) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void deleteCustomer( + DeleteCustomerRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Empty) { + requests.add(request); + responseObserver.onNext(((Empty) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void provisionCloudIdentity( + ProvisionCloudIdentityRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listEntitlements( + ListEntitlementsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListEntitlementsResponse) { + requests.add(request); + responseObserver.onNext(((ListEntitlementsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listTransferableSkus( + ListTransferableSkusRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTransferableSkusResponse) { + requests.add(request); + responseObserver.onNext(((ListTransferableSkusResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listTransferableOffers( + ListTransferableOffersRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListTransferableOffersResponse) { + requests.add(request); + responseObserver.onNext(((ListTransferableOffersResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getEntitlement( + GetEntitlementRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Entitlement) { + requests.add(request); + responseObserver.onNext(((Entitlement) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createEntitlement( + CreateEntitlementRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void changeParameters( + ChangeParametersRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void changeRenewalSettings( + ChangeRenewalSettingsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void changeOffer(ChangeOfferRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void startPaidService( + StartPaidServiceRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void suspendEntitlement( + SuspendEntitlementRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void cancelEntitlement( + CancelEntitlementRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void activateEntitlement( + ActivateEntitlementRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void transferEntitlements( + TransferEntitlementsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void transferEntitlementsToGoogle( + TransferEntitlementsToGoogleRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof Operation) { + requests.add(request); + responseObserver.onNext(((Operation) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listChannelPartnerLinks( + ListChannelPartnerLinksRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListChannelPartnerLinksResponse) { + requests.add(request); + responseObserver.onNext(((ListChannelPartnerLinksResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void getChannelPartnerLink( + GetChannelPartnerLinkRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ChannelPartnerLink) { + requests.add(request); + responseObserver.onNext(((ChannelPartnerLink) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void createChannelPartnerLink( + CreateChannelPartnerLinkRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ChannelPartnerLink) { + requests.add(request); + responseObserver.onNext(((ChannelPartnerLink) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void updateChannelPartnerLink( + UpdateChannelPartnerLinkRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ChannelPartnerLink) { + requests.add(request); + responseObserver.onNext(((ChannelPartnerLink) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listProducts( + ListProductsRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListProductsResponse) { + requests.add(request); + responseObserver.onNext(((ListProductsResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listSkus(ListSkusRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListSkusResponse) { + requests.add(request); + responseObserver.onNext(((ListSkusResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listOffers( + ListOffersRequest request, StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListOffersResponse) { + requests.add(request); + responseObserver.onNext(((ListOffersResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listPurchasableSkus( + ListPurchasableSkusRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListPurchasableSkusResponse) { + requests.add(request); + responseObserver.onNext(((ListPurchasableSkusResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } + + @Override + public void listPurchasableOffers( + ListPurchasableOffersRequest request, + StreamObserver responseObserver) { + Object response = responses.remove(); + if (response instanceof ListPurchasableOffersResponse) { + requests.add(request); + responseObserver.onNext(((ListPurchasableOffersResponse) response)); + responseObserver.onCompleted(); + } else if (response instanceof Exception) { + responseObserver.onError(((Exception) response)); + } else { + responseObserver.onError(new IllegalArgumentException("Unrecognized response type")); + } + } +} diff --git a/grpc-google-cloud-channel-v1/pom.xml b/grpc-google-cloud-channel-v1/pom.xml new file mode 100644 index 00000000..78d8ba21 --- /dev/null +++ b/grpc-google-cloud-channel-v1/pom.xml @@ -0,0 +1,65 @@ + + 4.0.0 + com.google.api.grpc + grpc-google-cloud-channel-v1 + 0.0.1-SNAPSHOT + grpc-google-cloud-channel-v1 + GRPC library for google-cloud-channel + + com.google.cloud + google-cloud-channel-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-channel-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-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceGrpc.java b/grpc-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceGrpc.java new file mode 100644 index 00000000..945ad34e --- /dev/null +++ b/grpc-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudChannelServiceGrpc.java @@ -0,0 +1,5696 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.google.cloud.channel.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; + +/** + * + * + *
+ * CloudChannelService enables Google cloud resellers and distributors to manage
+ * their customers, channel partners, entitlements and reports.
+ * Using this service:
+ * 1. Resellers or distributors can manage a customer entity.
+ * 2. Distributors can register an authorized reseller in their channel and then
+ *    enable delegated admin access for the reseller.
+ * 3. Resellers or distributors can manage entitlements for their customers.
+ * The service primarily exposes the following resources:
+ * - [Customer][google.cloud.channel.v1.Customer]s: A Customer represents an entity managed by a reseller or
+ * distributor. A customer typically represents an enterprise. In an n-tier
+ * resale channel hierarchy, customers are generally represented as leaf nodes.
+ * Customers primarily have an Entitlement sub-resource discussed below.
+ * - [Entitlement][google.cloud.channel.v1.Entitlement]s: An Entitlement represents an entity which provides a
+ * customer means to start using a service. Entitlements are created or updated
+ * as a result of a successful fulfillment.
+ * - [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s: A ChannelPartnerLink is an entity that identifies
+ * links between distributors and their indirect resellers in a channel.
+ * 
+ */ +@javax.annotation.Generated( + value = "by gRPC proto compiler", + comments = "Source: google/cloud/channel/v1/service.proto") +public final class CloudChannelServiceGrpc { + + private CloudChannelServiceGrpc() {} + + public static final String SERVICE_NAME = "google.cloud.channel.v1.CloudChannelService"; + + // Static method descriptors that strictly reflect the proto. + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListCustomersRequest, + com.google.cloud.channel.v1.ListCustomersResponse> + getListCustomersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListCustomers", + requestType = com.google.cloud.channel.v1.ListCustomersRequest.class, + responseType = com.google.cloud.channel.v1.ListCustomersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListCustomersRequest, + com.google.cloud.channel.v1.ListCustomersResponse> + getListCustomersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListCustomersRequest, + com.google.cloud.channel.v1.ListCustomersResponse> + getListCustomersMethod; + if ((getListCustomersMethod = CloudChannelServiceGrpc.getListCustomersMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListCustomersMethod = CloudChannelServiceGrpc.getListCustomersMethod) == null) { + CloudChannelServiceGrpc.getListCustomersMethod = + getListCustomersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListCustomers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListCustomersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListCustomersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ListCustomers")) + .build(); + } + } + } + return getListCustomersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.GetCustomerRequest, com.google.cloud.channel.v1.Customer> + getGetCustomerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetCustomer", + requestType = com.google.cloud.channel.v1.GetCustomerRequest.class, + responseType = com.google.cloud.channel.v1.Customer.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.GetCustomerRequest, com.google.cloud.channel.v1.Customer> + getGetCustomerMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.GetCustomerRequest, com.google.cloud.channel.v1.Customer> + getGetCustomerMethod; + if ((getGetCustomerMethod = CloudChannelServiceGrpc.getGetCustomerMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getGetCustomerMethod = CloudChannelServiceGrpc.getGetCustomerMethod) == null) { + CloudChannelServiceGrpc.getGetCustomerMethod = + getGetCustomerMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetCustomer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.GetCustomerRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.Customer.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("GetCustomer")) + .build(); + } + } + } + return getGetCustomerMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest, + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse> + getCheckCloudIdentityAccountsExistMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CheckCloudIdentityAccountsExist", + requestType = com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest.class, + responseType = com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest, + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse> + getCheckCloudIdentityAccountsExistMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest, + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse> + getCheckCloudIdentityAccountsExistMethod; + if ((getCheckCloudIdentityAccountsExistMethod = + CloudChannelServiceGrpc.getCheckCloudIdentityAccountsExistMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getCheckCloudIdentityAccountsExistMethod = + CloudChannelServiceGrpc.getCheckCloudIdentityAccountsExistMethod) + == null) { + CloudChannelServiceGrpc.getCheckCloudIdentityAccountsExistMethod = + getCheckCloudIdentityAccountsExistMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CheckCloudIdentityAccountsExist")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier( + "CheckCloudIdentityAccountsExist")) + .build(); + } + } + } + return getCheckCloudIdentityAccountsExistMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CreateCustomerRequest, com.google.cloud.channel.v1.Customer> + getCreateCustomerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateCustomer", + requestType = com.google.cloud.channel.v1.CreateCustomerRequest.class, + responseType = com.google.cloud.channel.v1.Customer.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CreateCustomerRequest, com.google.cloud.channel.v1.Customer> + getCreateCustomerMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CreateCustomerRequest, com.google.cloud.channel.v1.Customer> + getCreateCustomerMethod; + if ((getCreateCustomerMethod = CloudChannelServiceGrpc.getCreateCustomerMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getCreateCustomerMethod = CloudChannelServiceGrpc.getCreateCustomerMethod) == null) { + CloudChannelServiceGrpc.getCreateCustomerMethod = + getCreateCustomerMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateCustomer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.CreateCustomerRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.Customer.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("CreateCustomer")) + .build(); + } + } + } + return getCreateCustomerMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.UpdateCustomerRequest, com.google.cloud.channel.v1.Customer> + getUpdateCustomerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateCustomer", + requestType = com.google.cloud.channel.v1.UpdateCustomerRequest.class, + responseType = com.google.cloud.channel.v1.Customer.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.UpdateCustomerRequest, com.google.cloud.channel.v1.Customer> + getUpdateCustomerMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.UpdateCustomerRequest, com.google.cloud.channel.v1.Customer> + getUpdateCustomerMethod; + if ((getUpdateCustomerMethod = CloudChannelServiceGrpc.getUpdateCustomerMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getUpdateCustomerMethod = CloudChannelServiceGrpc.getUpdateCustomerMethod) == null) { + CloudChannelServiceGrpc.getUpdateCustomerMethod = + getUpdateCustomerMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "UpdateCustomer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.UpdateCustomerRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.Customer.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("UpdateCustomer")) + .build(); + } + } + } + return getUpdateCustomerMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.DeleteCustomerRequest, com.google.protobuf.Empty> + getDeleteCustomerMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "DeleteCustomer", + requestType = com.google.cloud.channel.v1.DeleteCustomerRequest.class, + responseType = com.google.protobuf.Empty.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.DeleteCustomerRequest, com.google.protobuf.Empty> + getDeleteCustomerMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.DeleteCustomerRequest, com.google.protobuf.Empty> + getDeleteCustomerMethod; + if ((getDeleteCustomerMethod = CloudChannelServiceGrpc.getDeleteCustomerMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getDeleteCustomerMethod = CloudChannelServiceGrpc.getDeleteCustomerMethod) == null) { + CloudChannelServiceGrpc.getDeleteCustomerMethod = + getDeleteCustomerMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "DeleteCustomer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.DeleteCustomerRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.protobuf.Empty.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("DeleteCustomer")) + .build(); + } + } + } + return getDeleteCustomerMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest, + com.google.longrunning.Operation> + getProvisionCloudIdentityMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ProvisionCloudIdentity", + requestType = com.google.cloud.channel.v1.ProvisionCloudIdentityRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest, + com.google.longrunning.Operation> + getProvisionCloudIdentityMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest, + com.google.longrunning.Operation> + getProvisionCloudIdentityMethod; + if ((getProvisionCloudIdentityMethod = CloudChannelServiceGrpc.getProvisionCloudIdentityMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getProvisionCloudIdentityMethod = + CloudChannelServiceGrpc.getProvisionCloudIdentityMethod) + == null) { + CloudChannelServiceGrpc.getProvisionCloudIdentityMethod = + getProvisionCloudIdentityMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ProvisionCloudIdentity")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ProvisionCloudIdentity")) + .build(); + } + } + } + return getProvisionCloudIdentityMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListEntitlementsRequest, + com.google.cloud.channel.v1.ListEntitlementsResponse> + getListEntitlementsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListEntitlements", + requestType = com.google.cloud.channel.v1.ListEntitlementsRequest.class, + responseType = com.google.cloud.channel.v1.ListEntitlementsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListEntitlementsRequest, + com.google.cloud.channel.v1.ListEntitlementsResponse> + getListEntitlementsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListEntitlementsRequest, + com.google.cloud.channel.v1.ListEntitlementsResponse> + getListEntitlementsMethod; + if ((getListEntitlementsMethod = CloudChannelServiceGrpc.getListEntitlementsMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListEntitlementsMethod = CloudChannelServiceGrpc.getListEntitlementsMethod) + == null) { + CloudChannelServiceGrpc.getListEntitlementsMethod = + getListEntitlementsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListEntitlements")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListEntitlementsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListEntitlementsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ListEntitlements")) + .build(); + } + } + } + return getListEntitlementsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListTransferableSkusRequest, + com.google.cloud.channel.v1.ListTransferableSkusResponse> + getListTransferableSkusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTransferableSkus", + requestType = com.google.cloud.channel.v1.ListTransferableSkusRequest.class, + responseType = com.google.cloud.channel.v1.ListTransferableSkusResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListTransferableSkusRequest, + com.google.cloud.channel.v1.ListTransferableSkusResponse> + getListTransferableSkusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListTransferableSkusRequest, + com.google.cloud.channel.v1.ListTransferableSkusResponse> + getListTransferableSkusMethod; + if ((getListTransferableSkusMethod = CloudChannelServiceGrpc.getListTransferableSkusMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListTransferableSkusMethod = CloudChannelServiceGrpc.getListTransferableSkusMethod) + == null) { + CloudChannelServiceGrpc.getListTransferableSkusMethod = + getListTransferableSkusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListTransferableSkus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListTransferableSkusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListTransferableSkusResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ListTransferableSkus")) + .build(); + } + } + } + return getListTransferableSkusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListTransferableOffersRequest, + com.google.cloud.channel.v1.ListTransferableOffersResponse> + getListTransferableOffersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListTransferableOffers", + requestType = com.google.cloud.channel.v1.ListTransferableOffersRequest.class, + responseType = com.google.cloud.channel.v1.ListTransferableOffersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListTransferableOffersRequest, + com.google.cloud.channel.v1.ListTransferableOffersResponse> + getListTransferableOffersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListTransferableOffersRequest, + com.google.cloud.channel.v1.ListTransferableOffersResponse> + getListTransferableOffersMethod; + if ((getListTransferableOffersMethod = CloudChannelServiceGrpc.getListTransferableOffersMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListTransferableOffersMethod = + CloudChannelServiceGrpc.getListTransferableOffersMethod) + == null) { + CloudChannelServiceGrpc.getListTransferableOffersMethod = + getListTransferableOffersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListTransferableOffers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListTransferableOffersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListTransferableOffersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ListTransferableOffers")) + .build(); + } + } + } + return getListTransferableOffersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.GetEntitlementRequest, + com.google.cloud.channel.v1.Entitlement> + getGetEntitlementMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetEntitlement", + requestType = com.google.cloud.channel.v1.GetEntitlementRequest.class, + responseType = com.google.cloud.channel.v1.Entitlement.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.GetEntitlementRequest, + com.google.cloud.channel.v1.Entitlement> + getGetEntitlementMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.GetEntitlementRequest, + com.google.cloud.channel.v1.Entitlement> + getGetEntitlementMethod; + if ((getGetEntitlementMethod = CloudChannelServiceGrpc.getGetEntitlementMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getGetEntitlementMethod = CloudChannelServiceGrpc.getGetEntitlementMethod) == null) { + CloudChannelServiceGrpc.getGetEntitlementMethod = + getGetEntitlementMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "GetEntitlement")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.GetEntitlementRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.Entitlement.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("GetEntitlement")) + .build(); + } + } + } + return getGetEntitlementMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CreateEntitlementRequest, com.google.longrunning.Operation> + getCreateEntitlementMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateEntitlement", + requestType = com.google.cloud.channel.v1.CreateEntitlementRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CreateEntitlementRequest, com.google.longrunning.Operation> + getCreateEntitlementMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CreateEntitlementRequest, com.google.longrunning.Operation> + getCreateEntitlementMethod; + if ((getCreateEntitlementMethod = CloudChannelServiceGrpc.getCreateEntitlementMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getCreateEntitlementMethod = CloudChannelServiceGrpc.getCreateEntitlementMethod) + == null) { + CloudChannelServiceGrpc.getCreateEntitlementMethod = + getCreateEntitlementMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CreateEntitlement")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.CreateEntitlementRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("CreateEntitlement")) + .build(); + } + } + } + return getCreateEntitlementMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ChangeParametersRequest, com.google.longrunning.Operation> + getChangeParametersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ChangeParameters", + requestType = com.google.cloud.channel.v1.ChangeParametersRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ChangeParametersRequest, com.google.longrunning.Operation> + getChangeParametersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ChangeParametersRequest, com.google.longrunning.Operation> + getChangeParametersMethod; + if ((getChangeParametersMethod = CloudChannelServiceGrpc.getChangeParametersMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getChangeParametersMethod = CloudChannelServiceGrpc.getChangeParametersMethod) + == null) { + CloudChannelServiceGrpc.getChangeParametersMethod = + getChangeParametersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ChangeParameters")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ChangeParametersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ChangeParameters")) + .build(); + } + } + } + return getChangeParametersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest, + com.google.longrunning.Operation> + getChangeRenewalSettingsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ChangeRenewalSettings", + requestType = com.google.cloud.channel.v1.ChangeRenewalSettingsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest, + com.google.longrunning.Operation> + getChangeRenewalSettingsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest, + com.google.longrunning.Operation> + getChangeRenewalSettingsMethod; + if ((getChangeRenewalSettingsMethod = CloudChannelServiceGrpc.getChangeRenewalSettingsMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getChangeRenewalSettingsMethod = + CloudChannelServiceGrpc.getChangeRenewalSettingsMethod) + == null) { + CloudChannelServiceGrpc.getChangeRenewalSettingsMethod = + getChangeRenewalSettingsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ChangeRenewalSettings")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ChangeRenewalSettings")) + .build(); + } + } + } + return getChangeRenewalSettingsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ChangeOfferRequest, com.google.longrunning.Operation> + getChangeOfferMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ChangeOffer", + requestType = com.google.cloud.channel.v1.ChangeOfferRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ChangeOfferRequest, com.google.longrunning.Operation> + getChangeOfferMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ChangeOfferRequest, com.google.longrunning.Operation> + getChangeOfferMethod; + if ((getChangeOfferMethod = CloudChannelServiceGrpc.getChangeOfferMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getChangeOfferMethod = CloudChannelServiceGrpc.getChangeOfferMethod) == null) { + CloudChannelServiceGrpc.getChangeOfferMethod = + getChangeOfferMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ChangeOffer")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ChangeOfferRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ChangeOffer")) + .build(); + } + } + } + return getChangeOfferMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.StartPaidServiceRequest, com.google.longrunning.Operation> + getStartPaidServiceMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "StartPaidService", + requestType = com.google.cloud.channel.v1.StartPaidServiceRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.StartPaidServiceRequest, com.google.longrunning.Operation> + getStartPaidServiceMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.StartPaidServiceRequest, com.google.longrunning.Operation> + getStartPaidServiceMethod; + if ((getStartPaidServiceMethod = CloudChannelServiceGrpc.getStartPaidServiceMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getStartPaidServiceMethod = CloudChannelServiceGrpc.getStartPaidServiceMethod) + == null) { + CloudChannelServiceGrpc.getStartPaidServiceMethod = + getStartPaidServiceMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "StartPaidService")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.StartPaidServiceRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("StartPaidService")) + .build(); + } + } + } + return getStartPaidServiceMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.SuspendEntitlementRequest, com.google.longrunning.Operation> + getSuspendEntitlementMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "SuspendEntitlement", + requestType = com.google.cloud.channel.v1.SuspendEntitlementRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.SuspendEntitlementRequest, com.google.longrunning.Operation> + getSuspendEntitlementMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.SuspendEntitlementRequest, com.google.longrunning.Operation> + getSuspendEntitlementMethod; + if ((getSuspendEntitlementMethod = CloudChannelServiceGrpc.getSuspendEntitlementMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getSuspendEntitlementMethod = CloudChannelServiceGrpc.getSuspendEntitlementMethod) + == null) { + CloudChannelServiceGrpc.getSuspendEntitlementMethod = + getSuspendEntitlementMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "SuspendEntitlement")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.SuspendEntitlementRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("SuspendEntitlement")) + .build(); + } + } + } + return getSuspendEntitlementMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CancelEntitlementRequest, com.google.longrunning.Operation> + getCancelEntitlementMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CancelEntitlement", + requestType = com.google.cloud.channel.v1.CancelEntitlementRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CancelEntitlementRequest, com.google.longrunning.Operation> + getCancelEntitlementMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CancelEntitlementRequest, com.google.longrunning.Operation> + getCancelEntitlementMethod; + if ((getCancelEntitlementMethod = CloudChannelServiceGrpc.getCancelEntitlementMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getCancelEntitlementMethod = CloudChannelServiceGrpc.getCancelEntitlementMethod) + == null) { + CloudChannelServiceGrpc.getCancelEntitlementMethod = + getCancelEntitlementMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "CancelEntitlement")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.CancelEntitlementRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("CancelEntitlement")) + .build(); + } + } + } + return getCancelEntitlementMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ActivateEntitlementRequest, com.google.longrunning.Operation> + getActivateEntitlementMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ActivateEntitlement", + requestType = com.google.cloud.channel.v1.ActivateEntitlementRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ActivateEntitlementRequest, com.google.longrunning.Operation> + getActivateEntitlementMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ActivateEntitlementRequest, + com.google.longrunning.Operation> + getActivateEntitlementMethod; + if ((getActivateEntitlementMethod = CloudChannelServiceGrpc.getActivateEntitlementMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getActivateEntitlementMethod = CloudChannelServiceGrpc.getActivateEntitlementMethod) + == null) { + CloudChannelServiceGrpc.getActivateEntitlementMethod = + getActivateEntitlementMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ActivateEntitlement")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ActivateEntitlementRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ActivateEntitlement")) + .build(); + } + } + } + return getActivateEntitlementMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.TransferEntitlementsRequest, com.google.longrunning.Operation> + getTransferEntitlementsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TransferEntitlements", + requestType = com.google.cloud.channel.v1.TransferEntitlementsRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.TransferEntitlementsRequest, com.google.longrunning.Operation> + getTransferEntitlementsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.TransferEntitlementsRequest, + com.google.longrunning.Operation> + getTransferEntitlementsMethod; + if ((getTransferEntitlementsMethod = CloudChannelServiceGrpc.getTransferEntitlementsMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getTransferEntitlementsMethod = CloudChannelServiceGrpc.getTransferEntitlementsMethod) + == null) { + CloudChannelServiceGrpc.getTransferEntitlementsMethod = + getTransferEntitlementsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "TransferEntitlements")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.TransferEntitlementsRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("TransferEntitlements")) + .build(); + } + } + } + return getTransferEntitlementsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest, + com.google.longrunning.Operation> + getTransferEntitlementsToGoogleMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "TransferEntitlementsToGoogle", + requestType = com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest.class, + responseType = com.google.longrunning.Operation.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest, + com.google.longrunning.Operation> + getTransferEntitlementsToGoogleMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest, + com.google.longrunning.Operation> + getTransferEntitlementsToGoogleMethod; + if ((getTransferEntitlementsToGoogleMethod = + CloudChannelServiceGrpc.getTransferEntitlementsToGoogleMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getTransferEntitlementsToGoogleMethod = + CloudChannelServiceGrpc.getTransferEntitlementsToGoogleMethod) + == null) { + CloudChannelServiceGrpc.getTransferEntitlementsToGoogleMethod = + getTransferEntitlementsToGoogleMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "TransferEntitlementsToGoogle")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.longrunning.Operation.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier( + "TransferEntitlementsToGoogle")) + .build(); + } + } + } + return getTransferEntitlementsToGoogleMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest, + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse> + getListChannelPartnerLinksMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListChannelPartnerLinks", + requestType = com.google.cloud.channel.v1.ListChannelPartnerLinksRequest.class, + responseType = com.google.cloud.channel.v1.ListChannelPartnerLinksResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest, + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse> + getListChannelPartnerLinksMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest, + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse> + getListChannelPartnerLinksMethod; + if ((getListChannelPartnerLinksMethod = + CloudChannelServiceGrpc.getListChannelPartnerLinksMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListChannelPartnerLinksMethod = + CloudChannelServiceGrpc.getListChannelPartnerLinksMethod) + == null) { + CloudChannelServiceGrpc.getListChannelPartnerLinksMethod = + getListChannelPartnerLinksMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListChannelPartnerLinks")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier( + "ListChannelPartnerLinks")) + .build(); + } + } + } + return getListChannelPartnerLinksMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink> + getGetChannelPartnerLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "GetChannelPartnerLink", + requestType = com.google.cloud.channel.v1.GetChannelPartnerLinkRequest.class, + responseType = com.google.cloud.channel.v1.ChannelPartnerLink.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink> + getGetChannelPartnerLinkMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink> + getGetChannelPartnerLinkMethod; + if ((getGetChannelPartnerLinkMethod = CloudChannelServiceGrpc.getGetChannelPartnerLinkMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getGetChannelPartnerLinkMethod = + CloudChannelServiceGrpc.getGetChannelPartnerLinkMethod) + == null) { + CloudChannelServiceGrpc.getGetChannelPartnerLinkMethod = + getGetChannelPartnerLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "GetChannelPartnerLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("GetChannelPartnerLink")) + .build(); + } + } + } + return getGetChannelPartnerLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink> + getCreateChannelPartnerLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "CreateChannelPartnerLink", + requestType = com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest.class, + responseType = com.google.cloud.channel.v1.ChannelPartnerLink.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink> + getCreateChannelPartnerLinkMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink> + getCreateChannelPartnerLinkMethod; + if ((getCreateChannelPartnerLinkMethod = + CloudChannelServiceGrpc.getCreateChannelPartnerLinkMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getCreateChannelPartnerLinkMethod = + CloudChannelServiceGrpc.getCreateChannelPartnerLinkMethod) + == null) { + CloudChannelServiceGrpc.getCreateChannelPartnerLinkMethod = + getCreateChannelPartnerLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "CreateChannelPartnerLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier( + "CreateChannelPartnerLink")) + .build(); + } + } + } + return getCreateChannelPartnerLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink> + getUpdateChannelPartnerLinkMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "UpdateChannelPartnerLink", + requestType = com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest.class, + responseType = com.google.cloud.channel.v1.ChannelPartnerLink.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink> + getUpdateChannelPartnerLinkMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink> + getUpdateChannelPartnerLinkMethod; + if ((getUpdateChannelPartnerLinkMethod = + CloudChannelServiceGrpc.getUpdateChannelPartnerLinkMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getUpdateChannelPartnerLinkMethod = + CloudChannelServiceGrpc.getUpdateChannelPartnerLinkMethod) + == null) { + CloudChannelServiceGrpc.getUpdateChannelPartnerLinkMethod = + getUpdateChannelPartnerLinkMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "UpdateChannelPartnerLink")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier( + "UpdateChannelPartnerLink")) + .build(); + } + } + } + return getUpdateChannelPartnerLinkMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListProductsRequest, + com.google.cloud.channel.v1.ListProductsResponse> + getListProductsMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListProducts", + requestType = com.google.cloud.channel.v1.ListProductsRequest.class, + responseType = com.google.cloud.channel.v1.ListProductsResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListProductsRequest, + com.google.cloud.channel.v1.ListProductsResponse> + getListProductsMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListProductsRequest, + com.google.cloud.channel.v1.ListProductsResponse> + getListProductsMethod; + if ((getListProductsMethod = CloudChannelServiceGrpc.getListProductsMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListProductsMethod = CloudChannelServiceGrpc.getListProductsMethod) == null) { + CloudChannelServiceGrpc.getListProductsMethod = + getListProductsMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListProducts")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListProductsRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListProductsResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ListProducts")) + .build(); + } + } + } + return getListProductsMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListSkusRequest, com.google.cloud.channel.v1.ListSkusResponse> + getListSkusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListSkus", + requestType = com.google.cloud.channel.v1.ListSkusRequest.class, + responseType = com.google.cloud.channel.v1.ListSkusResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListSkusRequest, com.google.cloud.channel.v1.ListSkusResponse> + getListSkusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListSkusRequest, + com.google.cloud.channel.v1.ListSkusResponse> + getListSkusMethod; + if ((getListSkusMethod = CloudChannelServiceGrpc.getListSkusMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListSkusMethod = CloudChannelServiceGrpc.getListSkusMethod) == null) { + CloudChannelServiceGrpc.getListSkusMethod = + getListSkusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListSkus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListSkusRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListSkusResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ListSkus")) + .build(); + } + } + } + return getListSkusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListOffersRequest, + com.google.cloud.channel.v1.ListOffersResponse> + getListOffersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListOffers", + requestType = com.google.cloud.channel.v1.ListOffersRequest.class, + responseType = com.google.cloud.channel.v1.ListOffersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListOffersRequest, + com.google.cloud.channel.v1.ListOffersResponse> + getListOffersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListOffersRequest, + com.google.cloud.channel.v1.ListOffersResponse> + getListOffersMethod; + if ((getListOffersMethod = CloudChannelServiceGrpc.getListOffersMethod) == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListOffersMethod = CloudChannelServiceGrpc.getListOffersMethod) == null) { + CloudChannelServiceGrpc.getListOffersMethod = + getListOffersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName(generateFullMethodName(SERVICE_NAME, "ListOffers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListOffersRequest.getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListOffersResponse.getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ListOffers")) + .build(); + } + } + } + return getListOffersMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListPurchasableSkusRequest, + com.google.cloud.channel.v1.ListPurchasableSkusResponse> + getListPurchasableSkusMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPurchasableSkus", + requestType = com.google.cloud.channel.v1.ListPurchasableSkusRequest.class, + responseType = com.google.cloud.channel.v1.ListPurchasableSkusResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListPurchasableSkusRequest, + com.google.cloud.channel.v1.ListPurchasableSkusResponse> + getListPurchasableSkusMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListPurchasableSkusRequest, + com.google.cloud.channel.v1.ListPurchasableSkusResponse> + getListPurchasableSkusMethod; + if ((getListPurchasableSkusMethod = CloudChannelServiceGrpc.getListPurchasableSkusMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListPurchasableSkusMethod = CloudChannelServiceGrpc.getListPurchasableSkusMethod) + == null) { + CloudChannelServiceGrpc.getListPurchasableSkusMethod = + getListPurchasableSkusMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListPurchasableSkus")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListPurchasableSkusRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListPurchasableSkusResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ListPurchasableSkus")) + .build(); + } + } + } + return getListPurchasableSkusMethod; + } + + private static volatile io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListPurchasableOffersRequest, + com.google.cloud.channel.v1.ListPurchasableOffersResponse> + getListPurchasableOffersMethod; + + @io.grpc.stub.annotations.RpcMethod( + fullMethodName = SERVICE_NAME + '/' + "ListPurchasableOffers", + requestType = com.google.cloud.channel.v1.ListPurchasableOffersRequest.class, + responseType = com.google.cloud.channel.v1.ListPurchasableOffersResponse.class, + methodType = io.grpc.MethodDescriptor.MethodType.UNARY) + public static io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListPurchasableOffersRequest, + com.google.cloud.channel.v1.ListPurchasableOffersResponse> + getListPurchasableOffersMethod() { + io.grpc.MethodDescriptor< + com.google.cloud.channel.v1.ListPurchasableOffersRequest, + com.google.cloud.channel.v1.ListPurchasableOffersResponse> + getListPurchasableOffersMethod; + if ((getListPurchasableOffersMethod = CloudChannelServiceGrpc.getListPurchasableOffersMethod) + == null) { + synchronized (CloudChannelServiceGrpc.class) { + if ((getListPurchasableOffersMethod = + CloudChannelServiceGrpc.getListPurchasableOffersMethod) + == null) { + CloudChannelServiceGrpc.getListPurchasableOffersMethod = + getListPurchasableOffersMethod = + io.grpc.MethodDescriptor + . + newBuilder() + .setType(io.grpc.MethodDescriptor.MethodType.UNARY) + .setFullMethodName( + generateFullMethodName(SERVICE_NAME, "ListPurchasableOffers")) + .setSampledToLocalTracing(true) + .setRequestMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListPurchasableOffersRequest + .getDefaultInstance())) + .setResponseMarshaller( + io.grpc.protobuf.ProtoUtils.marshaller( + com.google.cloud.channel.v1.ListPurchasableOffersResponse + .getDefaultInstance())) + .setSchemaDescriptor( + new CloudChannelServiceMethodDescriptorSupplier("ListPurchasableOffers")) + .build(); + } + } + } + return getListPurchasableOffersMethod; + } + + /** Creates a new async stub that supports all call types for the service */ + public static CloudChannelServiceStub newStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudChannelServiceStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudChannelServiceStub(channel, callOptions); + } + }; + return CloudChannelServiceStub.newStub(factory, channel); + } + + /** + * Creates a new blocking-style stub that supports unary and streaming output calls on the service + */ + public static CloudChannelServiceBlockingStub newBlockingStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudChannelServiceBlockingStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudChannelServiceBlockingStub(channel, callOptions); + } + }; + return CloudChannelServiceBlockingStub.newStub(factory, channel); + } + + /** Creates a new ListenableFuture-style stub that supports unary calls on the service */ + public static CloudChannelServiceFutureStub newFutureStub(io.grpc.Channel channel) { + io.grpc.stub.AbstractStub.StubFactory factory = + new io.grpc.stub.AbstractStub.StubFactory() { + @java.lang.Override + public CloudChannelServiceFutureStub newStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudChannelServiceFutureStub(channel, callOptions); + } + }; + return CloudChannelServiceFutureStub.newStub(factory, channel); + } + + /** + * + * + *
+   * CloudChannelService enables Google cloud resellers and distributors to manage
+   * their customers, channel partners, entitlements and reports.
+   * Using this service:
+   * 1. Resellers or distributors can manage a customer entity.
+   * 2. Distributors can register an authorized reseller in their channel and then
+   *    enable delegated admin access for the reseller.
+   * 3. Resellers or distributors can manage entitlements for their customers.
+   * The service primarily exposes the following resources:
+   * - [Customer][google.cloud.channel.v1.Customer]s: A Customer represents an entity managed by a reseller or
+   * distributor. A customer typically represents an enterprise. In an n-tier
+   * resale channel hierarchy, customers are generally represented as leaf nodes.
+   * Customers primarily have an Entitlement sub-resource discussed below.
+   * - [Entitlement][google.cloud.channel.v1.Entitlement]s: An Entitlement represents an entity which provides a
+   * customer means to start using a service. Entitlements are created or updated
+   * as a result of a successful fulfillment.
+   * - [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s: A ChannelPartnerLink is an entity that identifies
+   * links between distributors and their indirect resellers in a channel.
+   * 
+ */ + public abstract static class CloudChannelServiceImplBase implements io.grpc.BindableService { + + /** + * + * + *
+     * List downstream [Customer][google.cloud.channel.v1.Customer]s.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * <br/> List of [Customer][google.cloud.channel.v1.Customer]s pertaining to the reseller or empty list if
+     * there are none.
+     * 
+ */ + public void listCustomers( + com.google.cloud.channel.v1.ListCustomersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListCustomersMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a requested [Customer][google.cloud.channel.v1.Customer] resource.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: If the customer resource doesn't exist. Usually
+     * the result of an invalid name parameter.
+     * Return Value:
+     * <br/> [Customer][google.cloud.channel.v1.Customer] resource if found, error otherwise.
+     * 
+ */ + public void getCustomer( + com.google.cloud.channel.v1.GetCustomerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetCustomerMethod(), responseObserver); + } + + /** + * + * + *
+     * Confirms the existence of Cloud Identity accounts, based on the domain and
+     * whether the Cloud Identity accounts are owned by the reseller.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * INVALID_VALUE: Invalid domain value in the request.
+     * * NOT_FOUND: If there is no [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] customer
+     * for the domain specified in the request.
+     * Return Value:
+     * <br/> List of [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources if any exist for
+     * the domain, otherwise an error is returned.
+     * 
+ */ + public void checkCloudIdentityAccountsExist( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse> + responseObserver) { + asyncUnimplementedUnaryCall(getCheckCloudIdentityAccountsExistMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a new [Customer][google.cloud.channel.v1.Customer] resource under the reseller or distributor
+     * account.
+     * Possible Error Codes:
+     * <ul>
+     * <li>PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.</li>
+     * <li> INVALID_ARGUMENT:
+     * <ul>
+     *  <li> Missing or invalid required parameters in the request. </li>
+     *  <li> Domain field value doesn't match the domain specified in primary
+     *  email.</li>
+     * </ul>
+     * </li>
+     * </ul>
+     * Return Value:
+     * <br/> If successful, the newly created [Customer][google.cloud.channel.v1.Customer] resource, otherwise
+     * returns an error.
+     * 
+ */ + public void createCustomer( + com.google.cloud.channel.v1.CreateCustomerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateCustomerMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates an existing [Customer][google.cloud.channel.v1.Customer] resource belonging to the reseller or
+     * distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name
+     * specified in the request.
+     * Return Value:
+     * <br/> If successful, the updated [Customer][google.cloud.channel.v1.Customer] resource, otherwise returns
+     * an error.
+     * 
+ */ + public void updateCustomer( + com.google.cloud.channel.v1.UpdateCustomerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getUpdateCustomerMethod(), responseObserver); + } + + /** + * + * + *
+     * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently and irreversibly.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the account making the request does not own
+     * this customer.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * FAILED_PRECONDITION: If the customer has existing entitlements.
+     * * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name
+     * specified in the request.
+     * 
+ */ + public void deleteCustomer( + com.google.cloud.channel.v1.DeleteCustomerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getDeleteCustomerMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates a Cloud Identity for the given customer using the customer's
+     * information or the information provided here, if present.
+     * Possible Error Codes:
+     * *  PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * *  INVALID_ARGUMENT: Missing or invalid required parameters in the request.
+     * *  NOT_FOUND: If the customer is not found for the reseller.
+     * *  ALREADY_EXISTS: If the customer's primary email already exists. In this
+     *    case, retry after changing the customer's primary contact email.
+     * *  INTERNAL: Any non-user error related to a technical issue in the
+     *    backend. Contact Cloud Channel support in this case.
+     * *  UNKNOWN: Any non-user error related to a technical issue in the backend.
+     *    Contact Cloud Channel support in this case.
+     * Return Value:
+     * <br/>  Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void provisionCloudIdentity( + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getProvisionCloudIdentityMethod(), responseObserver); + } + + /** + * + * + *
+     * List [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the request.
+     * Return Value:
+     * <br/> List of [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to the customer, or empty list if
+     * there are none.
+     * 
+ */ + public void listEntitlements( + com.google.cloud.channel.v1.ListEntitlementsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListEntitlementsMethod(), responseObserver); + } + + /** + * + * + *
+     * List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on Cloud Identity ID or
+     * Customer Name in the request.
+     * This method is used when a reseller lists the entitlements
+     * information of a customer that is not owned. The reseller should provide
+     * the customer's Cloud Identity ID or Customer Name.
+     * Possible Error Codes:
+     * <ul>
+     * <li>PERMISSION_DENIED, due to one of the following reasons:
+     * <ul>
+     *    <li> If the customer doesn't belong to the reseller and no auth token,
+     *    or an invalid auth token is supplied. </li> <li> If the reseller account
+     *    making the request and the reseller account being queried for are
+     *    different. </li>
+     * </ul>
+     * </li>
+     * <li> INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.</li>
+     * </ul>
+     * Return Value:
+     * <br/> List of [TransferableSku][google.cloud.channel.v1.TransferableSku] for the given customer.
+     * 
+ */ + public void listTransferableSkus( + com.google.cloud.channel.v1.ListTransferableSkusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListTransferableSkusMethod(), responseObserver); + } + + /** + * + * + *
+     * List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on Cloud Identity ID or
+     * Customer Name in the request.
+     * This method is used when a reseller gets the entitlement
+     * information of a customer that is not owned. The reseller should provide
+     * the customer's Cloud Identity ID or Customer Name.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED, due to one of the following reasons: (a) If the
+     * customer doesn't belong to the reseller and no auth token or invalid auth
+     * token is supplied. (b) If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the given customer and SKU.
+     * 
+ */ + public void listTransferableOffers( + com.google.cloud.channel.v1.ListTransferableOffersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListTransferableOffersMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: If the entitlement is not found for the customer.
+     * Return Value:
+     * <br/> If found, the requested [Entitlement][google.cloud.channel.v1.Entitlement] resource, otherwise returns
+     * an error.
+     * 
+ */ + public void getEntitlement( + com.google.cloud.channel.v1.GetEntitlementRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getGetEntitlementMethod(), responseObserver); + } + + /** + * + * + *
+     * Creates an entitlement for a customer.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * </li> <li> INVALID_ARGUMENT: <ul>
+     *   <li> Missing or invalid required parameters in the request. </li>
+     *   <li> Cannot purchase an entitlement if there is already an
+     *    entitlement for customer, for a SKU from the same product family. </li>
+     *   <li> INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is
+     * valid. If it is valid, then contact Google Channel support for further
+     * troubleshooting. </li>
+     * </ul>
+     * </li>
+     * <li> NOT_FOUND: If the customer or offer resource is not found for the
+     * reseller. </li>
+     * <li> ALREADY_EXISTS: This failure can happen in the following cases:
+     *   <ul>
+     *     <li>If the SKU has been already purchased for the customer.</li>
+     *     <li>If the customer's primary email already exists. In this case retry
+     *         after changing the customer's primary contact email.
+     *     </li>
+     *   </ul>
+     * </li>
+     * <li> CONDITION_NOT_MET or FAILED_PRECONDITION: This
+     * failure can happen in the following cases:
+     * <ul>
+     *    <li> Purchasing a SKU that requires domain verification and the
+     *    domain has not been verified. </li>
+     *    <li> Purchasing an Add-On SKU like Vault or Drive without purchasing
+     *    the pre-requisite SKU, such as Google Workspace Business Starter. </li>
+     *    <li> Applicable only for developer accounts: reseller and resold
+     *    domain. Must meet the following domain naming requirements:
+     *     <ul>
+     *       <li> Domain names must start with goog-test. </li>
+     *       <li> Resold domain names must include the reseller domain. </li>
+     *     </ul>
+     *    </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Contact Cloud Channel Support in this case. </li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void createEntitlement( + com.google.cloud.channel.v1.CreateEntitlementRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCreateEntitlementMethod(), responseObserver); + } + + /** + * + * + *
+     * Change parameters of the entitlement
+     * An entitlement parameters update is a long-running operation and results in
+     * updates to the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request. For example, if the number of seats being changed to is greater
+     * than the allowed number of max seats for the resource. Or decreasing seats
+     * for a commitment based plan.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * INTERNAL: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void changeParameters( + com.google.cloud.channel.v1.ChangeParametersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getChangeParametersMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the renewal settings for an existing customer entitlement.
+     * An entitlement update is a long-running operation and results in updates to
+     * the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a
+     * commitment plan. Can't enable or disable renewal for non-commitment plans.
+     * * INTERNAL: Any non user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void changeRenewalSettings( + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getChangeRenewalSettingsMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates the Offer for an existing customer entitlement.
+     * An entitlement update is a long-running operation and results in updates to
+     * the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Offer or Entitlement resource not found.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void changeOffer( + com.google.cloud.channel.v1.ChangeOfferRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getChangeOfferMethod(), responseObserver); + } + + /** + * + * + *
+     * Starts paid service for a trial entitlement.
+     * Starts paid service for a trial entitlement immediately. This method is
+     * only applicable if a plan has already been set up for a trial entitlement
+     * but has some trial days remaining.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for
+     * entitlement on trial plans.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void startPaidService( + com.google.cloud.channel.v1.StartPaidServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getStartPaidServiceMethod(), responseObserver); + } + + /** + * + * + *
+     * Suspends a previously fulfilled entitlement.
+     * An entitlement suspension is a long-running operation.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * NOT_ACTIVE: Entitlement is not active.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void suspendEntitlement( + com.google.cloud.channel.v1.SuspendEntitlementRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getSuspendEntitlementMethod(), responseObserver); + } + + /** + * + * + *
+     * Cancels a previously fulfilled entitlement.
+     * An entitlement cancellation is a long-running operation.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller or
+     * if the reseller account making the request and reseller account being
+     * queried for are different.
+     * * FAILED_PRECONDITION: If there are any Google Cloud projects linked to the
+     * Google Cloud entitlement's Cloud Billing subaccount.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace
+     * add-ons or entitlements for Google Cloud's development platform.
+     * * INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The response will contain
+     * google.protobuf.Empty on success. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void cancelEntitlement( + com.google.cloud.channel.v1.CancelEntitlementRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getCancelEntitlementMethod(), responseObserver); + } + + /** + * + * + *
+     * Activates a previously suspended entitlement. The entitlement must be in a
+     * suspended state for it to be activated. Entitlements suspended for pending
+     * ToS acceptance can't be activated using this method. An entitlement
+     * activation is a long-running operation and can result in updates to
+     * the state of the customer entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller or
+     * if the reseller account making the request and reseller account being
+     * queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * SUSPENSION_NOT_RESELLER_INITIATED: Can't activate an
+     * entitlement that is pending TOS acceptance. Only reseller initiated
+     * suspensions can be activated.
+     * * NOT_SUSPENDED: Can't activate entitlements that are already in ACTIVE
+     * state. Can only activate suspended entitlements.
+     * * INTERNAL: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void activateEntitlement( + com.google.cloud.channel.v1.ActivateEntitlementRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getActivateEntitlementMethod(), responseObserver); + } + + /** + * + * + *
+     * Transfers customer entitlements to new reseller.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the
+     * reseller.</li> <li> INVALID_ARGUMENT: Missing or invalid required
+     * parameters in the request. </li> <li> NOT_FOUND: If the customer or offer
+     * resource is not found for the reseller. </li> <li> ALREADY_EXISTS: If the
+     * SKU has been already transferred for the customer. </li> <li>
+     * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the
+     * following cases: <ul>
+     *    <li> Transferring a SKU that requires domain verification and the
+     * domain has not been verified. </li>
+     *    <li> Transferring an Add-On SKU like Vault or Drive without transferring
+     * the pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for
+     * developer accounts: reseller and resold domain must follow the domain
+     * naming convention as follows:
+     *      <ul>
+     *         <li> Domain names must start with goog-test. </li>
+     *         <li> Resold domain names must include the reseller domain. </li>
+     *      </ul>
+     *   </li>
+     *   <li> All transferring entitlements must be specified. </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void transferEntitlements( + com.google.cloud.channel.v1.TransferEntitlementsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getTransferEntitlementsMethod(), responseObserver); + } + + /** + * + * + *
+     * Transfers customer entitlements from current reseller to Google.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * </li> <li> INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request. </li>
+     * <li> NOT_FOUND: If the customer or offer resource is not found
+     * for the reseller. </li>
+     * <li> ALREADY_EXISTS: If the SKU has been already
+     * transferred for the customer. </li>
+     * <li> CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in
+     * the following cases:
+     * <ul>
+     *    <li> Transferring a SKU that requires domain verification and the
+     * domain has not been verified. </li>
+     *    <li> Transferring an Add-On SKU like Vault or Drive without purchasing
+     * the pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for
+     * developer accounts: reseller and resold domain must follow the domain
+     * naming convention as follows:
+     *      <ul>
+     *         <li> Domain names must start with goog-test. </li>
+     *         <li> Resold domain names must include the reseller domain. </li>
+     *      </ul>
+     *    </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case.</li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The response will contain
+     * google.protobuf.Empty on success. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void transferEntitlementsToGoogle( + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnimplementedUnaryCall(getTransferEntitlementsToGoogleMethod(), responseObserver); + } + + /** + * + * + *
+     * List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a distributor.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * <br/> If successful, returns the list of [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources
+     * for the distributor account, otherwise returns an error.
+     * 
+ */ + public void listChannelPartnerLinks( + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListChannelPartnerLinksMethod(), responseObserver); + } + + /** + * + * + *
+     * Returns a requested [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: ChannelPartnerLink resource not found. Results
+     * due invalid channel partner link name.
+     * Return Value:
+     * <br/> [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if found, otherwise returns an error.
+     * 
+ */ + public void getChannelPartnerLink( + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getGetChannelPartnerLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Initiates a channel partner link between a distributor and a reseller or
+     * between resellers in an n-tier reseller channel.
+     * To accept the invite, the invited partner should follow the invite_link_uri
+     * provided in the response. If the link creation is accepted, a valid link is
+     * set up between the two involved parties.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * ALREADY_EXISTS: If the ChannelPartnerLink sent in the request already
+     * exists.
+     * * NOT_FOUND: If no Cloud Identity customer exists for domain provided.
+     * * INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in
+     * the backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Newly created [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if successful,
+     * otherwise error is returned.
+     * 
+ */ + public void createChannelPartnerLink( + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getCreateChannelPartnerLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Updates a channel partner link. A distributor calls this method to change a
+     * link's status. For example, suspend a partner link.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different. </li>
+     * <li> INVALID_ARGUMENT:
+     * <ul>
+     *   <li> Missing or invalid required parameters in the request. </li>
+     *   <li> Updating link state from invited to active or suspended. </li>
+     *   <li> Sending reseller_cloud_identity_id, invite_url or name in update
+     *   mask. </li>
+     * </ul>
+     * </li>
+     * <li> NOT_FOUND: ChannelPartnerLink resource not found.</li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.</li>
+     * </ul>
+     * Return Value:
+     * <br/> If successful, the updated [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource, otherwise
+     * returns an error.
+     * 
+ */ + public void updateChannelPartnerLink( + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getUpdateChannelPartnerLinkMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the Products the reseller is authorized to sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public void listProducts( + com.google.cloud.channel.v1.ListProductsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListProductsMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the SKUs for a product the reseller is authorized to sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public void listSkus( + com.google.cloud.channel.v1.ListSkusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListSkusMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the Offers the reseller can sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public void listOffers( + com.google.cloud.channel.v1.ListOffersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListOffersMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the Purchasable SKUs for following cases:
+     * * SKUs that can be newly purchased for a customer
+     * * SKUs that can be upgraded/downgraded to, for an entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public void listPurchasableSkus( + com.google.cloud.channel.v1.ListPurchasableSkusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListPurchasableSkusMethod(), responseObserver); + } + + /** + * + * + *
+     * Lists the Purchasable Offers for the following cases:
+     * * Offers that can be newly purchased for a customer
+     * * Offers that can be changed to, for an entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public void listPurchasableOffers( + com.google.cloud.channel.v1.ListPurchasableOffersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnimplementedUnaryCall(getListPurchasableOffersMethod(), responseObserver); + } + + @java.lang.Override + public final io.grpc.ServerServiceDefinition bindService() { + return io.grpc.ServerServiceDefinition.builder(getServiceDescriptor()) + .addMethod( + getListCustomersMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListCustomersRequest, + com.google.cloud.channel.v1.ListCustomersResponse>( + this, METHODID_LIST_CUSTOMERS))) + .addMethod( + getGetCustomerMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.GetCustomerRequest, + com.google.cloud.channel.v1.Customer>(this, METHODID_GET_CUSTOMER))) + .addMethod( + getCheckCloudIdentityAccountsExistMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest, + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse>( + this, METHODID_CHECK_CLOUD_IDENTITY_ACCOUNTS_EXIST))) + .addMethod( + getCreateCustomerMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.CreateCustomerRequest, + com.google.cloud.channel.v1.Customer>(this, METHODID_CREATE_CUSTOMER))) + .addMethod( + getUpdateCustomerMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.UpdateCustomerRequest, + com.google.cloud.channel.v1.Customer>(this, METHODID_UPDATE_CUSTOMER))) + .addMethod( + getDeleteCustomerMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.DeleteCustomerRequest, com.google.protobuf.Empty>( + this, METHODID_DELETE_CUSTOMER))) + .addMethod( + getProvisionCloudIdentityMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest, + com.google.longrunning.Operation>(this, METHODID_PROVISION_CLOUD_IDENTITY))) + .addMethod( + getListEntitlementsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListEntitlementsRequest, + com.google.cloud.channel.v1.ListEntitlementsResponse>( + this, METHODID_LIST_ENTITLEMENTS))) + .addMethod( + getListTransferableSkusMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListTransferableSkusRequest, + com.google.cloud.channel.v1.ListTransferableSkusResponse>( + this, METHODID_LIST_TRANSFERABLE_SKUS))) + .addMethod( + getListTransferableOffersMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListTransferableOffersRequest, + com.google.cloud.channel.v1.ListTransferableOffersResponse>( + this, METHODID_LIST_TRANSFERABLE_OFFERS))) + .addMethod( + getGetEntitlementMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.GetEntitlementRequest, + com.google.cloud.channel.v1.Entitlement>(this, METHODID_GET_ENTITLEMENT))) + .addMethod( + getCreateEntitlementMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.CreateEntitlementRequest, + com.google.longrunning.Operation>(this, METHODID_CREATE_ENTITLEMENT))) + .addMethod( + getChangeParametersMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ChangeParametersRequest, + com.google.longrunning.Operation>(this, METHODID_CHANGE_PARAMETERS))) + .addMethod( + getChangeRenewalSettingsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest, + com.google.longrunning.Operation>(this, METHODID_CHANGE_RENEWAL_SETTINGS))) + .addMethod( + getChangeOfferMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ChangeOfferRequest, + com.google.longrunning.Operation>(this, METHODID_CHANGE_OFFER))) + .addMethod( + getStartPaidServiceMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.StartPaidServiceRequest, + com.google.longrunning.Operation>(this, METHODID_START_PAID_SERVICE))) + .addMethod( + getSuspendEntitlementMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.SuspendEntitlementRequest, + com.google.longrunning.Operation>(this, METHODID_SUSPEND_ENTITLEMENT))) + .addMethod( + getCancelEntitlementMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.CancelEntitlementRequest, + com.google.longrunning.Operation>(this, METHODID_CANCEL_ENTITLEMENT))) + .addMethod( + getActivateEntitlementMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ActivateEntitlementRequest, + com.google.longrunning.Operation>(this, METHODID_ACTIVATE_ENTITLEMENT))) + .addMethod( + getTransferEntitlementsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.TransferEntitlementsRequest, + com.google.longrunning.Operation>(this, METHODID_TRANSFER_ENTITLEMENTS))) + .addMethod( + getTransferEntitlementsToGoogleMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest, + com.google.longrunning.Operation>( + this, METHODID_TRANSFER_ENTITLEMENTS_TO_GOOGLE))) + .addMethod( + getListChannelPartnerLinksMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest, + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse>( + this, METHODID_LIST_CHANNEL_PARTNER_LINKS))) + .addMethod( + getGetChannelPartnerLinkMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink>( + this, METHODID_GET_CHANNEL_PARTNER_LINK))) + .addMethod( + getCreateChannelPartnerLinkMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink>( + this, METHODID_CREATE_CHANNEL_PARTNER_LINK))) + .addMethod( + getUpdateChannelPartnerLinkMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest, + com.google.cloud.channel.v1.ChannelPartnerLink>( + this, METHODID_UPDATE_CHANNEL_PARTNER_LINK))) + .addMethod( + getListProductsMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListProductsRequest, + com.google.cloud.channel.v1.ListProductsResponse>( + this, METHODID_LIST_PRODUCTS))) + .addMethod( + getListSkusMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListSkusRequest, + com.google.cloud.channel.v1.ListSkusResponse>(this, METHODID_LIST_SKUS))) + .addMethod( + getListOffersMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListOffersRequest, + com.google.cloud.channel.v1.ListOffersResponse>(this, METHODID_LIST_OFFERS))) + .addMethod( + getListPurchasableSkusMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListPurchasableSkusRequest, + com.google.cloud.channel.v1.ListPurchasableSkusResponse>( + this, METHODID_LIST_PURCHASABLE_SKUS))) + .addMethod( + getListPurchasableOffersMethod(), + asyncUnaryCall( + new MethodHandlers< + com.google.cloud.channel.v1.ListPurchasableOffersRequest, + com.google.cloud.channel.v1.ListPurchasableOffersResponse>( + this, METHODID_LIST_PURCHASABLE_OFFERS))) + .build(); + } + } + + /** + * + * + *
+   * CloudChannelService enables Google cloud resellers and distributors to manage
+   * their customers, channel partners, entitlements and reports.
+   * Using this service:
+   * 1. Resellers or distributors can manage a customer entity.
+   * 2. Distributors can register an authorized reseller in their channel and then
+   *    enable delegated admin access for the reseller.
+   * 3. Resellers or distributors can manage entitlements for their customers.
+   * The service primarily exposes the following resources:
+   * - [Customer][google.cloud.channel.v1.Customer]s: A Customer represents an entity managed by a reseller or
+   * distributor. A customer typically represents an enterprise. In an n-tier
+   * resale channel hierarchy, customers are generally represented as leaf nodes.
+   * Customers primarily have an Entitlement sub-resource discussed below.
+   * - [Entitlement][google.cloud.channel.v1.Entitlement]s: An Entitlement represents an entity which provides a
+   * customer means to start using a service. Entitlements are created or updated
+   * as a result of a successful fulfillment.
+   * - [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s: A ChannelPartnerLink is an entity that identifies
+   * links between distributors and their indirect resellers in a channel.
+   * 
+ */ + public static final class CloudChannelServiceStub + extends io.grpc.stub.AbstractAsyncStub { + private CloudChannelServiceStub(io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudChannelServiceStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudChannelServiceStub(channel, callOptions); + } + + /** + * + * + *
+     * List downstream [Customer][google.cloud.channel.v1.Customer]s.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * <br/> List of [Customer][google.cloud.channel.v1.Customer]s pertaining to the reseller or empty list if
+     * there are none.
+     * 
+ */ + public void listCustomers( + com.google.cloud.channel.v1.ListCustomersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListCustomersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a requested [Customer][google.cloud.channel.v1.Customer] resource.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: If the customer resource doesn't exist. Usually
+     * the result of an invalid name parameter.
+     * Return Value:
+     * <br/> [Customer][google.cloud.channel.v1.Customer] resource if found, error otherwise.
+     * 
+ */ + public void getCustomer( + com.google.cloud.channel.v1.GetCustomerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetCustomerMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Confirms the existence of Cloud Identity accounts, based on the domain and
+     * whether the Cloud Identity accounts are owned by the reseller.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * INVALID_VALUE: Invalid domain value in the request.
+     * * NOT_FOUND: If there is no [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] customer
+     * for the domain specified in the request.
+     * Return Value:
+     * <br/> List of [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources if any exist for
+     * the domain, otherwise an error is returned.
+     * 
+ */ + public void checkCloudIdentityAccountsExist( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest request, + io.grpc.stub.StreamObserver< + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse> + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCheckCloudIdentityAccountsExistMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a new [Customer][google.cloud.channel.v1.Customer] resource under the reseller or distributor
+     * account.
+     * Possible Error Codes:
+     * <ul>
+     * <li>PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.</li>
+     * <li> INVALID_ARGUMENT:
+     * <ul>
+     *  <li> Missing or invalid required parameters in the request. </li>
+     *  <li> Domain field value doesn't match the domain specified in primary
+     *  email.</li>
+     * </ul>
+     * </li>
+     * </ul>
+     * Return Value:
+     * <br/> If successful, the newly created [Customer][google.cloud.channel.v1.Customer] resource, otherwise
+     * returns an error.
+     * 
+ */ + public void createCustomer( + com.google.cloud.channel.v1.CreateCustomerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateCustomerMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates an existing [Customer][google.cloud.channel.v1.Customer] resource belonging to the reseller or
+     * distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name
+     * specified in the request.
+     * Return Value:
+     * <br/> If successful, the updated [Customer][google.cloud.channel.v1.Customer] resource, otherwise returns
+     * an error.
+     * 
+ */ + public void updateCustomer( + com.google.cloud.channel.v1.UpdateCustomerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateCustomerMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently and irreversibly.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the account making the request does not own
+     * this customer.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * FAILED_PRECONDITION: If the customer has existing entitlements.
+     * * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name
+     * specified in the request.
+     * 
+ */ + public void deleteCustomer( + com.google.cloud.channel.v1.DeleteCustomerRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getDeleteCustomerMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates a Cloud Identity for the given customer using the customer's
+     * information or the information provided here, if present.
+     * Possible Error Codes:
+     * *  PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * *  INVALID_ARGUMENT: Missing or invalid required parameters in the request.
+     * *  NOT_FOUND: If the customer is not found for the reseller.
+     * *  ALREADY_EXISTS: If the customer's primary email already exists. In this
+     *    case, retry after changing the customer's primary contact email.
+     * *  INTERNAL: Any non-user error related to a technical issue in the
+     *    backend. Contact Cloud Channel support in this case.
+     * *  UNKNOWN: Any non-user error related to a technical issue in the backend.
+     *    Contact Cloud Channel support in this case.
+     * Return Value:
+     * <br/>  Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void provisionCloudIdentity( + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getProvisionCloudIdentityMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the request.
+     * Return Value:
+     * <br/> List of [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to the customer, or empty list if
+     * there are none.
+     * 
+ */ + public void listEntitlements( + com.google.cloud.channel.v1.ListEntitlementsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListEntitlementsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on Cloud Identity ID or
+     * Customer Name in the request.
+     * This method is used when a reseller lists the entitlements
+     * information of a customer that is not owned. The reseller should provide
+     * the customer's Cloud Identity ID or Customer Name.
+     * Possible Error Codes:
+     * <ul>
+     * <li>PERMISSION_DENIED, due to one of the following reasons:
+     * <ul>
+     *    <li> If the customer doesn't belong to the reseller and no auth token,
+     *    or an invalid auth token is supplied. </li> <li> If the reseller account
+     *    making the request and the reseller account being queried for are
+     *    different. </li>
+     * </ul>
+     * </li>
+     * <li> INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.</li>
+     * </ul>
+     * Return Value:
+     * <br/> List of [TransferableSku][google.cloud.channel.v1.TransferableSku] for the given customer.
+     * 
+ */ + public void listTransferableSkus( + com.google.cloud.channel.v1.ListTransferableSkusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListTransferableSkusMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on Cloud Identity ID or
+     * Customer Name in the request.
+     * This method is used when a reseller gets the entitlement
+     * information of a customer that is not owned. The reseller should provide
+     * the customer's Cloud Identity ID or Customer Name.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED, due to one of the following reasons: (a) If the
+     * customer doesn't belong to the reseller and no auth token or invalid auth
+     * token is supplied. (b) If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the given customer and SKU.
+     * 
+ */ + public void listTransferableOffers( + com.google.cloud.channel.v1.ListTransferableOffersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListTransferableOffersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: If the entitlement is not found for the customer.
+     * Return Value:
+     * <br/> If found, the requested [Entitlement][google.cloud.channel.v1.Entitlement] resource, otherwise returns
+     * an error.
+     * 
+ */ + public void getEntitlement( + com.google.cloud.channel.v1.GetEntitlementRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetEntitlementMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Creates an entitlement for a customer.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * </li> <li> INVALID_ARGUMENT: <ul>
+     *   <li> Missing or invalid required parameters in the request. </li>
+     *   <li> Cannot purchase an entitlement if there is already an
+     *    entitlement for customer, for a SKU from the same product family. </li>
+     *   <li> INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is
+     * valid. If it is valid, then contact Google Channel support for further
+     * troubleshooting. </li>
+     * </ul>
+     * </li>
+     * <li> NOT_FOUND: If the customer or offer resource is not found for the
+     * reseller. </li>
+     * <li> ALREADY_EXISTS: This failure can happen in the following cases:
+     *   <ul>
+     *     <li>If the SKU has been already purchased for the customer.</li>
+     *     <li>If the customer's primary email already exists. In this case retry
+     *         after changing the customer's primary contact email.
+     *     </li>
+     *   </ul>
+     * </li>
+     * <li> CONDITION_NOT_MET or FAILED_PRECONDITION: This
+     * failure can happen in the following cases:
+     * <ul>
+     *    <li> Purchasing a SKU that requires domain verification and the
+     *    domain has not been verified. </li>
+     *    <li> Purchasing an Add-On SKU like Vault or Drive without purchasing
+     *    the pre-requisite SKU, such as Google Workspace Business Starter. </li>
+     *    <li> Applicable only for developer accounts: reseller and resold
+     *    domain. Must meet the following domain naming requirements:
+     *     <ul>
+     *       <li> Domain names must start with goog-test. </li>
+     *       <li> Resold domain names must include the reseller domain. </li>
+     *     </ul>
+     *    </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Contact Cloud Channel Support in this case. </li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void createEntitlement( + com.google.cloud.channel.v1.CreateEntitlementRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateEntitlementMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Change parameters of the entitlement
+     * An entitlement parameters update is a long-running operation and results in
+     * updates to the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request. For example, if the number of seats being changed to is greater
+     * than the allowed number of max seats for the resource. Or decreasing seats
+     * for a commitment based plan.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * INTERNAL: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void changeParameters( + com.google.cloud.channel.v1.ChangeParametersRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getChangeParametersMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the renewal settings for an existing customer entitlement.
+     * An entitlement update is a long-running operation and results in updates to
+     * the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a
+     * commitment plan. Can't enable or disable renewal for non-commitment plans.
+     * * INTERNAL: Any non user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void changeRenewalSettings( + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getChangeRenewalSettingsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates the Offer for an existing customer entitlement.
+     * An entitlement update is a long-running operation and results in updates to
+     * the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Offer or Entitlement resource not found.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void changeOffer( + com.google.cloud.channel.v1.ChangeOfferRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getChangeOfferMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Starts paid service for a trial entitlement.
+     * Starts paid service for a trial entitlement immediately. This method is
+     * only applicable if a plan has already been set up for a trial entitlement
+     * but has some trial days remaining.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for
+     * entitlement on trial plans.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void startPaidService( + com.google.cloud.channel.v1.StartPaidServiceRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getStartPaidServiceMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Suspends a previously fulfilled entitlement.
+     * An entitlement suspension is a long-running operation.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * NOT_ACTIVE: Entitlement is not active.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void suspendEntitlement( + com.google.cloud.channel.v1.SuspendEntitlementRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getSuspendEntitlementMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Cancels a previously fulfilled entitlement.
+     * An entitlement cancellation is a long-running operation.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller or
+     * if the reseller account making the request and reseller account being
+     * queried for are different.
+     * * FAILED_PRECONDITION: If there are any Google Cloud projects linked to the
+     * Google Cloud entitlement's Cloud Billing subaccount.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace
+     * add-ons or entitlements for Google Cloud's development platform.
+     * * INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The response will contain
+     * google.protobuf.Empty on success. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void cancelEntitlement( + com.google.cloud.channel.v1.CancelEntitlementRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCancelEntitlementMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Activates a previously suspended entitlement. The entitlement must be in a
+     * suspended state for it to be activated. Entitlements suspended for pending
+     * ToS acceptance can't be activated using this method. An entitlement
+     * activation is a long-running operation and can result in updates to
+     * the state of the customer entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller or
+     * if the reseller account making the request and reseller account being
+     * queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * SUSPENSION_NOT_RESELLER_INITIATED: Can't activate an
+     * entitlement that is pending TOS acceptance. Only reseller initiated
+     * suspensions can be activated.
+     * * NOT_SUSPENDED: Can't activate entitlements that are already in ACTIVE
+     * state. Can only activate suspended entitlements.
+     * * INTERNAL: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void activateEntitlement( + com.google.cloud.channel.v1.ActivateEntitlementRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getActivateEntitlementMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Transfers customer entitlements to new reseller.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the
+     * reseller.</li> <li> INVALID_ARGUMENT: Missing or invalid required
+     * parameters in the request. </li> <li> NOT_FOUND: If the customer or offer
+     * resource is not found for the reseller. </li> <li> ALREADY_EXISTS: If the
+     * SKU has been already transferred for the customer. </li> <li>
+     * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the
+     * following cases: <ul>
+     *    <li> Transferring a SKU that requires domain verification and the
+     * domain has not been verified. </li>
+     *    <li> Transferring an Add-On SKU like Vault or Drive without transferring
+     * the pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for
+     * developer accounts: reseller and resold domain must follow the domain
+     * naming convention as follows:
+     *      <ul>
+     *         <li> Domain names must start with goog-test. </li>
+     *         <li> Resold domain names must include the reseller domain. </li>
+     *      </ul>
+     *   </li>
+     *   <li> All transferring entitlements must be specified. </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void transferEntitlements( + com.google.cloud.channel.v1.TransferEntitlementsRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getTransferEntitlementsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Transfers customer entitlements from current reseller to Google.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * </li> <li> INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request. </li>
+     * <li> NOT_FOUND: If the customer or offer resource is not found
+     * for the reseller. </li>
+     * <li> ALREADY_EXISTS: If the SKU has been already
+     * transferred for the customer. </li>
+     * <li> CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in
+     * the following cases:
+     * <ul>
+     *    <li> Transferring a SKU that requires domain verification and the
+     * domain has not been verified. </li>
+     *    <li> Transferring an Add-On SKU like Vault or Drive without purchasing
+     * the pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for
+     * developer accounts: reseller and resold domain must follow the domain
+     * naming convention as follows:
+     *      <ul>
+     *         <li> Domain names must start with goog-test. </li>
+     *         <li> Resold domain names must include the reseller domain. </li>
+     *      </ul>
+     *    </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case.</li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The response will contain
+     * google.protobuf.Empty on success. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public void transferEntitlementsToGoogle( + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest request, + io.grpc.stub.StreamObserver responseObserver) { + asyncUnaryCall( + getChannel().newCall(getTransferEntitlementsToGoogleMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a distributor.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * <br/> If successful, returns the list of [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources
+     * for the distributor account, otherwise returns an error.
+     * 
+ */ + public void listChannelPartnerLinks( + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListChannelPartnerLinksMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Returns a requested [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: ChannelPartnerLink resource not found. Results
+     * due invalid channel partner link name.
+     * Return Value:
+     * <br/> [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if found, otherwise returns an error.
+     * 
+ */ + public void getChannelPartnerLink( + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getGetChannelPartnerLinkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Initiates a channel partner link between a distributor and a reseller or
+     * between resellers in an n-tier reseller channel.
+     * To accept the invite, the invited partner should follow the invite_link_uri
+     * provided in the response. If the link creation is accepted, a valid link is
+     * set up between the two involved parties.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * ALREADY_EXISTS: If the ChannelPartnerLink sent in the request already
+     * exists.
+     * * NOT_FOUND: If no Cloud Identity customer exists for domain provided.
+     * * INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in
+     * the backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Newly created [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if successful,
+     * otherwise error is returned.
+     * 
+ */ + public void createChannelPartnerLink( + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getCreateChannelPartnerLinkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Updates a channel partner link. A distributor calls this method to change a
+     * link's status. For example, suspend a partner link.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different. </li>
+     * <li> INVALID_ARGUMENT:
+     * <ul>
+     *   <li> Missing or invalid required parameters in the request. </li>
+     *   <li> Updating link state from invited to active or suspended. </li>
+     *   <li> Sending reseller_cloud_identity_id, invite_url or name in update
+     *   mask. </li>
+     * </ul>
+     * </li>
+     * <li> NOT_FOUND: ChannelPartnerLink resource not found.</li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.</li>
+     * </ul>
+     * Return Value:
+     * <br/> If successful, the updated [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource, otherwise
+     * returns an error.
+     * 
+ */ + public void updateChannelPartnerLink( + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getUpdateChannelPartnerLinkMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the Products the reseller is authorized to sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public void listProducts( + com.google.cloud.channel.v1.ListProductsRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListProductsMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the SKUs for a product the reseller is authorized to sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public void listSkus( + com.google.cloud.channel.v1.ListSkusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListSkusMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists the Offers the reseller can sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public void listOffers( + com.google.cloud.channel.v1.ListOffersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListOffersMethod(), getCallOptions()), request, responseObserver); + } + + /** + * + * + *
+     * Lists the Purchasable SKUs for following cases:
+     * * SKUs that can be newly purchased for a customer
+     * * SKUs that can be upgraded/downgraded to, for an entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public void listPurchasableSkus( + com.google.cloud.channel.v1.ListPurchasableSkusRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListPurchasableSkusMethod(), getCallOptions()), + request, + responseObserver); + } + + /** + * + * + *
+     * Lists the Purchasable Offers for the following cases:
+     * * Offers that can be newly purchased for a customer
+     * * Offers that can be changed to, for an entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public void listPurchasableOffers( + com.google.cloud.channel.v1.ListPurchasableOffersRequest request, + io.grpc.stub.StreamObserver + responseObserver) { + asyncUnaryCall( + getChannel().newCall(getListPurchasableOffersMethod(), getCallOptions()), + request, + responseObserver); + } + } + + /** + * + * + *
+   * CloudChannelService enables Google cloud resellers and distributors to manage
+   * their customers, channel partners, entitlements and reports.
+   * Using this service:
+   * 1. Resellers or distributors can manage a customer entity.
+   * 2. Distributors can register an authorized reseller in their channel and then
+   *    enable delegated admin access for the reseller.
+   * 3. Resellers or distributors can manage entitlements for their customers.
+   * The service primarily exposes the following resources:
+   * - [Customer][google.cloud.channel.v1.Customer]s: A Customer represents an entity managed by a reseller or
+   * distributor. A customer typically represents an enterprise. In an n-tier
+   * resale channel hierarchy, customers are generally represented as leaf nodes.
+   * Customers primarily have an Entitlement sub-resource discussed below.
+   * - [Entitlement][google.cloud.channel.v1.Entitlement]s: An Entitlement represents an entity which provides a
+   * customer means to start using a service. Entitlements are created or updated
+   * as a result of a successful fulfillment.
+   * - [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s: A ChannelPartnerLink is an entity that identifies
+   * links between distributors and their indirect resellers in a channel.
+   * 
+ */ + public static final class CloudChannelServiceBlockingStub + extends io.grpc.stub.AbstractBlockingStub { + private CloudChannelServiceBlockingStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudChannelServiceBlockingStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudChannelServiceBlockingStub(channel, callOptions); + } + + /** + * + * + *
+     * List downstream [Customer][google.cloud.channel.v1.Customer]s.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * <br/> List of [Customer][google.cloud.channel.v1.Customer]s pertaining to the reseller or empty list if
+     * there are none.
+     * 
+ */ + public com.google.cloud.channel.v1.ListCustomersResponse listCustomers( + com.google.cloud.channel.v1.ListCustomersRequest request) { + return blockingUnaryCall(getChannel(), getListCustomersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a requested [Customer][google.cloud.channel.v1.Customer] resource.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: If the customer resource doesn't exist. Usually
+     * the result of an invalid name parameter.
+     * Return Value:
+     * <br/> [Customer][google.cloud.channel.v1.Customer] resource if found, error otherwise.
+     * 
+ */ + public com.google.cloud.channel.v1.Customer getCustomer( + com.google.cloud.channel.v1.GetCustomerRequest request) { + return blockingUnaryCall(getChannel(), getGetCustomerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Confirms the existence of Cloud Identity accounts, based on the domain and
+     * whether the Cloud Identity accounts are owned by the reseller.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * INVALID_VALUE: Invalid domain value in the request.
+     * * NOT_FOUND: If there is no [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] customer
+     * for the domain specified in the request.
+     * Return Value:
+     * <br/> List of [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources if any exist for
+     * the domain, otherwise an error is returned.
+     * 
+ */ + public com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse + checkCloudIdentityAccountsExist( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest request) { + return blockingUnaryCall( + getChannel(), getCheckCloudIdentityAccountsExistMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a new [Customer][google.cloud.channel.v1.Customer] resource under the reseller or distributor
+     * account.
+     * Possible Error Codes:
+     * <ul>
+     * <li>PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.</li>
+     * <li> INVALID_ARGUMENT:
+     * <ul>
+     *  <li> Missing or invalid required parameters in the request. </li>
+     *  <li> Domain field value doesn't match the domain specified in primary
+     *  email.</li>
+     * </ul>
+     * </li>
+     * </ul>
+     * Return Value:
+     * <br/> If successful, the newly created [Customer][google.cloud.channel.v1.Customer] resource, otherwise
+     * returns an error.
+     * 
+ */ + public com.google.cloud.channel.v1.Customer createCustomer( + com.google.cloud.channel.v1.CreateCustomerRequest request) { + return blockingUnaryCall(getChannel(), getCreateCustomerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates an existing [Customer][google.cloud.channel.v1.Customer] resource belonging to the reseller or
+     * distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name
+     * specified in the request.
+     * Return Value:
+     * <br/> If successful, the updated [Customer][google.cloud.channel.v1.Customer] resource, otherwise returns
+     * an error.
+     * 
+ */ + public com.google.cloud.channel.v1.Customer updateCustomer( + com.google.cloud.channel.v1.UpdateCustomerRequest request) { + return blockingUnaryCall(getChannel(), getUpdateCustomerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently and irreversibly.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the account making the request does not own
+     * this customer.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * FAILED_PRECONDITION: If the customer has existing entitlements.
+     * * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name
+     * specified in the request.
+     * 
+ */ + public com.google.protobuf.Empty deleteCustomer( + com.google.cloud.channel.v1.DeleteCustomerRequest request) { + return blockingUnaryCall(getChannel(), getDeleteCustomerMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates a Cloud Identity for the given customer using the customer's
+     * information or the information provided here, if present.
+     * Possible Error Codes:
+     * *  PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * *  INVALID_ARGUMENT: Missing or invalid required parameters in the request.
+     * *  NOT_FOUND: If the customer is not found for the reseller.
+     * *  ALREADY_EXISTS: If the customer's primary email already exists. In this
+     *    case, retry after changing the customer's primary contact email.
+     * *  INTERNAL: Any non-user error related to a technical issue in the
+     *    backend. Contact Cloud Channel support in this case.
+     * *  UNKNOWN: Any non-user error related to a technical issue in the backend.
+     *    Contact Cloud Channel support in this case.
+     * Return Value:
+     * <br/>  Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation provisionCloudIdentity( + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest request) { + return blockingUnaryCall( + getChannel(), getProvisionCloudIdentityMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the request.
+     * Return Value:
+     * <br/> List of [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to the customer, or empty list if
+     * there are none.
+     * 
+ */ + public com.google.cloud.channel.v1.ListEntitlementsResponse listEntitlements( + com.google.cloud.channel.v1.ListEntitlementsRequest request) { + return blockingUnaryCall( + getChannel(), getListEntitlementsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on Cloud Identity ID or
+     * Customer Name in the request.
+     * This method is used when a reseller lists the entitlements
+     * information of a customer that is not owned. The reseller should provide
+     * the customer's Cloud Identity ID or Customer Name.
+     * Possible Error Codes:
+     * <ul>
+     * <li>PERMISSION_DENIED, due to one of the following reasons:
+     * <ul>
+     *    <li> If the customer doesn't belong to the reseller and no auth token,
+     *    or an invalid auth token is supplied. </li> <li> If the reseller account
+     *    making the request and the reseller account being queried for are
+     *    different. </li>
+     * </ul>
+     * </li>
+     * <li> INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.</li>
+     * </ul>
+     * Return Value:
+     * <br/> List of [TransferableSku][google.cloud.channel.v1.TransferableSku] for the given customer.
+     * 
+ */ + public com.google.cloud.channel.v1.ListTransferableSkusResponse listTransferableSkus( + com.google.cloud.channel.v1.ListTransferableSkusRequest request) { + return blockingUnaryCall( + getChannel(), getListTransferableSkusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on Cloud Identity ID or
+     * Customer Name in the request.
+     * This method is used when a reseller gets the entitlement
+     * information of a customer that is not owned. The reseller should provide
+     * the customer's Cloud Identity ID or Customer Name.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED, due to one of the following reasons: (a) If the
+     * customer doesn't belong to the reseller and no auth token or invalid auth
+     * token is supplied. (b) If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the given customer and SKU.
+     * 
+ */ + public com.google.cloud.channel.v1.ListTransferableOffersResponse listTransferableOffers( + com.google.cloud.channel.v1.ListTransferableOffersRequest request) { + return blockingUnaryCall( + getChannel(), getListTransferableOffersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: If the entitlement is not found for the customer.
+     * Return Value:
+     * <br/> If found, the requested [Entitlement][google.cloud.channel.v1.Entitlement] resource, otherwise returns
+     * an error.
+     * 
+ */ + public com.google.cloud.channel.v1.Entitlement getEntitlement( + com.google.cloud.channel.v1.GetEntitlementRequest request) { + return blockingUnaryCall(getChannel(), getGetEntitlementMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Creates an entitlement for a customer.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * </li> <li> INVALID_ARGUMENT: <ul>
+     *   <li> Missing or invalid required parameters in the request. </li>
+     *   <li> Cannot purchase an entitlement if there is already an
+     *    entitlement for customer, for a SKU from the same product family. </li>
+     *   <li> INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is
+     * valid. If it is valid, then contact Google Channel support for further
+     * troubleshooting. </li>
+     * </ul>
+     * </li>
+     * <li> NOT_FOUND: If the customer or offer resource is not found for the
+     * reseller. </li>
+     * <li> ALREADY_EXISTS: This failure can happen in the following cases:
+     *   <ul>
+     *     <li>If the SKU has been already purchased for the customer.</li>
+     *     <li>If the customer's primary email already exists. In this case retry
+     *         after changing the customer's primary contact email.
+     *     </li>
+     *   </ul>
+     * </li>
+     * <li> CONDITION_NOT_MET or FAILED_PRECONDITION: This
+     * failure can happen in the following cases:
+     * <ul>
+     *    <li> Purchasing a SKU that requires domain verification and the
+     *    domain has not been verified. </li>
+     *    <li> Purchasing an Add-On SKU like Vault or Drive without purchasing
+     *    the pre-requisite SKU, such as Google Workspace Business Starter. </li>
+     *    <li> Applicable only for developer accounts: reseller and resold
+     *    domain. Must meet the following domain naming requirements:
+     *     <ul>
+     *       <li> Domain names must start with goog-test. </li>
+     *       <li> Resold domain names must include the reseller domain. </li>
+     *     </ul>
+     *    </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Contact Cloud Channel Support in this case. </li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation createEntitlement( + com.google.cloud.channel.v1.CreateEntitlementRequest request) { + return blockingUnaryCall( + getChannel(), getCreateEntitlementMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Change parameters of the entitlement
+     * An entitlement parameters update is a long-running operation and results in
+     * updates to the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request. For example, if the number of seats being changed to is greater
+     * than the allowed number of max seats for the resource. Or decreasing seats
+     * for a commitment based plan.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * INTERNAL: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation changeParameters( + com.google.cloud.channel.v1.ChangeParametersRequest request) { + return blockingUnaryCall( + getChannel(), getChangeParametersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the renewal settings for an existing customer entitlement.
+     * An entitlement update is a long-running operation and results in updates to
+     * the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a
+     * commitment plan. Can't enable or disable renewal for non-commitment plans.
+     * * INTERNAL: Any non user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation changeRenewalSettings( + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest request) { + return blockingUnaryCall( + getChannel(), getChangeRenewalSettingsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates the Offer for an existing customer entitlement.
+     * An entitlement update is a long-running operation and results in updates to
+     * the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Offer or Entitlement resource not found.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation changeOffer( + com.google.cloud.channel.v1.ChangeOfferRequest request) { + return blockingUnaryCall(getChannel(), getChangeOfferMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Starts paid service for a trial entitlement.
+     * Starts paid service for a trial entitlement immediately. This method is
+     * only applicable if a plan has already been set up for a trial entitlement
+     * but has some trial days remaining.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for
+     * entitlement on trial plans.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation startPaidService( + com.google.cloud.channel.v1.StartPaidServiceRequest request) { + return blockingUnaryCall( + getChannel(), getStartPaidServiceMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Suspends a previously fulfilled entitlement.
+     * An entitlement suspension is a long-running operation.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * NOT_ACTIVE: Entitlement is not active.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation suspendEntitlement( + com.google.cloud.channel.v1.SuspendEntitlementRequest request) { + return blockingUnaryCall( + getChannel(), getSuspendEntitlementMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Cancels a previously fulfilled entitlement.
+     * An entitlement cancellation is a long-running operation.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller or
+     * if the reseller account making the request and reseller account being
+     * queried for are different.
+     * * FAILED_PRECONDITION: If there are any Google Cloud projects linked to the
+     * Google Cloud entitlement's Cloud Billing subaccount.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace
+     * add-ons or entitlements for Google Cloud's development platform.
+     * * INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The response will contain
+     * google.protobuf.Empty on success. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation cancelEntitlement( + com.google.cloud.channel.v1.CancelEntitlementRequest request) { + return blockingUnaryCall( + getChannel(), getCancelEntitlementMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Activates a previously suspended entitlement. The entitlement must be in a
+     * suspended state for it to be activated. Entitlements suspended for pending
+     * ToS acceptance can't be activated using this method. An entitlement
+     * activation is a long-running operation and can result in updates to
+     * the state of the customer entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller or
+     * if the reseller account making the request and reseller account being
+     * queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * SUSPENSION_NOT_RESELLER_INITIATED: Can't activate an
+     * entitlement that is pending TOS acceptance. Only reseller initiated
+     * suspensions can be activated.
+     * * NOT_SUSPENDED: Can't activate entitlements that are already in ACTIVE
+     * state. Can only activate suspended entitlements.
+     * * INTERNAL: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation activateEntitlement( + com.google.cloud.channel.v1.ActivateEntitlementRequest request) { + return blockingUnaryCall( + getChannel(), getActivateEntitlementMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Transfers customer entitlements to new reseller.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the
+     * reseller.</li> <li> INVALID_ARGUMENT: Missing or invalid required
+     * parameters in the request. </li> <li> NOT_FOUND: If the customer or offer
+     * resource is not found for the reseller. </li> <li> ALREADY_EXISTS: If the
+     * SKU has been already transferred for the customer. </li> <li>
+     * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the
+     * following cases: <ul>
+     *    <li> Transferring a SKU that requires domain verification and the
+     * domain has not been verified. </li>
+     *    <li> Transferring an Add-On SKU like Vault or Drive without transferring
+     * the pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for
+     * developer accounts: reseller and resold domain must follow the domain
+     * naming convention as follows:
+     *      <ul>
+     *         <li> Domain names must start with goog-test. </li>
+     *         <li> Resold domain names must include the reseller domain. </li>
+     *      </ul>
+     *   </li>
+     *   <li> All transferring entitlements must be specified. </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation transferEntitlements( + com.google.cloud.channel.v1.TransferEntitlementsRequest request) { + return blockingUnaryCall( + getChannel(), getTransferEntitlementsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Transfers customer entitlements from current reseller to Google.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * </li> <li> INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request. </li>
+     * <li> NOT_FOUND: If the customer or offer resource is not found
+     * for the reseller. </li>
+     * <li> ALREADY_EXISTS: If the SKU has been already
+     * transferred for the customer. </li>
+     * <li> CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in
+     * the following cases:
+     * <ul>
+     *    <li> Transferring a SKU that requires domain verification and the
+     * domain has not been verified. </li>
+     *    <li> Transferring an Add-On SKU like Vault or Drive without purchasing
+     * the pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for
+     * developer accounts: reseller and resold domain must follow the domain
+     * naming convention as follows:
+     *      <ul>
+     *         <li> Domain names must start with goog-test. </li>
+     *         <li> Resold domain names must include the reseller domain. </li>
+     *      </ul>
+     *    </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case.</li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The response will contain
+     * google.protobuf.Empty on success. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.longrunning.Operation transferEntitlementsToGoogle( + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest request) { + return blockingUnaryCall( + getChannel(), getTransferEntitlementsToGoogleMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a distributor.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * <br/> If successful, returns the list of [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources
+     * for the distributor account, otherwise returns an error.
+     * 
+ */ + public com.google.cloud.channel.v1.ListChannelPartnerLinksResponse listChannelPartnerLinks( + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest request) { + return blockingUnaryCall( + getChannel(), getListChannelPartnerLinksMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Returns a requested [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: ChannelPartnerLink resource not found. Results
+     * due invalid channel partner link name.
+     * Return Value:
+     * <br/> [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if found, otherwise returns an error.
+     * 
+ */ + public com.google.cloud.channel.v1.ChannelPartnerLink getChannelPartnerLink( + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest request) { + return blockingUnaryCall( + getChannel(), getGetChannelPartnerLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Initiates a channel partner link between a distributor and a reseller or
+     * between resellers in an n-tier reseller channel.
+     * To accept the invite, the invited partner should follow the invite_link_uri
+     * provided in the response. If the link creation is accepted, a valid link is
+     * set up between the two involved parties.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * ALREADY_EXISTS: If the ChannelPartnerLink sent in the request already
+     * exists.
+     * * NOT_FOUND: If no Cloud Identity customer exists for domain provided.
+     * * INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in
+     * the backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Newly created [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if successful,
+     * otherwise error is returned.
+     * 
+ */ + public com.google.cloud.channel.v1.ChannelPartnerLink createChannelPartnerLink( + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest request) { + return blockingUnaryCall( + getChannel(), getCreateChannelPartnerLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Updates a channel partner link. A distributor calls this method to change a
+     * link's status. For example, suspend a partner link.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different. </li>
+     * <li> INVALID_ARGUMENT:
+     * <ul>
+     *   <li> Missing or invalid required parameters in the request. </li>
+     *   <li> Updating link state from invited to active or suspended. </li>
+     *   <li> Sending reseller_cloud_identity_id, invite_url or name in update
+     *   mask. </li>
+     * </ul>
+     * </li>
+     * <li> NOT_FOUND: ChannelPartnerLink resource not found.</li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.</li>
+     * </ul>
+     * Return Value:
+     * <br/> If successful, the updated [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource, otherwise
+     * returns an error.
+     * 
+ */ + public com.google.cloud.channel.v1.ChannelPartnerLink updateChannelPartnerLink( + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest request) { + return blockingUnaryCall( + getChannel(), getUpdateChannelPartnerLinkMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the Products the reseller is authorized to sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public com.google.cloud.channel.v1.ListProductsResponse listProducts( + com.google.cloud.channel.v1.ListProductsRequest request) { + return blockingUnaryCall(getChannel(), getListProductsMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the SKUs for a product the reseller is authorized to sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public com.google.cloud.channel.v1.ListSkusResponse listSkus( + com.google.cloud.channel.v1.ListSkusRequest request) { + return blockingUnaryCall(getChannel(), getListSkusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the Offers the reseller can sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public com.google.cloud.channel.v1.ListOffersResponse listOffers( + com.google.cloud.channel.v1.ListOffersRequest request) { + return blockingUnaryCall(getChannel(), getListOffersMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the Purchasable SKUs for following cases:
+     * * SKUs that can be newly purchased for a customer
+     * * SKUs that can be upgraded/downgraded to, for an entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public com.google.cloud.channel.v1.ListPurchasableSkusResponse listPurchasableSkus( + com.google.cloud.channel.v1.ListPurchasableSkusRequest request) { + return blockingUnaryCall( + getChannel(), getListPurchasableSkusMethod(), getCallOptions(), request); + } + + /** + * + * + *
+     * Lists the Purchasable Offers for the following cases:
+     * * Offers that can be newly purchased for a customer
+     * * Offers that can be changed to, for an entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public com.google.cloud.channel.v1.ListPurchasableOffersResponse listPurchasableOffers( + com.google.cloud.channel.v1.ListPurchasableOffersRequest request) { + return blockingUnaryCall( + getChannel(), getListPurchasableOffersMethod(), getCallOptions(), request); + } + } + + /** + * + * + *
+   * CloudChannelService enables Google cloud resellers and distributors to manage
+   * their customers, channel partners, entitlements and reports.
+   * Using this service:
+   * 1. Resellers or distributors can manage a customer entity.
+   * 2. Distributors can register an authorized reseller in their channel and then
+   *    enable delegated admin access for the reseller.
+   * 3. Resellers or distributors can manage entitlements for their customers.
+   * The service primarily exposes the following resources:
+   * - [Customer][google.cloud.channel.v1.Customer]s: A Customer represents an entity managed by a reseller or
+   * distributor. A customer typically represents an enterprise. In an n-tier
+   * resale channel hierarchy, customers are generally represented as leaf nodes.
+   * Customers primarily have an Entitlement sub-resource discussed below.
+   * - [Entitlement][google.cloud.channel.v1.Entitlement]s: An Entitlement represents an entity which provides a
+   * customer means to start using a service. Entitlements are created or updated
+   * as a result of a successful fulfillment.
+   * - [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s: A ChannelPartnerLink is an entity that identifies
+   * links between distributors and their indirect resellers in a channel.
+   * 
+ */ + public static final class CloudChannelServiceFutureStub + extends io.grpc.stub.AbstractFutureStub { + private CloudChannelServiceFutureStub( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + super(channel, callOptions); + } + + @java.lang.Override + protected CloudChannelServiceFutureStub build( + io.grpc.Channel channel, io.grpc.CallOptions callOptions) { + return new CloudChannelServiceFutureStub(channel, callOptions); + } + + /** + * + * + *
+     * List downstream [Customer][google.cloud.channel.v1.Customer]s.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * <br/> List of [Customer][google.cloud.channel.v1.Customer]s pertaining to the reseller or empty list if
+     * there are none.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListCustomersResponse> + listCustomers(com.google.cloud.channel.v1.ListCustomersRequest request) { + return futureUnaryCall( + getChannel().newCall(getListCustomersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a requested [Customer][google.cloud.channel.v1.Customer] resource.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: If the customer resource doesn't exist. Usually
+     * the result of an invalid name parameter.
+     * Return Value:
+     * <br/> [Customer][google.cloud.channel.v1.Customer] resource if found, error otherwise.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + getCustomer(com.google.cloud.channel.v1.GetCustomerRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetCustomerMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Confirms the existence of Cloud Identity accounts, based on the domain and
+     * whether the Cloud Identity accounts are owned by the reseller.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * INVALID_VALUE: Invalid domain value in the request.
+     * * NOT_FOUND: If there is no [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] customer
+     * for the domain specified in the request.
+     * Return Value:
+     * <br/> List of [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources if any exist for
+     * the domain, otherwise an error is returned.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse> + checkCloudIdentityAccountsExist( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest request) { + return futureUnaryCall( + getChannel().newCall(getCheckCloudIdentityAccountsExistMethod(), getCallOptions()), + request); + } + + /** + * + * + *
+     * Creates a new [Customer][google.cloud.channel.v1.Customer] resource under the reseller or distributor
+     * account.
+     * Possible Error Codes:
+     * <ul>
+     * <li>PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.</li>
+     * <li> INVALID_ARGUMENT:
+     * <ul>
+     *  <li> Missing or invalid required parameters in the request. </li>
+     *  <li> Domain field value doesn't match the domain specified in primary
+     *  email.</li>
+     * </ul>
+     * </li>
+     * </ul>
+     * Return Value:
+     * <br/> If successful, the newly created [Customer][google.cloud.channel.v1.Customer] resource, otherwise
+     * returns an error.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createCustomer(com.google.cloud.channel.v1.CreateCustomerRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateCustomerMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates an existing [Customer][google.cloud.channel.v1.Customer] resource belonging to the reseller or
+     * distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name
+     * specified in the request.
+     * Return Value:
+     * <br/> If successful, the updated [Customer][google.cloud.channel.v1.Customer] resource, otherwise returns
+     * an error.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + updateCustomer(com.google.cloud.channel.v1.UpdateCustomerRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateCustomerMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently and irreversibly.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the account making the request does not own
+     * this customer.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * FAILED_PRECONDITION: If the customer has existing entitlements.
+     * * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name
+     * specified in the request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + deleteCustomer(com.google.cloud.channel.v1.DeleteCustomerRequest request) { + return futureUnaryCall( + getChannel().newCall(getDeleteCustomerMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates a Cloud Identity for the given customer using the customer's
+     * information or the information provided here, if present.
+     * Possible Error Codes:
+     * *  PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * *  INVALID_ARGUMENT: Missing or invalid required parameters in the request.
+     * *  NOT_FOUND: If the customer is not found for the reseller.
+     * *  ALREADY_EXISTS: If the customer's primary email already exists. In this
+     *    case, retry after changing the customer's primary contact email.
+     * *  INTERNAL: Any non-user error related to a technical issue in the
+     *    backend. Contact Cloud Channel support in this case.
+     * *  UNKNOWN: Any non-user error related to a technical issue in the backend.
+     *    Contact Cloud Channel support in this case.
+     * Return Value:
+     * <br/>  Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + provisionCloudIdentity(com.google.cloud.channel.v1.ProvisionCloudIdentityRequest request) { + return futureUnaryCall( + getChannel().newCall(getProvisionCloudIdentityMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the request.
+     * Return Value:
+     * <br/> List of [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to the customer, or empty list if
+     * there are none.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListEntitlementsResponse> + listEntitlements(com.google.cloud.channel.v1.ListEntitlementsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListEntitlementsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on Cloud Identity ID or
+     * Customer Name in the request.
+     * This method is used when a reseller lists the entitlements
+     * information of a customer that is not owned. The reseller should provide
+     * the customer's Cloud Identity ID or Customer Name.
+     * Possible Error Codes:
+     * <ul>
+     * <li>PERMISSION_DENIED, due to one of the following reasons:
+     * <ul>
+     *    <li> If the customer doesn't belong to the reseller and no auth token,
+     *    or an invalid auth token is supplied. </li> <li> If the reseller account
+     *    making the request and the reseller account being queried for are
+     *    different. </li>
+     * </ul>
+     * </li>
+     * <li> INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.</li>
+     * </ul>
+     * Return Value:
+     * <br/> List of [TransferableSku][google.cloud.channel.v1.TransferableSku] for the given customer.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListTransferableSkusResponse> + listTransferableSkus(com.google.cloud.channel.v1.ListTransferableSkusRequest request) { + return futureUnaryCall( + getChannel().newCall(getListTransferableSkusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on Cloud Identity ID or
+     * Customer Name in the request.
+     * This method is used when a reseller gets the entitlement
+     * information of a customer that is not owned. The reseller should provide
+     * the customer's Cloud Identity ID or Customer Name.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED, due to one of the following reasons: (a) If the
+     * customer doesn't belong to the reseller and no auth token or invalid auth
+     * token is supplied. (b) If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the given customer and SKU.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListTransferableOffersResponse> + listTransferableOffers(com.google.cloud.channel.v1.ListTransferableOffersRequest request) { + return futureUnaryCall( + getChannel().newCall(getListTransferableOffersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a requested [Entitlement][google.cloud.channel.v1.Entitlement] resource.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: If the entitlement is not found for the customer.
+     * Return Value:
+     * <br/> If found, the requested [Entitlement][google.cloud.channel.v1.Entitlement] resource, otherwise returns
+     * an error.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.Entitlement> + getEntitlement(com.google.cloud.channel.v1.GetEntitlementRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetEntitlementMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Creates an entitlement for a customer.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * </li> <li> INVALID_ARGUMENT: <ul>
+     *   <li> Missing or invalid required parameters in the request. </li>
+     *   <li> Cannot purchase an entitlement if there is already an
+     *    entitlement for customer, for a SKU from the same product family. </li>
+     *   <li> INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is
+     * valid. If it is valid, then contact Google Channel support for further
+     * troubleshooting. </li>
+     * </ul>
+     * </li>
+     * <li> NOT_FOUND: If the customer or offer resource is not found for the
+     * reseller. </li>
+     * <li> ALREADY_EXISTS: This failure can happen in the following cases:
+     *   <ul>
+     *     <li>If the SKU has been already purchased for the customer.</li>
+     *     <li>If the customer's primary email already exists. In this case retry
+     *         after changing the customer's primary contact email.
+     *     </li>
+     *   </ul>
+     * </li>
+     * <li> CONDITION_NOT_MET or FAILED_PRECONDITION: This
+     * failure can happen in the following cases:
+     * <ul>
+     *    <li> Purchasing a SKU that requires domain verification and the
+     *    domain has not been verified. </li>
+     *    <li> Purchasing an Add-On SKU like Vault or Drive without purchasing
+     *    the pre-requisite SKU, such as Google Workspace Business Starter. </li>
+     *    <li> Applicable only for developer accounts: reseller and resold
+     *    domain. Must meet the following domain naming requirements:
+     *     <ul>
+     *       <li> Domain names must start with goog-test. </li>
+     *       <li> Resold domain names must include the reseller domain. </li>
+     *     </ul>
+     *    </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Contact Cloud Channel Support in this case. </li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + createEntitlement(com.google.cloud.channel.v1.CreateEntitlementRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateEntitlementMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Change parameters of the entitlement
+     * An entitlement parameters update is a long-running operation and results in
+     * updates to the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request. For example, if the number of seats being changed to is greater
+     * than the allowed number of max seats for the resource. Or decreasing seats
+     * for a commitment based plan.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * INTERNAL: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + changeParameters(com.google.cloud.channel.v1.ChangeParametersRequest request) { + return futureUnaryCall( + getChannel().newCall(getChangeParametersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the renewal settings for an existing customer entitlement.
+     * An entitlement update is a long-running operation and results in updates to
+     * the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a
+     * commitment plan. Can't enable or disable renewal for non-commitment plans.
+     * * INTERNAL: Any non user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + changeRenewalSettings(com.google.cloud.channel.v1.ChangeRenewalSettingsRequest request) { + return futureUnaryCall( + getChannel().newCall(getChangeRenewalSettingsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates the Offer for an existing customer entitlement.
+     * An entitlement update is a long-running operation and results in updates to
+     * the entitlement as a result of fulfillment.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Offer or Entitlement resource not found.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + changeOffer(com.google.cloud.channel.v1.ChangeOfferRequest request) { + return futureUnaryCall( + getChannel().newCall(getChangeOfferMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Starts paid service for a trial entitlement.
+     * Starts paid service for a trial entitlement immediately. This method is
+     * only applicable if a plan has already been set up for a trial entitlement
+     * but has some trial days remaining.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for
+     * entitlement on trial plans.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + startPaidService(com.google.cloud.channel.v1.StartPaidServiceRequest request) { + return futureUnaryCall( + getChannel().newCall(getStartPaidServiceMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Suspends a previously fulfilled entitlement.
+     * An entitlement suspension is a long-running operation.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * NOT_ACTIVE: Entitlement is not active.
+     * * INTERNAL: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + suspendEntitlement(com.google.cloud.channel.v1.SuspendEntitlementRequest request) { + return futureUnaryCall( + getChannel().newCall(getSuspendEntitlementMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Cancels a previously fulfilled entitlement.
+     * An entitlement cancellation is a long-running operation.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller or
+     * if the reseller account making the request and reseller account being
+     * queried for are different.
+     * * FAILED_PRECONDITION: If there are any Google Cloud projects linked to the
+     * Google Cloud entitlement's Cloud Billing subaccount.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace
+     * add-ons or entitlements for Google Cloud's development platform.
+     * * INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The response will contain
+     * google.protobuf.Empty on success. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + cancelEntitlement(com.google.cloud.channel.v1.CancelEntitlementRequest request) { + return futureUnaryCall( + getChannel().newCall(getCancelEntitlementMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Activates a previously suspended entitlement. The entitlement must be in a
+     * suspended state for it to be activated. Entitlements suspended for pending
+     * ToS acceptance can't be activated using this method. An entitlement
+     * activation is a long-running operation and can result in updates to
+     * the state of the customer entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller or
+     * if the reseller account making the request and reseller account being
+     * queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: Entitlement resource not found.
+     * * SUSPENSION_NOT_RESELLER_INITIATED: Can't activate an
+     * entitlement that is pending TOS acceptance. Only reseller initiated
+     * suspensions can be activated.
+     * * NOT_SUSPENDED: Can't activate entitlements that are already in ACTIVE
+     * state. Can only activate suspended entitlements.
+     * * INTERNAL: Any non-user error related to a technical issue
+     * in the backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in the backend.
+     * In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + activateEntitlement(com.google.cloud.channel.v1.ActivateEntitlementRequest request) { + return futureUnaryCall( + getChannel().newCall(getActivateEntitlementMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Transfers customer entitlements to new reseller.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the
+     * reseller.</li> <li> INVALID_ARGUMENT: Missing or invalid required
+     * parameters in the request. </li> <li> NOT_FOUND: If the customer or offer
+     * resource is not found for the reseller. </li> <li> ALREADY_EXISTS: If the
+     * SKU has been already transferred for the customer. </li> <li>
+     * CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the
+     * following cases: <ul>
+     *    <li> Transferring a SKU that requires domain verification and the
+     * domain has not been verified. </li>
+     *    <li> Transferring an Add-On SKU like Vault or Drive without transferring
+     * the pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for
+     * developer accounts: reseller and resold domain must follow the domain
+     * naming convention as follows:
+     *      <ul>
+     *         <li> Domain names must start with goog-test. </li>
+     *         <li> Resold domain names must include the reseller domain. </li>
+     *      </ul>
+     *   </li>
+     *   <li> All transferring entitlements must be specified. </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + transferEntitlements(com.google.cloud.channel.v1.TransferEntitlementsRequest request) { + return futureUnaryCall( + getChannel().newCall(getTransferEntitlementsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Transfers customer entitlements from current reseller to Google.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the customer doesn't belong to the reseller.
+     * </li> <li> INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request. </li>
+     * <li> NOT_FOUND: If the customer or offer resource is not found
+     * for the reseller. </li>
+     * <li> ALREADY_EXISTS: If the SKU has been already
+     * transferred for the customer. </li>
+     * <li> CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in
+     * the following cases:
+     * <ul>
+     *    <li> Transferring a SKU that requires domain verification and the
+     * domain has not been verified. </li>
+     *    <li> Transferring an Add-On SKU like Vault or Drive without purchasing
+     * the pre-requisite SKU, such as G Suite Basic </li> <li> Applicable only for
+     * developer accounts: reseller and resold domain must follow the domain
+     * naming convention as follows:
+     *      <ul>
+     *         <li> Domain names must start with goog-test. </li>
+     *         <li> Resold domain names must include the reseller domain. </li>
+     *      </ul>
+     *    </li>
+     * </ul>
+     * </li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. Please contact Cloud Channel Support in this case.</li>
+     * </ul>
+     * Return Value:
+     * <br/> Long Running Operation ID.
+     * To get the results of the operation, call the GetOperation method of
+     * CloudChannelOperationsService. The response will contain
+     * google.protobuf.Empty on success. The Operation metadata will contain an
+     * instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata].
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture + transferEntitlementsToGoogle( + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest request) { + return futureUnaryCall( + getChannel().newCall(getTransferEntitlementsToGoogleMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a distributor.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * Return Value:
+     * <br/> If successful, returns the list of [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources
+     * for the distributor account, otherwise returns an error.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse> + listChannelPartnerLinks( + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest request) { + return futureUnaryCall( + getChannel().newCall(getListChannelPartnerLinksMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Returns a requested [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * NOT_FOUND: ChannelPartnerLink resource not found. Results
+     * due invalid channel partner link name.
+     * Return Value:
+     * <br/> [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if found, otherwise returns an error.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ChannelPartnerLink> + getChannelPartnerLink(com.google.cloud.channel.v1.GetChannelPartnerLinkRequest request) { + return futureUnaryCall( + getChannel().newCall(getGetChannelPartnerLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Initiates a channel partner link between a distributor and a reseller or
+     * between resellers in an n-tier reseller channel.
+     * To accept the invite, the invited partner should follow the invite_link_uri
+     * provided in the response. If the link creation is accepted, a valid link is
+     * set up between the two involved parties.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different.
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * * ALREADY_EXISTS: If the ChannelPartnerLink sent in the request already
+     * exists.
+     * * NOT_FOUND: If no Cloud Identity customer exists for domain provided.
+     * * INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.
+     * * UNKNOWN: Any non-user error related to a technical issue in
+     * the backend. In this case, contact Cloud Channel support.
+     * Return Value:
+     * <br/> Newly created [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if successful,
+     * otherwise error is returned.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ChannelPartnerLink> + createChannelPartnerLink( + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest request) { + return futureUnaryCall( + getChannel().newCall(getCreateChannelPartnerLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Updates a channel partner link. A distributor calls this method to change a
+     * link's status. For example, suspend a partner link.
+     * To call this method, you must be a distributor.
+     * Possible Error Codes:
+     * <ul>
+     * <li> PERMISSION_DENIED: If the reseller account making the request and the
+     * reseller account being queried for are different. </li>
+     * <li> INVALID_ARGUMENT:
+     * <ul>
+     *   <li> Missing or invalid required parameters in the request. </li>
+     *   <li> Updating link state from invited to active or suspended. </li>
+     *   <li> Sending reseller_cloud_identity_id, invite_url or name in update
+     *   mask. </li>
+     * </ul>
+     * </li>
+     * <li> NOT_FOUND: ChannelPartnerLink resource not found.</li>
+     * <li> INTERNAL: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support. </li>
+     * <li> UNKNOWN: Any non-user error related to a technical issue in the
+     * backend. In this case, contact Cloud Channel support.</li>
+     * </ul>
+     * Return Value:
+     * <br/> If successful, the updated [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource, otherwise
+     * returns an error.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ChannelPartnerLink> + updateChannelPartnerLink( + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest request) { + return futureUnaryCall( + getChannel().newCall(getUpdateChannelPartnerLinkMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the Products the reseller is authorized to sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListProductsResponse> + listProducts(com.google.cloud.channel.v1.ListProductsRequest request) { + return futureUnaryCall( + getChannel().newCall(getListProductsMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the SKUs for a product the reseller is authorized to sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListSkusResponse> + listSkus(com.google.cloud.channel.v1.ListSkusRequest request) { + return futureUnaryCall(getChannel().newCall(getListSkusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the Offers the reseller can sell.
+     * Possible Error Codes:
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListOffersResponse> + listOffers(com.google.cloud.channel.v1.ListOffersRequest request) { + return futureUnaryCall( + getChannel().newCall(getListOffersMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the Purchasable SKUs for following cases:
+     * * SKUs that can be newly purchased for a customer
+     * * SKUs that can be upgraded/downgraded to, for an entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListPurchasableSkusResponse> + listPurchasableSkus(com.google.cloud.channel.v1.ListPurchasableSkusRequest request) { + return futureUnaryCall( + getChannel().newCall(getListPurchasableSkusMethod(), getCallOptions()), request); + } + + /** + * + * + *
+     * Lists the Purchasable Offers for the following cases:
+     * * Offers that can be newly purchased for a customer
+     * * Offers that can be changed to, for an entitlement.
+     * Possible Error Codes:
+     * * PERMISSION_DENIED: If the customer doesn't belong to the reseller
+     * * INVALID_ARGUMENT: Missing or invalid required parameters in the
+     * request.
+     * 
+ */ + public com.google.common.util.concurrent.ListenableFuture< + com.google.cloud.channel.v1.ListPurchasableOffersResponse> + listPurchasableOffers(com.google.cloud.channel.v1.ListPurchasableOffersRequest request) { + return futureUnaryCall( + getChannel().newCall(getListPurchasableOffersMethod(), getCallOptions()), request); + } + } + + private static final int METHODID_LIST_CUSTOMERS = 0; + private static final int METHODID_GET_CUSTOMER = 1; + private static final int METHODID_CHECK_CLOUD_IDENTITY_ACCOUNTS_EXIST = 2; + private static final int METHODID_CREATE_CUSTOMER = 3; + private static final int METHODID_UPDATE_CUSTOMER = 4; + private static final int METHODID_DELETE_CUSTOMER = 5; + private static final int METHODID_PROVISION_CLOUD_IDENTITY = 6; + private static final int METHODID_LIST_ENTITLEMENTS = 7; + private static final int METHODID_LIST_TRANSFERABLE_SKUS = 8; + private static final int METHODID_LIST_TRANSFERABLE_OFFERS = 9; + private static final int METHODID_GET_ENTITLEMENT = 10; + private static final int METHODID_CREATE_ENTITLEMENT = 11; + private static final int METHODID_CHANGE_PARAMETERS = 12; + private static final int METHODID_CHANGE_RENEWAL_SETTINGS = 13; + private static final int METHODID_CHANGE_OFFER = 14; + private static final int METHODID_START_PAID_SERVICE = 15; + private static final int METHODID_SUSPEND_ENTITLEMENT = 16; + private static final int METHODID_CANCEL_ENTITLEMENT = 17; + private static final int METHODID_ACTIVATE_ENTITLEMENT = 18; + private static final int METHODID_TRANSFER_ENTITLEMENTS = 19; + private static final int METHODID_TRANSFER_ENTITLEMENTS_TO_GOOGLE = 20; + private static final int METHODID_LIST_CHANNEL_PARTNER_LINKS = 21; + private static final int METHODID_GET_CHANNEL_PARTNER_LINK = 22; + private static final int METHODID_CREATE_CHANNEL_PARTNER_LINK = 23; + private static final int METHODID_UPDATE_CHANNEL_PARTNER_LINK = 24; + private static final int METHODID_LIST_PRODUCTS = 25; + private static final int METHODID_LIST_SKUS = 26; + private static final int METHODID_LIST_OFFERS = 27; + private static final int METHODID_LIST_PURCHASABLE_SKUS = 28; + private static final int METHODID_LIST_PURCHASABLE_OFFERS = 29; + + 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 CloudChannelServiceImplBase serviceImpl; + private final int methodId; + + MethodHandlers(CloudChannelServiceImplBase 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_CUSTOMERS: + serviceImpl.listCustomers( + (com.google.cloud.channel.v1.ListCustomersRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_GET_CUSTOMER: + serviceImpl.getCustomer( + (com.google.cloud.channel.v1.GetCustomerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CHECK_CLOUD_IDENTITY_ACCOUNTS_EXIST: + serviceImpl.checkCloudIdentityAccountsExist( + (com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse>) + responseObserver); + break; + case METHODID_CREATE_CUSTOMER: + serviceImpl.createCustomer( + (com.google.cloud.channel.v1.CreateCustomerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_UPDATE_CUSTOMER: + serviceImpl.updateCustomer( + (com.google.cloud.channel.v1.UpdateCustomerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_DELETE_CUSTOMER: + serviceImpl.deleteCustomer( + (com.google.cloud.channel.v1.DeleteCustomerRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_PROVISION_CLOUD_IDENTITY: + serviceImpl.provisionCloudIdentity( + (com.google.cloud.channel.v1.ProvisionCloudIdentityRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_ENTITLEMENTS: + serviceImpl.listEntitlements( + (com.google.cloud.channel.v1.ListEntitlementsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_TRANSFERABLE_SKUS: + serviceImpl.listTransferableSkus( + (com.google.cloud.channel.v1.ListTransferableSkusRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.channel.v1.ListTransferableSkusResponse>) + responseObserver); + break; + case METHODID_LIST_TRANSFERABLE_OFFERS: + serviceImpl.listTransferableOffers( + (com.google.cloud.channel.v1.ListTransferableOffersRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.channel.v1.ListTransferableOffersResponse>) + responseObserver); + break; + case METHODID_GET_ENTITLEMENT: + serviceImpl.getEntitlement( + (com.google.cloud.channel.v1.GetEntitlementRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_ENTITLEMENT: + serviceImpl.createEntitlement( + (com.google.cloud.channel.v1.CreateEntitlementRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CHANGE_PARAMETERS: + serviceImpl.changeParameters( + (com.google.cloud.channel.v1.ChangeParametersRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CHANGE_RENEWAL_SETTINGS: + serviceImpl.changeRenewalSettings( + (com.google.cloud.channel.v1.ChangeRenewalSettingsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CHANGE_OFFER: + serviceImpl.changeOffer( + (com.google.cloud.channel.v1.ChangeOfferRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_START_PAID_SERVICE: + serviceImpl.startPaidService( + (com.google.cloud.channel.v1.StartPaidServiceRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_SUSPEND_ENTITLEMENT: + serviceImpl.suspendEntitlement( + (com.google.cloud.channel.v1.SuspendEntitlementRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_CANCEL_ENTITLEMENT: + serviceImpl.cancelEntitlement( + (com.google.cloud.channel.v1.CancelEntitlementRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_ACTIVATE_ENTITLEMENT: + serviceImpl.activateEntitlement( + (com.google.cloud.channel.v1.ActivateEntitlementRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_TRANSFER_ENTITLEMENTS: + serviceImpl.transferEntitlements( + (com.google.cloud.channel.v1.TransferEntitlementsRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_TRANSFER_ENTITLEMENTS_TO_GOOGLE: + serviceImpl.transferEntitlementsToGoogle( + (com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest) request, + (io.grpc.stub.StreamObserver) responseObserver); + break; + case METHODID_LIST_CHANNEL_PARTNER_LINKS: + serviceImpl.listChannelPartnerLinks( + (com.google.cloud.channel.v1.ListChannelPartnerLinksRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse>) + responseObserver); + break; + case METHODID_GET_CHANNEL_PARTNER_LINK: + serviceImpl.getChannelPartnerLink( + (com.google.cloud.channel.v1.GetChannelPartnerLinkRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_CREATE_CHANNEL_PARTNER_LINK: + serviceImpl.createChannelPartnerLink( + (com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_UPDATE_CHANNEL_PARTNER_LINK: + serviceImpl.updateChannelPartnerLink( + (com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PRODUCTS: + serviceImpl.listProducts( + (com.google.cloud.channel.v1.ListProductsRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_SKUS: + serviceImpl.listSkus( + (com.google.cloud.channel.v1.ListSkusRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_OFFERS: + serviceImpl.listOffers( + (com.google.cloud.channel.v1.ListOffersRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PURCHASABLE_SKUS: + serviceImpl.listPurchasableSkus( + (com.google.cloud.channel.v1.ListPurchasableSkusRequest) request, + (io.grpc.stub.StreamObserver) + responseObserver); + break; + case METHODID_LIST_PURCHASABLE_OFFERS: + serviceImpl.listPurchasableOffers( + (com.google.cloud.channel.v1.ListPurchasableOffersRequest) request, + (io.grpc.stub.StreamObserver< + com.google.cloud.channel.v1.ListPurchasableOffersResponse>) + 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 CloudChannelServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoFileDescriptorSupplier, + io.grpc.protobuf.ProtoServiceDescriptorSupplier { + CloudChannelServiceBaseDescriptorSupplier() {} + + @java.lang.Override + public com.google.protobuf.Descriptors.FileDescriptor getFileDescriptor() { + return com.google.cloud.channel.v1.ServiceProto.getDescriptor(); + } + + @java.lang.Override + public com.google.protobuf.Descriptors.ServiceDescriptor getServiceDescriptor() { + return getFileDescriptor().findServiceByName("CloudChannelService"); + } + } + + private static final class CloudChannelServiceFileDescriptorSupplier + extends CloudChannelServiceBaseDescriptorSupplier { + CloudChannelServiceFileDescriptorSupplier() {} + } + + private static final class CloudChannelServiceMethodDescriptorSupplier + extends CloudChannelServiceBaseDescriptorSupplier + implements io.grpc.protobuf.ProtoMethodDescriptorSupplier { + private final String methodName; + + CloudChannelServiceMethodDescriptorSupplier(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 (CloudChannelServiceGrpc.class) { + result = serviceDescriptor; + if (result == null) { + serviceDescriptor = + result = + io.grpc.ServiceDescriptor.newBuilder(SERVICE_NAME) + .setSchemaDescriptor(new CloudChannelServiceFileDescriptorSupplier()) + .addMethod(getListCustomersMethod()) + .addMethod(getGetCustomerMethod()) + .addMethod(getCheckCloudIdentityAccountsExistMethod()) + .addMethod(getCreateCustomerMethod()) + .addMethod(getUpdateCustomerMethod()) + .addMethod(getDeleteCustomerMethod()) + .addMethod(getProvisionCloudIdentityMethod()) + .addMethod(getListEntitlementsMethod()) + .addMethod(getListTransferableSkusMethod()) + .addMethod(getListTransferableOffersMethod()) + .addMethod(getGetEntitlementMethod()) + .addMethod(getCreateEntitlementMethod()) + .addMethod(getChangeParametersMethod()) + .addMethod(getChangeRenewalSettingsMethod()) + .addMethod(getChangeOfferMethod()) + .addMethod(getStartPaidServiceMethod()) + .addMethod(getSuspendEntitlementMethod()) + .addMethod(getCancelEntitlementMethod()) + .addMethod(getActivateEntitlementMethod()) + .addMethod(getTransferEntitlementsMethod()) + .addMethod(getTransferEntitlementsToGoogleMethod()) + .addMethod(getListChannelPartnerLinksMethod()) + .addMethod(getGetChannelPartnerLinkMethod()) + .addMethod(getCreateChannelPartnerLinkMethod()) + .addMethod(getUpdateChannelPartnerLinkMethod()) + .addMethod(getListProductsMethod()) + .addMethod(getListSkusMethod()) + .addMethod(getListOffersMethod()) + .addMethod(getListPurchasableSkusMethod()) + .addMethod(getListPurchasableOffersMethod()) + .build(); + } + } + } + return result; + } +} diff --git a/java.header b/java.header new file mode 100644 index 00000000..3a9b503a --- /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 00000000..6597fced --- /dev/null +++ b/license-checks.xml @@ -0,0 +1,10 @@ + + + + + + + + diff --git a/pom.xml b/pom.xml new file mode 100644 index 00000000..e48f59be --- /dev/null +++ b/pom.xml @@ -0,0 +1,189 @@ + + + 4.0.0 + com.google.cloud + google-cloud-channel-parent + pom + 0.0.1-SNAPSHOT + Google Channel Services Parent + https://github.com/googleapis/java- + + Java idiomatic client for Google Cloud Platform services. + + + + com.google.cloud + google-cloud-shared-config + 0.9.2 + + + + + chingor + Jeff Ching + chingor@google.com + Google + + Developer + + + + + Google LLC + + + scm:git:git@github.com:googleapis/java-.git + scm:git:git@github.com:googleapis/java-.git + https://github.com/googleapis/java- + HEAD + + + https://github.com/googleapis/java-/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-channel-parent + + + + + + com.google.cloud + google-cloud-channel + 0.0.1-SNAPSHOT + + + com.google.api.grpc + proto-google-cloud-channel-v1 + 0.0.1-SNAPSHOT + + + com.google.api.grpc + grpc-google-cloud-channel-v1 + 0.0.1-SNAPSHOT + + + + com.google.cloud + google-cloud-shared-dependencies + 0.9.0 + pom + import + + + + + + + + + org.apache.maven.plugins + maven-dependency-plugin + + + org.objenesis:objenesis + javax.annotation:javax.annotation-api + + + + + + + + + google-cloud-channel + proto-google-cloud-channel-v1 + grpc-google-cloud-channel-v1 + google-cloud-channel-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-channel-v1/pom.xml b/proto-google-cloud-channel-v1/pom.xml new file mode 100644 index 00000000..0567f6a8 --- /dev/null +++ b/proto-google-cloud-channel-v1/pom.xml @@ -0,0 +1,42 @@ + + 4.0.0 + com.google.api.grpc + proto-google-cloud-channel-v1 + 0.0.1-SNAPSHOT + proto-google-cloud-channel-v1 + Proto library for google-cloud-channel + + com.google.cloud + google-cloud-channel-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-channel-v1/src/main/java/com/google/cloud/channel/v1/ActivateEntitlementRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ActivateEntitlementRequest.java new file mode 100644 index 00000000..72363d59 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ActivateEntitlementRequest.java @@ -0,0 +1,893 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.ActivateEntitlement][google.cloud.channel.v1.CloudChannelService.ActivateEntitlement].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ActivateEntitlementRequest} + */ +public final class ActivateEntitlementRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ActivateEntitlementRequest) + ActivateEntitlementRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ActivateEntitlementRequest.newBuilder() to construct. + private ActivateEntitlementRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ActivateEntitlementRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ActivateEntitlementRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ActivateEntitlementRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ActivateEntitlementRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ActivateEntitlementRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ActivateEntitlementRequest.class, + com.google.cloud.channel.v1.ActivateEntitlementRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the entitlement to activate.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the entitlement to activate.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ActivateEntitlementRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ActivateEntitlementRequest other = + (com.google.cloud.channel.v1.ActivateEntitlementRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ActivateEntitlementRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ActivateEntitlement][google.cloud.channel.v1.CloudChannelService.ActivateEntitlement].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ActivateEntitlementRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ActivateEntitlementRequest) + com.google.cloud.channel.v1.ActivateEntitlementRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ActivateEntitlementRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ActivateEntitlementRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ActivateEntitlementRequest.class, + com.google.cloud.channel.v1.ActivateEntitlementRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ActivateEntitlementRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ActivateEntitlementRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ActivateEntitlementRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ActivateEntitlementRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ActivateEntitlementRequest build() { + com.google.cloud.channel.v1.ActivateEntitlementRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ActivateEntitlementRequest buildPartial() { + com.google.cloud.channel.v1.ActivateEntitlementRequest result = + new com.google.cloud.channel.v1.ActivateEntitlementRequest(this); + result.name_ = name_; + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ActivateEntitlementRequest) { + return mergeFrom((com.google.cloud.channel.v1.ActivateEntitlementRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ActivateEntitlementRequest other) { + if (other == com.google.cloud.channel.v1.ActivateEntitlementRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ActivateEntitlementRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ActivateEntitlementRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the entitlement to activate.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the entitlement to activate.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the entitlement to activate.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the entitlement to activate.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the entitlement to activate.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ActivateEntitlementRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ActivateEntitlementRequest) + private static final com.google.cloud.channel.v1.ActivateEntitlementRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ActivateEntitlementRequest(); + } + + public static com.google.cloud.channel.v1.ActivateEntitlementRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ActivateEntitlementRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ActivateEntitlementRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ActivateEntitlementRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ActivateEntitlementRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ActivateEntitlementRequestOrBuilder.java new file mode 100644 index 00000000..573aeb6a --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ActivateEntitlementRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ActivateEntitlementRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ActivateEntitlementRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the entitlement to activate.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the entitlement to activate.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AdminUser.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AdminUser.java new file mode 100644 index 00000000..82679f5b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AdminUser.java @@ -0,0 +1,990 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/common.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Information needed to create an Admin User for Google Workspace.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.AdminUser} + */ +public final class AdminUser extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.AdminUser) + AdminUserOrBuilder { + private static final long serialVersionUID = 0L; + // Use AdminUser.newBuilder() to construct. + private AdminUser(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AdminUser() { + email_ = ""; + givenName_ = ""; + familyName_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AdminUser(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AdminUser( + 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(); + + email_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + givenName_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + familyName_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_AdminUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_AdminUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.AdminUser.class, + com.google.cloud.channel.v1.AdminUser.Builder.class); + } + + public static final int EMAIL_FIELD_NUMBER = 1; + private volatile java.lang.Object email_; + /** + * + * + *
+   * Primary email of the admin user.
+   * 
+ * + * string email = 1; + * + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } + } + /** + * + * + *
+   * Primary email of the admin user.
+   * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int GIVEN_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object givenName_; + /** + * + * + *
+   * Given name of the admin user.
+   * 
+ * + * string given_name = 2; + * + * @return The givenName. + */ + @java.lang.Override + public java.lang.String getGivenName() { + java.lang.Object ref = givenName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + givenName_ = s; + return s; + } + } + /** + * + * + *
+   * Given name of the admin user.
+   * 
+ * + * string given_name = 2; + * + * @return The bytes for givenName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getGivenNameBytes() { + java.lang.Object ref = givenName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + givenName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FAMILY_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object familyName_; + /** + * + * + *
+   * Family name of the admin user.
+   * 
+ * + * string family_name = 3; + * + * @return The familyName. + */ + @java.lang.Override + public java.lang.String getFamilyName() { + java.lang.Object ref = familyName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + familyName_ = s; + return s; + } + } + /** + * + * + *
+   * Family name of the admin user.
+   * 
+ * + * string family_name = 3; + * + * @return The bytes for familyName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFamilyNameBytes() { + java.lang.Object ref = familyName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + familyName_ = 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 (!getEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, email_); + } + if (!getGivenNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, givenName_); + } + if (!getFamilyNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, familyName_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEmailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, email_); + } + if (!getGivenNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, givenName_); + } + if (!getFamilyNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, familyName_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.AdminUser)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.AdminUser other = (com.google.cloud.channel.v1.AdminUser) obj; + + if (!getEmail().equals(other.getEmail())) return false; + if (!getGivenName().equals(other.getGivenName())) return false; + if (!getFamilyName().equals(other.getFamilyName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + hash = (37 * hash) + GIVEN_NAME_FIELD_NUMBER; + hash = (53 * hash) + getGivenName().hashCode(); + hash = (37 * hash) + FAMILY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFamilyName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.AdminUser parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.AdminUser parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.AdminUser parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.AdminUser parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.AdminUser parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.AdminUser parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.AdminUser parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.AdminUser parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.AdminUser parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.AdminUser parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.AdminUser parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.AdminUser parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.AdminUser prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Information needed to create an Admin User for Google Workspace.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.AdminUser} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.AdminUser) + com.google.cloud.channel.v1.AdminUserOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_AdminUser_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_AdminUser_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.AdminUser.class, + com.google.cloud.channel.v1.AdminUser.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.AdminUser.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + email_ = ""; + + givenName_ = ""; + + familyName_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_AdminUser_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.AdminUser getDefaultInstanceForType() { + return com.google.cloud.channel.v1.AdminUser.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.AdminUser build() { + com.google.cloud.channel.v1.AdminUser result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.AdminUser buildPartial() { + com.google.cloud.channel.v1.AdminUser result = + new com.google.cloud.channel.v1.AdminUser(this); + result.email_ = email_; + result.givenName_ = givenName_; + result.familyName_ = familyName_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.AdminUser) { + return mergeFrom((com.google.cloud.channel.v1.AdminUser) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.AdminUser other) { + if (other == com.google.cloud.channel.v1.AdminUser.getDefaultInstance()) return this; + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + onChanged(); + } + if (!other.getGivenName().isEmpty()) { + givenName_ = other.givenName_; + onChanged(); + } + if (!other.getFamilyName().isEmpty()) { + familyName_ = other.familyName_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.AdminUser parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.AdminUser) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object email_ = ""; + /** + * + * + *
+     * Primary email of the admin user.
+     * 
+ * + * string email = 1; + * + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Primary email of the admin user.
+     * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Primary email of the admin user.
+     * 
+ * + * string email = 1; + * + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + email_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Primary email of the admin user.
+     * 
+ * + * string email = 1; + * + * @return This builder for chaining. + */ + public Builder clearEmail() { + + email_ = getDefaultInstance().getEmail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Primary email of the admin user.
+     * 
+ * + * string email = 1; + * + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + email_ = value; + onChanged(); + return this; + } + + private java.lang.Object givenName_ = ""; + /** + * + * + *
+     * Given name of the admin user.
+     * 
+ * + * string given_name = 2; + * + * @return The givenName. + */ + public java.lang.String getGivenName() { + java.lang.Object ref = givenName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + givenName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Given name of the admin user.
+     * 
+ * + * string given_name = 2; + * + * @return The bytes for givenName. + */ + public com.google.protobuf.ByteString getGivenNameBytes() { + java.lang.Object ref = givenName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + givenName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Given name of the admin user.
+     * 
+ * + * string given_name = 2; + * + * @param value The givenName to set. + * @return This builder for chaining. + */ + public Builder setGivenName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + givenName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Given name of the admin user.
+     * 
+ * + * string given_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearGivenName() { + + givenName_ = getDefaultInstance().getGivenName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Given name of the admin user.
+     * 
+ * + * string given_name = 2; + * + * @param value The bytes for givenName to set. + * @return This builder for chaining. + */ + public Builder setGivenNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + givenName_ = value; + onChanged(); + return this; + } + + private java.lang.Object familyName_ = ""; + /** + * + * + *
+     * Family name of the admin user.
+     * 
+ * + * string family_name = 3; + * + * @return The familyName. + */ + public java.lang.String getFamilyName() { + java.lang.Object ref = familyName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + familyName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Family name of the admin user.
+     * 
+ * + * string family_name = 3; + * + * @return The bytes for familyName. + */ + public com.google.protobuf.ByteString getFamilyNameBytes() { + java.lang.Object ref = familyName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + familyName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Family name of the admin user.
+     * 
+ * + * string family_name = 3; + * + * @param value The familyName to set. + * @return This builder for chaining. + */ + public Builder setFamilyName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + familyName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Family name of the admin user.
+     * 
+ * + * string family_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearFamilyName() { + + familyName_ = getDefaultInstance().getFamilyName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Family name of the admin user.
+     * 
+ * + * string family_name = 3; + * + * @param value The bytes for familyName to set. + * @return This builder for chaining. + */ + public Builder setFamilyNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + familyName_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.AdminUser) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.AdminUser) + private static final com.google.cloud.channel.v1.AdminUser DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.AdminUser(); + } + + public static com.google.cloud.channel.v1.AdminUser getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AdminUser parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AdminUser(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.AdminUser getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AdminUserOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AdminUserOrBuilder.java new file mode 100644 index 00000000..21dbdf69 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AdminUserOrBuilder.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/cloud/channel/v1/common.proto + +package com.google.cloud.channel.v1; + +public interface AdminUserOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.AdminUser) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Primary email of the admin user.
+   * 
+ * + * string email = 1; + * + * @return The email. + */ + java.lang.String getEmail(); + /** + * + * + *
+   * Primary email of the admin user.
+   * 
+ * + * string email = 1; + * + * @return The bytes for email. + */ + com.google.protobuf.ByteString getEmailBytes(); + + /** + * + * + *
+   * Given name of the admin user.
+   * 
+ * + * string given_name = 2; + * + * @return The givenName. + */ + java.lang.String getGivenName(); + /** + * + * + *
+   * Given name of the admin user.
+   * 
+ * + * string given_name = 2; + * + * @return The bytes for givenName. + */ + com.google.protobuf.ByteString getGivenNameBytes(); + + /** + * + * + *
+   * Family name of the admin user.
+   * 
+ * + * string family_name = 3; + * + * @return The familyName. + */ + java.lang.String getFamilyName(); + /** + * + * + *
+   * Family name of the admin user.
+   * 
+ * + * string family_name = 3; + * + * @return The bytes for familyName. + */ + com.google.protobuf.ByteString getFamilyNameBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AssociationInfo.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AssociationInfo.java new file mode 100644 index 00000000..333bcb52 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AssociationInfo.java @@ -0,0 +1,634 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Association links that an entitlement has to other entitlements.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.AssociationInfo} + */ +public final class AssociationInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.AssociationInfo) + AssociationInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use AssociationInfo.newBuilder() to construct. + private AssociationInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private AssociationInfo() { + baseEntitlement_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new AssociationInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private AssociationInfo( + 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(); + + baseEntitlement_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_AssociationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_AssociationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.AssociationInfo.class, + com.google.cloud.channel.v1.AssociationInfo.Builder.class); + } + + public static final int BASE_ENTITLEMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object baseEntitlement_; + /** + * + * + *
+   * The name of the base entitlement, for which this entitlement is an add-on.
+   * 
+ * + * string base_entitlement = 1 [(.google.api.resource_reference) = { ... } + * + * @return The baseEntitlement. + */ + @java.lang.Override + public java.lang.String getBaseEntitlement() { + java.lang.Object ref = baseEntitlement_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseEntitlement_ = s; + return s; + } + } + /** + * + * + *
+   * The name of the base entitlement, for which this entitlement is an add-on.
+   * 
+ * + * string base_entitlement = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for baseEntitlement. + */ + @java.lang.Override + public com.google.protobuf.ByteString getBaseEntitlementBytes() { + java.lang.Object ref = baseEntitlement_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseEntitlement_ = 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 (!getBaseEntitlementBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, baseEntitlement_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getBaseEntitlementBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, baseEntitlement_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.AssociationInfo)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.AssociationInfo other = + (com.google.cloud.channel.v1.AssociationInfo) obj; + + if (!getBaseEntitlement().equals(other.getBaseEntitlement())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + BASE_ENTITLEMENT_FIELD_NUMBER; + hash = (53 * hash) + getBaseEntitlement().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.AssociationInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.AssociationInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.AssociationInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.AssociationInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.AssociationInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.AssociationInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.AssociationInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.AssociationInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.AssociationInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.AssociationInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.AssociationInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.AssociationInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.AssociationInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Association links that an entitlement has to other entitlements.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.AssociationInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.AssociationInfo) + com.google.cloud.channel.v1.AssociationInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_AssociationInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_AssociationInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.AssociationInfo.class, + com.google.cloud.channel.v1.AssociationInfo.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.AssociationInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + baseEntitlement_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_AssociationInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.AssociationInfo getDefaultInstanceForType() { + return com.google.cloud.channel.v1.AssociationInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.AssociationInfo build() { + com.google.cloud.channel.v1.AssociationInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.AssociationInfo buildPartial() { + com.google.cloud.channel.v1.AssociationInfo result = + new com.google.cloud.channel.v1.AssociationInfo(this); + result.baseEntitlement_ = baseEntitlement_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.AssociationInfo) { + return mergeFrom((com.google.cloud.channel.v1.AssociationInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.AssociationInfo other) { + if (other == com.google.cloud.channel.v1.AssociationInfo.getDefaultInstance()) return this; + if (!other.getBaseEntitlement().isEmpty()) { + baseEntitlement_ = other.baseEntitlement_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.AssociationInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.AssociationInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object baseEntitlement_ = ""; + /** + * + * + *
+     * The name of the base entitlement, for which this entitlement is an add-on.
+     * 
+ * + * string base_entitlement = 1 [(.google.api.resource_reference) = { ... } + * + * @return The baseEntitlement. + */ + public java.lang.String getBaseEntitlement() { + java.lang.Object ref = baseEntitlement_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + baseEntitlement_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The name of the base entitlement, for which this entitlement is an add-on.
+     * 
+ * + * string base_entitlement = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for baseEntitlement. + */ + public com.google.protobuf.ByteString getBaseEntitlementBytes() { + java.lang.Object ref = baseEntitlement_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + baseEntitlement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The name of the base entitlement, for which this entitlement is an add-on.
+     * 
+ * + * string base_entitlement = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The baseEntitlement to set. + * @return This builder for chaining. + */ + public Builder setBaseEntitlement(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + baseEntitlement_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the base entitlement, for which this entitlement is an add-on.
+     * 
+ * + * string base_entitlement = 1 [(.google.api.resource_reference) = { ... } + * + * @return This builder for chaining. + */ + public Builder clearBaseEntitlement() { + + baseEntitlement_ = getDefaultInstance().getBaseEntitlement(); + onChanged(); + return this; + } + /** + * + * + *
+     * The name of the base entitlement, for which this entitlement is an add-on.
+     * 
+ * + * string base_entitlement = 1 [(.google.api.resource_reference) = { ... } + * + * @param value The bytes for baseEntitlement to set. + * @return This builder for chaining. + */ + public Builder setBaseEntitlementBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + baseEntitlement_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.AssociationInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.AssociationInfo) + private static final com.google.cloud.channel.v1.AssociationInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.AssociationInfo(); + } + + public static com.google.cloud.channel.v1.AssociationInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AssociationInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AssociationInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.AssociationInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AssociationInfoOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AssociationInfoOrBuilder.java new file mode 100644 index 00000000..ca35368d --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/AssociationInfoOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +public interface AssociationInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.AssociationInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The name of the base entitlement, for which this entitlement is an add-on.
+   * 
+ * + * string base_entitlement = 1 [(.google.api.resource_reference) = { ... } + * + * @return The baseEntitlement. + */ + java.lang.String getBaseEntitlement(); + /** + * + * + *
+   * The name of the base entitlement, for which this entitlement is an add-on.
+   * 
+ * + * string base_entitlement = 1 [(.google.api.resource_reference) = { ... } + * + * @return The bytes for baseEntitlement. + */ + com.google.protobuf.ByteString getBaseEntitlementBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CancelEntitlementRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CancelEntitlementRequest.java new file mode 100644 index 00000000..e05d58aa --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CancelEntitlementRequest.java @@ -0,0 +1,892 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.CancelEntitlement][google.cloud.channel.v1.CloudChannelService.CancelEntitlement].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CancelEntitlementRequest} + */ +public final class CancelEntitlementRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.CancelEntitlementRequest) + CancelEntitlementRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CancelEntitlementRequest.newBuilder() to construct. + private CancelEntitlementRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CancelEntitlementRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CancelEntitlementRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CancelEntitlementRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CancelEntitlementRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CancelEntitlementRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CancelEntitlementRequest.class, + com.google.cloud.channel.v1.CancelEntitlementRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the entitlement to cancel.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the entitlement to cancel.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.CancelEntitlementRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.CancelEntitlementRequest other = + (com.google.cloud.channel.v1.CancelEntitlementRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.CancelEntitlementRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.CancelEntitlement][google.cloud.channel.v1.CloudChannelService.CancelEntitlement].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CancelEntitlementRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.CancelEntitlementRequest) + com.google.cloud.channel.v1.CancelEntitlementRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CancelEntitlementRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CancelEntitlementRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CancelEntitlementRequest.class, + com.google.cloud.channel.v1.CancelEntitlementRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.CancelEntitlementRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CancelEntitlementRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CancelEntitlementRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.CancelEntitlementRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.CancelEntitlementRequest build() { + com.google.cloud.channel.v1.CancelEntitlementRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CancelEntitlementRequest buildPartial() { + com.google.cloud.channel.v1.CancelEntitlementRequest result = + new com.google.cloud.channel.v1.CancelEntitlementRequest(this); + result.name_ = name_; + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.CancelEntitlementRequest) { + return mergeFrom((com.google.cloud.channel.v1.CancelEntitlementRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.CancelEntitlementRequest other) { + if (other == com.google.cloud.channel.v1.CancelEntitlementRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.CancelEntitlementRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.CancelEntitlementRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the entitlement to cancel.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the entitlement to cancel.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the entitlement to cancel.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the entitlement to cancel.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the entitlement to cancel.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.CancelEntitlementRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.CancelEntitlementRequest) + private static final com.google.cloud.channel.v1.CancelEntitlementRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.CancelEntitlementRequest(); + } + + public static com.google.cloud.channel.v1.CancelEntitlementRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CancelEntitlementRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CancelEntitlementRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CancelEntitlementRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CancelEntitlementRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CancelEntitlementRequestOrBuilder.java new file mode 100644 index 00000000..9269965b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CancelEntitlementRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface CancelEntitlementRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.CancelEntitlementRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the entitlement to cancel.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the entitlement to cancel.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeOfferRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeOfferRequest.java new file mode 100644 index 00000000..d9937615 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeOfferRequest.java @@ -0,0 +1,1807 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.ChangeOffer][google.cloud.channel.v1.CloudChannelService.ChangeOffer].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ChangeOfferRequest} + */ +public final class ChangeOfferRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ChangeOfferRequest) + ChangeOfferRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChangeOfferRequest.newBuilder() to construct. + private ChangeOfferRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChangeOfferRequest() { + name_ = ""; + offer_ = ""; + parameters_ = java.util.Collections.emptyList(); + purchaseOrderId_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeOfferRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ChangeOfferRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + offer_ = s; + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + parameters_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + parameters_.add( + input.readMessage( + com.google.cloud.channel.v1.Parameter.parser(), extensionRegistry)); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + purchaseOrderId_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeOfferRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeOfferRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ChangeOfferRequest.class, + com.google.cloud.channel.v1.ChangeOfferRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * Format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * Format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int OFFER_FIELD_NUMBER = 2; + private volatile java.lang.Object offer_; + /** + * + * + *
+   * Required. New Offer.
+   * Format: accounts/{account_id}/offers/{offer_id}.
+   * 
+ * + * + * string offer = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The offer. + */ + @java.lang.Override + public java.lang.String getOffer() { + java.lang.Object ref = offer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + offer_ = s; + return s; + } + } + /** + * + * + *
+   * Required. New Offer.
+   * Format: accounts/{account_id}/offers/{offer_id}.
+   * 
+ * + * + * string offer = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for offer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOfferBytes() { + java.lang.Object ref = offer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + offer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_FIELD_NUMBER = 3; + private java.util.List parameters_; + /** + * + * + *
+   * Optional. Parameters needed to purchase the Offer.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List getParametersList() { + return parameters_; + } + /** + * + * + *
+   * Optional. Parameters needed to purchase the Offer.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public java.util.List + getParametersOrBuilderList() { + return parameters_; + } + /** + * + * + *
+   * Optional. Parameters needed to purchase the Offer.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public int getParametersCount() { + return parameters_.size(); + } + /** + * + * + *
+   * Optional. Parameters needed to purchase the Offer.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.Parameter getParameters(int index) { + return parameters_.get(index); + } + /** + * + * + *
+   * Optional. Parameters needed to purchase the Offer.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ParameterOrBuilder getParametersOrBuilder(int index) { + return parameters_.get(index); + } + + public static final int PURCHASE_ORDER_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object purchaseOrderId_; + /** + * + * + *
+   * Optional. Purchase order id provided by the reseller.
+   * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The purchaseOrderId. + */ + @java.lang.Override + public java.lang.String getPurchaseOrderId() { + java.lang.Object ref = purchaseOrderId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + purchaseOrderId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Purchase order id provided by the reseller.
+   * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for purchaseOrderId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPurchaseOrderIdBytes() { + java.lang.Object ref = purchaseOrderId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + purchaseOrderId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getOfferBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, offer_); + } + for (int i = 0; i < parameters_.size(); i++) { + output.writeMessage(3, parameters_.get(i)); + } + if (!getPurchaseOrderIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, purchaseOrderId_); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getOfferBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, offer_); + } + for (int i = 0; i < parameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, parameters_.get(i)); + } + if (!getPurchaseOrderIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, purchaseOrderId_); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ChangeOfferRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ChangeOfferRequest other = + (com.google.cloud.channel.v1.ChangeOfferRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getOffer().equals(other.getOffer())) return false; + if (!getParametersList().equals(other.getParametersList())) return false; + if (!getPurchaseOrderId().equals(other.getPurchaseOrderId())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + OFFER_FIELD_NUMBER; + hash = (53 * hash) + getOffer().hashCode(); + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + hash = (37 * hash) + PURCHASE_ORDER_ID_FIELD_NUMBER; + hash = (53 * hash) + getPurchaseOrderId().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ChangeOfferRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ChangeOffer][google.cloud.channel.v1.CloudChannelService.ChangeOffer].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ChangeOfferRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ChangeOfferRequest) + com.google.cloud.channel.v1.ChangeOfferRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeOfferRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeOfferRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ChangeOfferRequest.class, + com.google.cloud.channel.v1.ChangeOfferRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ChangeOfferRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + offer_ = ""; + + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + parametersBuilder_.clear(); + } + purchaseOrderId_ = ""; + + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeOfferRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeOfferRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ChangeOfferRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeOfferRequest build() { + com.google.cloud.channel.v1.ChangeOfferRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeOfferRequest buildPartial() { + com.google.cloud.channel.v1.ChangeOfferRequest result = + new com.google.cloud.channel.v1.ChangeOfferRequest(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.offer_ = offer_; + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.build(); + } + result.purchaseOrderId_ = purchaseOrderId_; + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ChangeOfferRequest) { + return mergeFrom((com.google.cloud.channel.v1.ChangeOfferRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ChangeOfferRequest other) { + if (other == com.google.cloud.channel.v1.ChangeOfferRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getOffer().isEmpty()) { + offer_ = other.offer_; + onChanged(); + } + if (parametersBuilder_ == null) { + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + } else { + if (!other.parameters_.isEmpty()) { + if (parametersBuilder_.isEmpty()) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000001); + parametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParametersFieldBuilder() + : null; + } else { + parametersBuilder_.addAllMessages(other.parameters_); + } + } + } + if (!other.getPurchaseOrderId().isEmpty()) { + purchaseOrderId_ = other.purchaseOrderId_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ChangeOfferRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ChangeOfferRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object offer_ = ""; + /** + * + * + *
+     * Required. New Offer.
+     * Format: accounts/{account_id}/offers/{offer_id}.
+     * 
+ * + * + * string offer = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The offer. + */ + public java.lang.String getOffer() { + java.lang.Object ref = offer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + offer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. New Offer.
+     * Format: accounts/{account_id}/offers/{offer_id}.
+     * 
+ * + * + * string offer = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for offer. + */ + public com.google.protobuf.ByteString getOfferBytes() { + java.lang.Object ref = offer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + offer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. New Offer.
+     * Format: accounts/{account_id}/offers/{offer_id}.
+     * 
+ * + * + * string offer = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The offer to set. + * @return This builder for chaining. + */ + public Builder setOffer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + offer_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. New Offer.
+     * Format: accounts/{account_id}/offers/{offer_id}.
+     * 
+ * + * + * string offer = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearOffer() { + + offer_ = getDefaultInstance().getOffer(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. New Offer.
+     * Format: accounts/{account_id}/offers/{offer_id}.
+     * 
+ * + * + * string offer = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for offer to set. + * @return This builder for chaining. + */ + public Builder setOfferBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + offer_ = value; + onChanged(); + return this; + } + + private java.util.List parameters_ = + java.util.Collections.emptyList(); + + private void ensureParametersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + parameters_ = new java.util.ArrayList(parameters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Parameter, + com.google.cloud.channel.v1.Parameter.Builder, + com.google.cloud.channel.v1.ParameterOrBuilder> + parametersBuilder_; + + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List getParametersList() { + if (parametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(parameters_); + } else { + return parametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public int getParametersCount() { + if (parametersBuilder_ == null) { + return parameters_.size(); + } else { + return parametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.channel.v1.Parameter getParameters(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters(int index, com.google.cloud.channel.v1.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + onChanged(); + } else { + parametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setParameters( + int index, com.google.cloud.channel.v1.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.set(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters(com.google.cloud.channel.v1.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + onChanged(); + } else { + parametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters(int index, com.google.cloud.channel.v1.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(index, value); + onChanged(); + } else { + parametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters(com.google.cloud.channel.v1.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addParameters( + int index, com.google.cloud.channel.v1.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder addAllParameters( + java.lang.Iterable values) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); + onChanged(); + } else { + parametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + parametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder removeParameters(int index) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.remove(index); + onChanged(); + } else { + parametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.channel.v1.Parameter.Builder getParametersBuilder(int index) { + return getParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.channel.v1.ParameterOrBuilder getParametersOrBuilder(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getParametersOrBuilderList() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parameters_); + } + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.channel.v1.Parameter.Builder addParametersBuilder() { + return getParametersFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.Parameter.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.channel.v1.Parameter.Builder addParametersBuilder(int index) { + return getParametersFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Parameter.getDefaultInstance()); + } + /** + * + * + *
+     * Optional. Parameters needed to purchase the Offer.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public java.util.List + getParametersBuilderList() { + return getParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Parameter, + com.google.cloud.channel.v1.Parameter.Builder, + com.google.cloud.channel.v1.ParameterOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Parameter, + com.google.cloud.channel.v1.Parameter.Builder, + com.google.cloud.channel.v1.ParameterOrBuilder>( + parameters_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + private java.lang.Object purchaseOrderId_ = ""; + /** + * + * + *
+     * Optional. Purchase order id provided by the reseller.
+     * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The purchaseOrderId. + */ + public java.lang.String getPurchaseOrderId() { + java.lang.Object ref = purchaseOrderId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + purchaseOrderId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Purchase order id provided by the reseller.
+     * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for purchaseOrderId. + */ + public com.google.protobuf.ByteString getPurchaseOrderIdBytes() { + java.lang.Object ref = purchaseOrderId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + purchaseOrderId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Purchase order id provided by the reseller.
+     * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The purchaseOrderId to set. + * @return This builder for chaining. + */ + public Builder setPurchaseOrderId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + purchaseOrderId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Purchase order id provided by the reseller.
+     * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPurchaseOrderId() { + + purchaseOrderId_ = getDefaultInstance().getPurchaseOrderId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Purchase order id provided by the reseller.
+     * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for purchaseOrderId to set. + * @return This builder for chaining. + */ + public Builder setPurchaseOrderIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + purchaseOrderId_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ChangeOfferRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ChangeOfferRequest) + private static final com.google.cloud.channel.v1.ChangeOfferRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ChangeOfferRequest(); + } + + public static com.google.cloud.channel.v1.ChangeOfferRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChangeOfferRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ChangeOfferRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeOfferRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeOfferRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeOfferRequestOrBuilder.java new file mode 100644 index 00000000..9ba93eba --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeOfferRequestOrBuilder.java @@ -0,0 +1,215 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ChangeOfferRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ChangeOfferRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * Format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * Format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. New Offer.
+   * Format: accounts/{account_id}/offers/{offer_id}.
+   * 
+ * + * + * string offer = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The offer. + */ + java.lang.String getOffer(); + /** + * + * + *
+   * Required. New Offer.
+   * Format: accounts/{account_id}/offers/{offer_id}.
+   * 
+ * + * + * string offer = 2 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for offer. + */ + com.google.protobuf.ByteString getOfferBytes(); + + /** + * + * + *
+   * Optional. Parameters needed to purchase the Offer.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List getParametersList(); + /** + * + * + *
+   * Optional. Parameters needed to purchase the Offer.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.channel.v1.Parameter getParameters(int index); + /** + * + * + *
+   * Optional. Parameters needed to purchase the Offer.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + int getParametersCount(); + /** + * + * + *
+   * Optional. Parameters needed to purchase the Offer.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + java.util.List + getParametersOrBuilderList(); + /** + * + * + *
+   * Optional. Parameters needed to purchase the Offer.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.channel.v1.ParameterOrBuilder getParametersOrBuilder(int index); + + /** + * + * + *
+   * Optional. Purchase order id provided by the reseller.
+   * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The purchaseOrderId. + */ + java.lang.String getPurchaseOrderId(); + /** + * + * + *
+   * Optional. Purchase order id provided by the reseller.
+   * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for purchaseOrderId. + */ + com.google.protobuf.ByteString getPurchaseOrderIdBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeParametersRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeParametersRequest.java new file mode 100644 index 00000000..75330107 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeParametersRequest.java @@ -0,0 +1,1639 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.ChangeParametersRequest][].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ChangeParametersRequest} + */ +public final class ChangeParametersRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ChangeParametersRequest) + ChangeParametersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChangeParametersRequest.newBuilder() to construct. + private ChangeParametersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChangeParametersRequest() { + name_ = ""; + parameters_ = java.util.Collections.emptyList(); + requestId_ = ""; + purchaseOrderId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeParametersRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ChangeParametersRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + parameters_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + parameters_.add( + input.readMessage( + com.google.cloud.channel.v1.Parameter.parser(), extensionRegistry)); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + purchaseOrderId_ = 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)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeParametersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeParametersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ChangeParametersRequest.class, + com.google.cloud.channel.v1.ChangeParametersRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETERS_FIELD_NUMBER = 2; + private java.util.List parameters_; + /** + * + * + *
+   * Required. Entitlement parameters to update. Only editable parameters are allowed to
+   * be changed.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getParametersList() { + return parameters_; + } + /** + * + * + *
+   * Required. Entitlement parameters to update. Only editable parameters are allowed to
+   * be changed.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getParametersOrBuilderList() { + return parameters_; + } + /** + * + * + *
+   * Required. Entitlement parameters to update. Only editable parameters are allowed to
+   * be changed.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getParametersCount() { + return parameters_.size(); + } + /** + * + * + *
+   * Required. Entitlement parameters to update. Only editable parameters are allowed to
+   * be changed.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.Parameter getParameters(int index) { + return parameters_.get(index); + } + /** + * + * + *
+   * Required. Entitlement parameters to update. Only editable parameters are allowed to
+   * be changed.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ParameterOrBuilder getParametersOrBuilder(int index) { + return parameters_.get(index); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be
+   * a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that
+   * zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be
+   * a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that
+   * zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PURCHASE_ORDER_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object purchaseOrderId_; + /** + * + * + *
+   * Optional. Purchase order ID provided by the reseller.
+   * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The purchaseOrderId. + */ + @java.lang.Override + public java.lang.String getPurchaseOrderId() { + java.lang.Object ref = purchaseOrderId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + purchaseOrderId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Purchase order ID provided by the reseller.
+   * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for purchaseOrderId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPurchaseOrderIdBytes() { + java.lang.Object ref = purchaseOrderId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + purchaseOrderId_ = 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_); + } + for (int i = 0; i < parameters_.size(); i++) { + output.writeMessage(2, parameters_.get(i)); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requestId_); + } + if (!getPurchaseOrderIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, purchaseOrderId_); + } + 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_); + } + for (int i = 0; i < parameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, parameters_.get(i)); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, requestId_); + } + if (!getPurchaseOrderIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, purchaseOrderId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ChangeParametersRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ChangeParametersRequest other = + (com.google.cloud.channel.v1.ChangeParametersRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getParametersList().equals(other.getParametersList())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!getPurchaseOrderId().equals(other.getPurchaseOrderId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (37 * hash) + PURCHASE_ORDER_ID_FIELD_NUMBER; + hash = (53 * hash) + getPurchaseOrderId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ChangeParametersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ChangeParametersRequest][].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ChangeParametersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ChangeParametersRequest) + com.google.cloud.channel.v1.ChangeParametersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeParametersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeParametersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ChangeParametersRequest.class, + com.google.cloud.channel.v1.ChangeParametersRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ChangeParametersRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + parametersBuilder_.clear(); + } + requestId_ = ""; + + purchaseOrderId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeParametersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeParametersRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ChangeParametersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeParametersRequest build() { + com.google.cloud.channel.v1.ChangeParametersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeParametersRequest buildPartial() { + com.google.cloud.channel.v1.ChangeParametersRequest result = + new com.google.cloud.channel.v1.ChangeParametersRequest(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.build(); + } + result.requestId_ = requestId_; + result.purchaseOrderId_ = purchaseOrderId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ChangeParametersRequest) { + return mergeFrom((com.google.cloud.channel.v1.ChangeParametersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ChangeParametersRequest other) { + if (other == com.google.cloud.channel.v1.ChangeParametersRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (parametersBuilder_ == null) { + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + } else { + if (!other.parameters_.isEmpty()) { + if (parametersBuilder_.isEmpty()) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000001); + parametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParametersFieldBuilder() + : null; + } else { + parametersBuilder_.addAllMessages(other.parameters_); + } + } + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + if (!other.getPurchaseOrderId().isEmpty()) { + purchaseOrderId_ = other.purchaseOrderId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ChangeParametersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ChangeParametersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.util.List parameters_ = + java.util.Collections.emptyList(); + + private void ensureParametersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + parameters_ = new java.util.ArrayList(parameters_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Parameter, + com.google.cloud.channel.v1.Parameter.Builder, + com.google.cloud.channel.v1.ParameterOrBuilder> + parametersBuilder_; + + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getParametersList() { + if (parametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(parameters_); + } else { + return parametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getParametersCount() { + if (parametersBuilder_ == null) { + return parameters_.size(); + } else { + return parametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Parameter getParameters(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setParameters(int index, com.google.cloud.channel.v1.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + onChanged(); + } else { + parametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setParameters( + int index, com.google.cloud.channel.v1.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.set(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addParameters(com.google.cloud.channel.v1.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + onChanged(); + } else { + parametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addParameters(int index, com.google.cloud.channel.v1.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(index, value); + onChanged(); + } else { + parametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addParameters(com.google.cloud.channel.v1.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addParameters( + int index, com.google.cloud.channel.v1.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllParameters( + java.lang.Iterable values) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); + onChanged(); + } else { + parametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + parametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeParameters(int index) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.remove(index); + onChanged(); + } else { + parametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Parameter.Builder getParametersBuilder(int index) { + return getParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.ParameterOrBuilder getParametersOrBuilder(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getParametersOrBuilderList() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parameters_); + } + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Parameter.Builder addParametersBuilder() { + return getParametersFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.Parameter.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Parameter.Builder addParametersBuilder(int index) { + return getParametersFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Parameter.getDefaultInstance()); + } + /** + * + * + *
+     * Required. Entitlement parameters to update. Only editable parameters are allowed to
+     * be changed.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getParametersBuilderList() { + return getParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Parameter, + com.google.cloud.channel.v1.Parameter.Builder, + com.google.cloud.channel.v1.ParameterOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Parameter, + com.google.cloud.channel.v1.Parameter.Builder, + com.google.cloud.channel.v1.ParameterOrBuilder>( + parameters_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be
+     * a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that
+     * zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be
+     * a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that
+     * zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be
+     * a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that
+     * zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be
+     * a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that
+     * zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be
+     * a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that
+     * zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + private java.lang.Object purchaseOrderId_ = ""; + /** + * + * + *
+     * Optional. Purchase order ID provided by the reseller.
+     * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The purchaseOrderId. + */ + public java.lang.String getPurchaseOrderId() { + java.lang.Object ref = purchaseOrderId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + purchaseOrderId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Purchase order ID provided by the reseller.
+     * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for purchaseOrderId. + */ + public com.google.protobuf.ByteString getPurchaseOrderIdBytes() { + java.lang.Object ref = purchaseOrderId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + purchaseOrderId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Purchase order ID provided by the reseller.
+     * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The purchaseOrderId to set. + * @return This builder for chaining. + */ + public Builder setPurchaseOrderId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + purchaseOrderId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Purchase order ID provided by the reseller.
+     * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPurchaseOrderId() { + + purchaseOrderId_ = getDefaultInstance().getPurchaseOrderId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Purchase order ID provided by the reseller.
+     * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for purchaseOrderId to set. + * @return This builder for chaining. + */ + public Builder setPurchaseOrderIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + purchaseOrderId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ChangeParametersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ChangeParametersRequest) + private static final com.google.cloud.channel.v1.ChangeParametersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ChangeParametersRequest(); + } + + public static com.google.cloud.channel.v1.ChangeParametersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChangeParametersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ChangeParametersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeParametersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeParametersRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeParametersRequestOrBuilder.java new file mode 100644 index 00000000..650b2edb --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeParametersRequestOrBuilder.java @@ -0,0 +1,191 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ChangeParametersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ChangeParametersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Entitlement parameters to update. Only editable parameters are allowed to
+   * be changed.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getParametersList(); + /** + * + * + *
+   * Required. Entitlement parameters to update. Only editable parameters are allowed to
+   * be changed.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.Parameter getParameters(int index); + /** + * + * + *
+   * Required. Entitlement parameters to update. Only editable parameters are allowed to
+   * be changed.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getParametersCount(); + /** + * + * + *
+   * Required. Entitlement parameters to update. Only editable parameters are allowed to
+   * be changed.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getParametersOrBuilderList(); + /** + * + * + *
+   * Required. Entitlement parameters to update. Only editable parameters are allowed to
+   * be changed.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Parameter parameters = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.ParameterOrBuilder getParametersOrBuilder(int index); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be
+   * a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that
+   * zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be
+   * a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that
+   * zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); + + /** + * + * + *
+   * Optional. Purchase order ID provided by the reseller.
+   * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The purchaseOrderId. + */ + java.lang.String getPurchaseOrderId(); + /** + * + * + *
+   * Optional. Purchase order ID provided by the reseller.
+   * 
+ * + * string purchase_order_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for purchaseOrderId. + */ + com.google.protobuf.ByteString getPurchaseOrderIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeRenewalSettingsRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeRenewalSettingsRequest.java new file mode 100644 index 00000000..97fa6850 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeRenewalSettingsRequest.java @@ -0,0 +1,1195 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.ChangeRenewalSettings][google.cloud.channel.v1.CloudChannelService.ChangeRenewalSettings].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ChangeRenewalSettingsRequest} + */ +public final class ChangeRenewalSettingsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ChangeRenewalSettingsRequest) + ChangeRenewalSettingsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChangeRenewalSettingsRequest.newBuilder() to construct. + private ChangeRenewalSettingsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChangeRenewalSettingsRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeRenewalSettingsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ChangeRenewalSettingsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 34: + { + com.google.cloud.channel.v1.RenewalSettings.Builder subBuilder = null; + if (renewalSettings_ != null) { + subBuilder = renewalSettings_.toBuilder(); + } + renewalSettings_ = + input.readMessage( + com.google.cloud.channel.v1.RenewalSettings.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(renewalSettings_); + renewalSettings_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeRenewalSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeRenewalSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest.class, + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RENEWAL_SETTINGS_FIELD_NUMBER = 4; + private com.google.cloud.channel.v1.RenewalSettings renewalSettings_; + /** + * + * + *
+   * Required. New renewal settings.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the renewalSettings field is set. + */ + @java.lang.Override + public boolean hasRenewalSettings() { + return renewalSettings_ != null; + } + /** + * + * + *
+   * Required. New renewal settings.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The renewalSettings. + */ + @java.lang.Override + public com.google.cloud.channel.v1.RenewalSettings getRenewalSettings() { + return renewalSettings_ == null + ? com.google.cloud.channel.v1.RenewalSettings.getDefaultInstance() + : renewalSettings_; + } + /** + * + * + *
+   * Required. New renewal settings.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.RenewalSettingsOrBuilder getRenewalSettingsOrBuilder() { + return getRenewalSettings(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (renewalSettings_ != null) { + output.writeMessage(4, getRenewalSettings()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (renewalSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRenewalSettings()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ChangeRenewalSettingsRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest other = + (com.google.cloud.channel.v1.ChangeRenewalSettingsRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasRenewalSettings() != other.hasRenewalSettings()) return false; + if (hasRenewalSettings()) { + if (!getRenewalSettings().equals(other.getRenewalSettings())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasRenewalSettings()) { + hash = (37 * hash) + RENEWAL_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getRenewalSettings().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ChangeRenewalSettings][google.cloud.channel.v1.CloudChannelService.ChangeRenewalSettings].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ChangeRenewalSettingsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ChangeRenewalSettingsRequest) + com.google.cloud.channel.v1.ChangeRenewalSettingsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeRenewalSettingsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeRenewalSettingsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest.class, + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ChangeRenewalSettingsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (renewalSettingsBuilder_ == null) { + renewalSettings_ = null; + } else { + renewalSettings_ = null; + renewalSettingsBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ChangeRenewalSettingsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeRenewalSettingsRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ChangeRenewalSettingsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeRenewalSettingsRequest build() { + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeRenewalSettingsRequest buildPartial() { + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest result = + new com.google.cloud.channel.v1.ChangeRenewalSettingsRequest(this); + result.name_ = name_; + if (renewalSettingsBuilder_ == null) { + result.renewalSettings_ = renewalSettings_; + } else { + result.renewalSettings_ = renewalSettingsBuilder_.build(); + } + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ChangeRenewalSettingsRequest) { + return mergeFrom((com.google.cloud.channel.v1.ChangeRenewalSettingsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ChangeRenewalSettingsRequest other) { + if (other == com.google.cloud.channel.v1.ChangeRenewalSettingsRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasRenewalSettings()) { + mergeRenewalSettings(other.getRenewalSettings()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ChangeRenewalSettingsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ChangeRenewalSettingsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entitlement to update.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.RenewalSettings renewalSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.RenewalSettings, + com.google.cloud.channel.v1.RenewalSettings.Builder, + com.google.cloud.channel.v1.RenewalSettingsOrBuilder> + renewalSettingsBuilder_; + /** + * + * + *
+     * Required. New renewal settings.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the renewalSettings field is set. + */ + public boolean hasRenewalSettings() { + return renewalSettingsBuilder_ != null || renewalSettings_ != null; + } + /** + * + * + *
+     * Required. New renewal settings.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The renewalSettings. + */ + public com.google.cloud.channel.v1.RenewalSettings getRenewalSettings() { + if (renewalSettingsBuilder_ == null) { + return renewalSettings_ == null + ? com.google.cloud.channel.v1.RenewalSettings.getDefaultInstance() + : renewalSettings_; + } else { + return renewalSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. New renewal settings.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRenewalSettings(com.google.cloud.channel.v1.RenewalSettings value) { + if (renewalSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + renewalSettings_ = value; + onChanged(); + } else { + renewalSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. New renewal settings.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setRenewalSettings( + com.google.cloud.channel.v1.RenewalSettings.Builder builderForValue) { + if (renewalSettingsBuilder_ == null) { + renewalSettings_ = builderForValue.build(); + onChanged(); + } else { + renewalSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. New renewal settings.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeRenewalSettings(com.google.cloud.channel.v1.RenewalSettings value) { + if (renewalSettingsBuilder_ == null) { + if (renewalSettings_ != null) { + renewalSettings_ = + com.google.cloud.channel.v1.RenewalSettings.newBuilder(renewalSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + renewalSettings_ = value; + } + onChanged(); + } else { + renewalSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. New renewal settings.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearRenewalSettings() { + if (renewalSettingsBuilder_ == null) { + renewalSettings_ = null; + onChanged(); + } else { + renewalSettings_ = null; + renewalSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. New renewal settings.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.RenewalSettings.Builder getRenewalSettingsBuilder() { + + onChanged(); + return getRenewalSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. New renewal settings.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.RenewalSettingsOrBuilder getRenewalSettingsOrBuilder() { + if (renewalSettingsBuilder_ != null) { + return renewalSettingsBuilder_.getMessageOrBuilder(); + } else { + return renewalSettings_ == null + ? com.google.cloud.channel.v1.RenewalSettings.getDefaultInstance() + : renewalSettings_; + } + } + /** + * + * + *
+     * Required. New renewal settings.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.RenewalSettings, + com.google.cloud.channel.v1.RenewalSettings.Builder, + com.google.cloud.channel.v1.RenewalSettingsOrBuilder> + getRenewalSettingsFieldBuilder() { + if (renewalSettingsBuilder_ == null) { + renewalSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.RenewalSettings, + com.google.cloud.channel.v1.RenewalSettings.Builder, + com.google.cloud.channel.v1.RenewalSettingsOrBuilder>( + getRenewalSettings(), getParentForChildren(), isClean()); + renewalSettings_ = null; + } + return renewalSettingsBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ChangeRenewalSettingsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ChangeRenewalSettingsRequest) + private static final com.google.cloud.channel.v1.ChangeRenewalSettingsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ChangeRenewalSettingsRequest(); + } + + public static com.google.cloud.channel.v1.ChangeRenewalSettingsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChangeRenewalSettingsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ChangeRenewalSettingsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChangeRenewalSettingsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeRenewalSettingsRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeRenewalSettingsRequestOrBuilder.java new file mode 100644 index 00000000..e39e9de1 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChangeRenewalSettingsRequestOrBuilder.java @@ -0,0 +1,138 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ChangeRenewalSettingsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ChangeRenewalSettingsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the entitlement to update.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. New renewal settings.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the renewalSettings field is set. + */ + boolean hasRenewalSettings(); + /** + * + * + *
+   * Required. New renewal settings.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The renewalSettings. + */ + com.google.cloud.channel.v1.RenewalSettings getRenewalSettings(); + /** + * + * + *
+   * Required. New renewal settings.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.RenewalSettingsOrBuilder getRenewalSettingsOrBuilder(); + + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. A request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLink.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLink.java new file mode 100644 index 00000000..a9b483e1 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLink.java @@ -0,0 +1,2260 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/channel_partner_links.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Entity representing a link between distributors and their indirect
+ * resellers in an n-tier resale channel.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ChannelPartnerLink} + */ +public final class ChannelPartnerLink extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ChannelPartnerLink) + ChannelPartnerLinkOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChannelPartnerLink.newBuilder() to construct. + private ChannelPartnerLink(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChannelPartnerLink() { + name_ = ""; + resellerCloudIdentityId_ = ""; + linkState_ = 0; + inviteLinkUri_ = ""; + publicId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChannelPartnerLink(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ChannelPartnerLink( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + resellerCloudIdentityId_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + linkState_ = rawValue; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + inviteLinkUri_ = s; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + publicId_ = s; + break; + } + case 66: + { + com.google.cloud.channel.v1.CloudIdentityInfo.Builder subBuilder = null; + if (channelPartnerCloudIdentityInfo_ != null) { + subBuilder = channelPartnerCloudIdentityInfo_.toBuilder(); + } + channelPartnerCloudIdentityInfo_ = + input.readMessage( + com.google.cloud.channel.v1.CloudIdentityInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(channelPartnerCloudIdentityInfo_); + channelPartnerCloudIdentityInfo_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ChannelPartnerLinksProto + .internal_static_google_cloud_channel_v1_ChannelPartnerLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ChannelPartnerLinksProto + .internal_static_google_cloud_channel_v1_ChannelPartnerLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ChannelPartnerLink.class, + com.google.cloud.channel.v1.ChannelPartnerLink.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name for the channel partner link, in the format
+   * accounts/{account_id}/channelPartnerLinks/{id}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name for the channel partner link, in the format
+   * accounts/{account_id}/channelPartnerLinks/{id}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int RESELLER_CLOUD_IDENTITY_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object resellerCloudIdentityId_; + /** + * + * + *
+   * Required. Cloud Identity ID of the linked reseller.
+   * 
+ * + * string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resellerCloudIdentityId. + */ + @java.lang.Override + public java.lang.String getResellerCloudIdentityId() { + java.lang.Object ref = resellerCloudIdentityId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resellerCloudIdentityId_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Cloud Identity ID of the linked reseller.
+   * 
+ * + * string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resellerCloudIdentityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getResellerCloudIdentityIdBytes() { + java.lang.Object ref = resellerCloudIdentityId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resellerCloudIdentityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LINK_STATE_FIELD_NUMBER = 3; + private int linkState_; + /** + * + * + *
+   * Required. State of the channel partner link.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for linkState. + */ + @java.lang.Override + public int getLinkStateValue() { + return linkState_; + } + /** + * + * + *
+   * Required. State of the channel partner link.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The linkState. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLinkState getLinkState() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ChannelPartnerLinkState result = + com.google.cloud.channel.v1.ChannelPartnerLinkState.valueOf(linkState_); + return result == null + ? com.google.cloud.channel.v1.ChannelPartnerLinkState.UNRECOGNIZED + : result; + } + + public static final int INVITE_LINK_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object inviteLinkUri_; + /** + * + * + *
+   * Output only. URI of the web page where partner accepts the link invitation.
+   * 
+ * + * string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The inviteLinkUri. + */ + @java.lang.Override + public java.lang.String getInviteLinkUri() { + java.lang.Object ref = inviteLinkUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inviteLinkUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. URI of the web page where partner accepts the link invitation.
+   * 
+ * + * string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for inviteLinkUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getInviteLinkUriBytes() { + java.lang.Object ref = inviteLinkUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inviteLinkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int PUBLIC_ID_FIELD_NUMBER = 7; + private volatile java.lang.Object publicId_; + /** + * + * + *
+   * Output only. Public identifier that a customer must use to generate a transfer token
+   * to move to this distributor-reseller combination.
+   * 
+ * + * string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicId. + */ + @java.lang.Override + public java.lang.String getPublicId() { + java.lang.Object ref = publicId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Public identifier that a customer must use to generate a transfer token
+   * to move to this distributor-reseller combination.
+   * 
+ * + * string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPublicIdBytes() { + java.lang.Object ref = publicId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHANNEL_PARTNER_CLOUD_IDENTITY_INFO_FIELD_NUMBER = 8; + private com.google.cloud.channel.v1.CloudIdentityInfo channelPartnerCloudIdentityInfo_; + /** + * + * + *
+   * Output only. Cloud Identity info of the channel partner (IR).
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the channelPartnerCloudIdentityInfo field is set. + */ + @java.lang.Override + public boolean hasChannelPartnerCloudIdentityInfo() { + return channelPartnerCloudIdentityInfo_ != null; + } + /** + * + * + *
+   * Output only. Cloud Identity info of the channel partner (IR).
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The channelPartnerCloudIdentityInfo. + */ + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfo getChannelPartnerCloudIdentityInfo() { + return channelPartnerCloudIdentityInfo_ == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.getDefaultInstance() + : channelPartnerCloudIdentityInfo_; + } + /** + * + * + *
+   * Output only. Cloud Identity info of the channel partner (IR).
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder + getChannelPartnerCloudIdentityInfoOrBuilder() { + return getChannelPartnerCloudIdentityInfo(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getResellerCloudIdentityIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, resellerCloudIdentityId_); + } + if (linkState_ + != com.google.cloud.channel.v1.ChannelPartnerLinkState + .CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(3, linkState_); + } + if (!getInviteLinkUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, inviteLinkUri_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + if (!getPublicIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, publicId_); + } + if (channelPartnerCloudIdentityInfo_ != null) { + output.writeMessage(8, getChannelPartnerCloudIdentityInfo()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getResellerCloudIdentityIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, resellerCloudIdentityId_); + } + if (linkState_ + != com.google.cloud.channel.v1.ChannelPartnerLinkState + .CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, linkState_); + } + if (!getInviteLinkUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, inviteLinkUri_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (!getPublicIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, publicId_); + } + if (channelPartnerCloudIdentityInfo_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 8, getChannelPartnerCloudIdentityInfo()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ChannelPartnerLink)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ChannelPartnerLink other = + (com.google.cloud.channel.v1.ChannelPartnerLink) obj; + + if (!getName().equals(other.getName())) return false; + if (!getResellerCloudIdentityId().equals(other.getResellerCloudIdentityId())) return false; + if (linkState_ != other.linkState_) return false; + if (!getInviteLinkUri().equals(other.getInviteLinkUri())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getPublicId().equals(other.getPublicId())) return false; + if (hasChannelPartnerCloudIdentityInfo() != other.hasChannelPartnerCloudIdentityInfo()) + return false; + if (hasChannelPartnerCloudIdentityInfo()) { + if (!getChannelPartnerCloudIdentityInfo().equals(other.getChannelPartnerCloudIdentityInfo())) + return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + RESELLER_CLOUD_IDENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getResellerCloudIdentityId().hashCode(); + hash = (37 * hash) + LINK_STATE_FIELD_NUMBER; + hash = (53 * hash) + linkState_; + hash = (37 * hash) + INVITE_LINK_URI_FIELD_NUMBER; + hash = (53 * hash) + getInviteLinkUri().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + PUBLIC_ID_FIELD_NUMBER; + hash = (53 * hash) + getPublicId().hashCode(); + if (hasChannelPartnerCloudIdentityInfo()) { + hash = (37 * hash) + CHANNEL_PARTNER_CLOUD_IDENTITY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getChannelPartnerCloudIdentityInfo().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ChannelPartnerLink prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Entity representing a link between distributors and their indirect
+   * resellers in an n-tier resale channel.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ChannelPartnerLink} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ChannelPartnerLink) + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ChannelPartnerLinksProto + .internal_static_google_cloud_channel_v1_ChannelPartnerLink_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ChannelPartnerLinksProto + .internal_static_google_cloud_channel_v1_ChannelPartnerLink_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ChannelPartnerLink.class, + com.google.cloud.channel.v1.ChannelPartnerLink.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ChannelPartnerLink.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + resellerCloudIdentityId_ = ""; + + linkState_ = 0; + + inviteLinkUri_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + publicId_ = ""; + + if (channelPartnerCloudIdentityInfoBuilder_ == null) { + channelPartnerCloudIdentityInfo_ = null; + } else { + channelPartnerCloudIdentityInfo_ = null; + channelPartnerCloudIdentityInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ChannelPartnerLinksProto + .internal_static_google_cloud_channel_v1_ChannelPartnerLink_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLink getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLink build() { + com.google.cloud.channel.v1.ChannelPartnerLink result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLink buildPartial() { + com.google.cloud.channel.v1.ChannelPartnerLink result = + new com.google.cloud.channel.v1.ChannelPartnerLink(this); + result.name_ = name_; + result.resellerCloudIdentityId_ = resellerCloudIdentityId_; + result.linkState_ = linkState_; + result.inviteLinkUri_ = inviteLinkUri_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.publicId_ = publicId_; + if (channelPartnerCloudIdentityInfoBuilder_ == null) { + result.channelPartnerCloudIdentityInfo_ = channelPartnerCloudIdentityInfo_; + } else { + result.channelPartnerCloudIdentityInfo_ = channelPartnerCloudIdentityInfoBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ChannelPartnerLink) { + return mergeFrom((com.google.cloud.channel.v1.ChannelPartnerLink) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ChannelPartnerLink other) { + if (other == com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getResellerCloudIdentityId().isEmpty()) { + resellerCloudIdentityId_ = other.resellerCloudIdentityId_; + onChanged(); + } + if (other.linkState_ != 0) { + setLinkStateValue(other.getLinkStateValue()); + } + if (!other.getInviteLinkUri().isEmpty()) { + inviteLinkUri_ = other.inviteLinkUri_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getPublicId().isEmpty()) { + publicId_ = other.publicId_; + onChanged(); + } + if (other.hasChannelPartnerCloudIdentityInfo()) { + mergeChannelPartnerCloudIdentityInfo(other.getChannelPartnerCloudIdentityInfo()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ChannelPartnerLink parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ChannelPartnerLink) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name for the channel partner link, in the format
+     * accounts/{account_id}/channelPartnerLinks/{id}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name for the channel partner link, in the format
+     * accounts/{account_id}/channelPartnerLinks/{id}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name for the channel partner link, in the format
+     * accounts/{account_id}/channelPartnerLinks/{id}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name for the channel partner link, in the format
+     * accounts/{account_id}/channelPartnerLinks/{id}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name for the channel partner link, in the format
+     * accounts/{account_id}/channelPartnerLinks/{id}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object resellerCloudIdentityId_ = ""; + /** + * + * + *
+     * Required. Cloud Identity ID of the linked reseller.
+     * 
+ * + * string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resellerCloudIdentityId. + */ + public java.lang.String getResellerCloudIdentityId() { + java.lang.Object ref = resellerCloudIdentityId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + resellerCloudIdentityId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Cloud Identity ID of the linked reseller.
+     * 
+ * + * string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resellerCloudIdentityId. + */ + public com.google.protobuf.ByteString getResellerCloudIdentityIdBytes() { + java.lang.Object ref = resellerCloudIdentityId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + resellerCloudIdentityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Cloud Identity ID of the linked reseller.
+     * 
+ * + * string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The resellerCloudIdentityId to set. + * @return This builder for chaining. + */ + public Builder setResellerCloudIdentityId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + resellerCloudIdentityId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Cloud Identity ID of the linked reseller.
+     * 
+ * + * string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearResellerCloudIdentityId() { + + resellerCloudIdentityId_ = getDefaultInstance().getResellerCloudIdentityId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Cloud Identity ID of the linked reseller.
+     * 
+ * + * string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for resellerCloudIdentityId to set. + * @return This builder for chaining. + */ + public Builder setResellerCloudIdentityIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + resellerCloudIdentityId_ = value; + onChanged(); + return this; + } + + private int linkState_ = 0; + /** + * + * + *
+     * Required. State of the channel partner link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for linkState. + */ + @java.lang.Override + public int getLinkStateValue() { + return linkState_; + } + /** + * + * + *
+     * Required. State of the channel partner link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for linkState to set. + * @return This builder for chaining. + */ + public Builder setLinkStateValue(int value) { + + linkState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. State of the channel partner link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The linkState. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLinkState getLinkState() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ChannelPartnerLinkState result = + com.google.cloud.channel.v1.ChannelPartnerLinkState.valueOf(linkState_); + return result == null + ? com.google.cloud.channel.v1.ChannelPartnerLinkState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Required. State of the channel partner link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The linkState to set. + * @return This builder for chaining. + */ + public Builder setLinkState(com.google.cloud.channel.v1.ChannelPartnerLinkState value) { + if (value == null) { + throw new NullPointerException(); + } + + linkState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. State of the channel partner link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearLinkState() { + + linkState_ = 0; + onChanged(); + return this; + } + + private java.lang.Object inviteLinkUri_ = ""; + /** + * + * + *
+     * Output only. URI of the web page where partner accepts the link invitation.
+     * 
+ * + * string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The inviteLinkUri. + */ + public java.lang.String getInviteLinkUri() { + java.lang.Object ref = inviteLinkUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + inviteLinkUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. URI of the web page where partner accepts the link invitation.
+     * 
+ * + * string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for inviteLinkUri. + */ + public com.google.protobuf.ByteString getInviteLinkUriBytes() { + java.lang.Object ref = inviteLinkUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + inviteLinkUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. URI of the web page where partner accepts the link invitation.
+     * 
+ * + * string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The inviteLinkUri to set. + * @return This builder for chaining. + */ + public Builder setInviteLinkUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + inviteLinkUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. URI of the web page where partner accepts the link invitation.
+     * 
+ * + * string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearInviteLinkUri() { + + inviteLinkUri_ = getDefaultInstance().getInviteLinkUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. URI of the web page where partner accepts the link invitation.
+     * 
+ * + * string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for inviteLinkUri to set. + * @return This builder for chaining. + */ + public Builder setInviteLinkUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + inviteLinkUri_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. Timestamp of when the channel partner link is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object publicId_ = ""; + /** + * + * + *
+     * Output only. Public identifier that a customer must use to generate a transfer token
+     * to move to this distributor-reseller combination.
+     * 
+ * + * string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicId. + */ + public java.lang.String getPublicId() { + java.lang.Object ref = publicId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + publicId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Public identifier that a customer must use to generate a transfer token
+     * to move to this distributor-reseller combination.
+     * 
+ * + * string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicId. + */ + public com.google.protobuf.ByteString getPublicIdBytes() { + java.lang.Object ref = publicId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + publicId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Public identifier that a customer must use to generate a transfer token
+     * to move to this distributor-reseller combination.
+     * 
+ * + * string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The publicId to set. + * @return This builder for chaining. + */ + public Builder setPublicId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + publicId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Public identifier that a customer must use to generate a transfer token
+     * to move to this distributor-reseller combination.
+     * 
+ * + * string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPublicId() { + + publicId_ = getDefaultInstance().getPublicId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Public identifier that a customer must use to generate a transfer token
+     * to move to this distributor-reseller combination.
+     * 
+ * + * string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for publicId to set. + * @return This builder for chaining. + */ + public Builder setPublicIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + publicId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.CloudIdentityInfo channelPartnerCloudIdentityInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityInfo, + com.google.cloud.channel.v1.CloudIdentityInfo.Builder, + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder> + channelPartnerCloudIdentityInfoBuilder_; + /** + * + * + *
+     * Output only. Cloud Identity info of the channel partner (IR).
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the channelPartnerCloudIdentityInfo field is set. + */ + public boolean hasChannelPartnerCloudIdentityInfo() { + return channelPartnerCloudIdentityInfoBuilder_ != null + || channelPartnerCloudIdentityInfo_ != null; + } + /** + * + * + *
+     * Output only. Cloud Identity info of the channel partner (IR).
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The channelPartnerCloudIdentityInfo. + */ + public com.google.cloud.channel.v1.CloudIdentityInfo getChannelPartnerCloudIdentityInfo() { + if (channelPartnerCloudIdentityInfoBuilder_ == null) { + return channelPartnerCloudIdentityInfo_ == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.getDefaultInstance() + : channelPartnerCloudIdentityInfo_; + } else { + return channelPartnerCloudIdentityInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Cloud Identity info of the channel partner (IR).
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setChannelPartnerCloudIdentityInfo( + com.google.cloud.channel.v1.CloudIdentityInfo value) { + if (channelPartnerCloudIdentityInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + channelPartnerCloudIdentityInfo_ = value; + onChanged(); + } else { + channelPartnerCloudIdentityInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Cloud Identity info of the channel partner (IR).
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setChannelPartnerCloudIdentityInfo( + com.google.cloud.channel.v1.CloudIdentityInfo.Builder builderForValue) { + if (channelPartnerCloudIdentityInfoBuilder_ == null) { + channelPartnerCloudIdentityInfo_ = builderForValue.build(); + onChanged(); + } else { + channelPartnerCloudIdentityInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Cloud Identity info of the channel partner (IR).
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeChannelPartnerCloudIdentityInfo( + com.google.cloud.channel.v1.CloudIdentityInfo value) { + if (channelPartnerCloudIdentityInfoBuilder_ == null) { + if (channelPartnerCloudIdentityInfo_ != null) { + channelPartnerCloudIdentityInfo_ = + com.google.cloud.channel.v1.CloudIdentityInfo.newBuilder( + channelPartnerCloudIdentityInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + channelPartnerCloudIdentityInfo_ = value; + } + onChanged(); + } else { + channelPartnerCloudIdentityInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Cloud Identity info of the channel partner (IR).
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearChannelPartnerCloudIdentityInfo() { + if (channelPartnerCloudIdentityInfoBuilder_ == null) { + channelPartnerCloudIdentityInfo_ = null; + onChanged(); + } else { + channelPartnerCloudIdentityInfo_ = null; + channelPartnerCloudIdentityInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Cloud Identity info of the channel partner (IR).
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.channel.v1.CloudIdentityInfo.Builder + getChannelPartnerCloudIdentityInfoBuilder() { + + onChanged(); + return getChannelPartnerCloudIdentityInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Cloud Identity info of the channel partner (IR).
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder + getChannelPartnerCloudIdentityInfoOrBuilder() { + if (channelPartnerCloudIdentityInfoBuilder_ != null) { + return channelPartnerCloudIdentityInfoBuilder_.getMessageOrBuilder(); + } else { + return channelPartnerCloudIdentityInfo_ == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.getDefaultInstance() + : channelPartnerCloudIdentityInfo_; + } + } + /** + * + * + *
+     * Output only. Cloud Identity info of the channel partner (IR).
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityInfo, + com.google.cloud.channel.v1.CloudIdentityInfo.Builder, + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder> + getChannelPartnerCloudIdentityInfoFieldBuilder() { + if (channelPartnerCloudIdentityInfoBuilder_ == null) { + channelPartnerCloudIdentityInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityInfo, + com.google.cloud.channel.v1.CloudIdentityInfo.Builder, + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder>( + getChannelPartnerCloudIdentityInfo(), getParentForChildren(), isClean()); + channelPartnerCloudIdentityInfo_ = null; + } + return channelPartnerCloudIdentityInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ChannelPartnerLink) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ChannelPartnerLink) + private static final com.google.cloud.channel.v1.ChannelPartnerLink DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ChannelPartnerLink(); + } + + public static com.google.cloud.channel.v1.ChannelPartnerLink getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChannelPartnerLink parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ChannelPartnerLink(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLink getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinkOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinkOrBuilder.java new file mode 100644 index 00000000..3636c645 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinkOrBuilder.java @@ -0,0 +1,276 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/channel_partner_links.proto + +package com.google.cloud.channel.v1; + +public interface ChannelPartnerLinkOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ChannelPartnerLink) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name for the channel partner link, in the format
+   * accounts/{account_id}/channelPartnerLinks/{id}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name for the channel partner link, in the format
+   * accounts/{account_id}/channelPartnerLinks/{id}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Cloud Identity ID of the linked reseller.
+   * 
+ * + * string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The resellerCloudIdentityId. + */ + java.lang.String getResellerCloudIdentityId(); + /** + * + * + *
+   * Required. Cloud Identity ID of the linked reseller.
+   * 
+ * + * string reseller_cloud_identity_id = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for resellerCloudIdentityId. + */ + com.google.protobuf.ByteString getResellerCloudIdentityIdBytes(); + + /** + * + * + *
+   * Required. State of the channel partner link.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for linkState. + */ + int getLinkStateValue(); + /** + * + * + *
+   * Required. State of the channel partner link.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkState link_state = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The linkState. + */ + com.google.cloud.channel.v1.ChannelPartnerLinkState getLinkState(); + + /** + * + * + *
+   * Output only. URI of the web page where partner accepts the link invitation.
+   * 
+ * + * string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The inviteLinkUri. + */ + java.lang.String getInviteLinkUri(); + /** + * + * + *
+   * Output only. URI of the web page where partner accepts the link invitation.
+   * 
+ * + * string invite_link_uri = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for inviteLinkUri. + */ + com.google.protobuf.ByteString getInviteLinkUriBytes(); + + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. Timestamp of when the channel partner link is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Public identifier that a customer must use to generate a transfer token
+   * to move to this distributor-reseller combination.
+   * 
+ * + * string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The publicId. + */ + java.lang.String getPublicId(); + /** + * + * + *
+   * Output only. Public identifier that a customer must use to generate a transfer token
+   * to move to this distributor-reseller combination.
+   * 
+ * + * string public_id = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for publicId. + */ + com.google.protobuf.ByteString getPublicIdBytes(); + + /** + * + * + *
+   * Output only. Cloud Identity info of the channel partner (IR).
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the channelPartnerCloudIdentityInfo field is set. + */ + boolean hasChannelPartnerCloudIdentityInfo(); + /** + * + * + *
+   * Output only. Cloud Identity info of the channel partner (IR).
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The channelPartnerCloudIdentityInfo. + */ + com.google.cloud.channel.v1.CloudIdentityInfo getChannelPartnerCloudIdentityInfo(); + /** + * + * + *
+   * Output only. Cloud Identity info of the channel partner (IR).
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder + getChannelPartnerCloudIdentityInfoOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinkState.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinkState.java new file mode 100644 index 00000000..050d9953 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinkState.java @@ -0,0 +1,227 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/channel_partner_links.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * ChannelPartnerLinkState represents state of a channel partner link.
+ * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.ChannelPartnerLinkState} + */ +public enum ChannelPartnerLinkState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The state is not specified.
+   * 
+ * + * CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED = 0; + */ + CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED(0), + /** + * + * + *
+   * An invitation has been sent to the reseller to create a channel partner
+   * link.
+   * 
+ * + * INVITED = 1; + */ + INVITED(1), + /** + * + * + *
+   * Status when the reseller is active.
+   * 
+ * + * ACTIVE = 2; + */ + ACTIVE(2), + /** + * + * + *
+   * Status when the reseller has been revoked by the distributor.
+   * 
+ * + * REVOKED = 3; + */ + REVOKED(3), + /** + * + * + *
+   * Status when the reseller is suspended by Google or distributor.
+   * 
+ * + * SUSPENDED = 4; + */ + SUSPENDED(4), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The state is not specified.
+   * 
+ * + * CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED = 0; + */ + public static final int CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * An invitation has been sent to the reseller to create a channel partner
+   * link.
+   * 
+ * + * INVITED = 1; + */ + public static final int INVITED_VALUE = 1; + /** + * + * + *
+   * Status when the reseller is active.
+   * 
+ * + * ACTIVE = 2; + */ + public static final int ACTIVE_VALUE = 2; + /** + * + * + *
+   * Status when the reseller has been revoked by the distributor.
+   * 
+ * + * REVOKED = 3; + */ + public static final int REVOKED_VALUE = 3; + /** + * + * + *
+   * Status when the reseller is suspended by Google or distributor.
+   * 
+ * + * SUSPENDED = 4; + */ + public static final int SUSPENDED_VALUE = 4; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ChannelPartnerLinkState 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 ChannelPartnerLinkState forNumber(int value) { + switch (value) { + case 0: + return CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED; + case 1: + return INVITED; + case 2: + return ACTIVE; + case 3: + return REVOKED; + case 4: + return SUSPENDED; + 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 ChannelPartnerLinkState findValueByNumber(int number) { + return ChannelPartnerLinkState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.ChannelPartnerLinksProto.getDescriptor() + .getEnumTypes() + .get(1); + } + + private static final ChannelPartnerLinkState[] VALUES = values(); + + public static ChannelPartnerLinkState 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 ChannelPartnerLinkState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.ChannelPartnerLinkState) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinkView.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinkView.java new file mode 100644 index 00000000..b4bbcbc1 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinkView.java @@ -0,0 +1,185 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/channel_partner_links.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * The level of granularity the [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] will display.
+ * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.ChannelPartnerLinkView} + */ +public enum ChannelPartnerLinkView implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * The default / unset value.
+   * The API will default to the BASIC view.
+   * 
+ * + * UNSPECIFIED = 0; + */ + UNSPECIFIED(0), + /** + * + * + *
+   * Includes all fields except the
+   * [ChannelPartnerLink.channel_partner_cloud_identity_info][google.cloud.channel.v1.ChannelPartnerLink.channel_partner_cloud_identity_info].
+   * 
+ * + * BASIC = 1; + */ + BASIC(1), + /** + * + * + *
+   * Includes all fields.
+   * 
+ * + * FULL = 2; + */ + FULL(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * The default / unset value.
+   * The API will default to the BASIC view.
+   * 
+ * + * UNSPECIFIED = 0; + */ + public static final int UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Includes all fields except the
+   * [ChannelPartnerLink.channel_partner_cloud_identity_info][google.cloud.channel.v1.ChannelPartnerLink.channel_partner_cloud_identity_info].
+   * 
+ * + * BASIC = 1; + */ + public static final int BASIC_VALUE = 1; + /** + * + * + *
+   * Includes all fields.
+   * 
+ * + * FULL = 2; + */ + public static final int FULL_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ChannelPartnerLinkView 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 ChannelPartnerLinkView forNumber(int value) { + switch (value) { + case 0: + return UNSPECIFIED; + case 1: + return BASIC; + case 2: + 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 ChannelPartnerLinkView findValueByNumber(int number) { + return ChannelPartnerLinkView.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.ChannelPartnerLinksProto.getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ChannelPartnerLinkView[] VALUES = values(); + + public static ChannelPartnerLinkView 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 ChannelPartnerLinkView(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.ChannelPartnerLinkView) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinksProto.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinksProto.java new file mode 100644 index 00000000..9de8c52e --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ChannelPartnerLinksProto.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/channel_partner_links.proto + +package com.google.cloud.channel.v1; + +public final class ChannelPartnerLinksProto { + private ChannelPartnerLinksProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ChannelPartnerLink_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ChannelPartnerLink_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n3google/cloud/channel/v1/channel_partne" + + "r_links.proto\022\027google.cloud.channel.v1\032\037" + + "google/api/field_behavior.proto\032$google/" + + "cloud/channel/v1/common.proto\032\037google/pr" + + "otobuf/timestamp.proto\032\034google/api/annot" + + "ations.proto\"\233\003\n\022ChannelPartnerLink\022\021\n\004n" + + "ame\030\001 \001(\tB\003\340A\003\022\'\n\032reseller_cloud_identit" + + "y_id\030\002 \001(\tB\003\340A\002\022I\n\nlink_state\030\003 \001(\01620.go" + + "ogle.cloud.channel.v1.ChannelPartnerLink" + + "StateB\003\340A\002\022\034\n\017invite_link_uri\030\004 \001(\tB\003\340A\003" + + "\0224\n\013create_time\030\005 \001(\0132\032.google.protobuf." + + "TimestampB\003\340A\003\0224\n\013update_time\030\006 \001(\0132\032.go" + + "ogle.protobuf.TimestampB\003\340A\003\022\026\n\tpublic_i" + + "d\030\007 \001(\tB\003\340A\003\022\\\n#channel_partner_cloud_id" + + "entity_info\030\010 \001(\0132*.google.cloud.channel" + + ".v1.CloudIdentityInfoB\003\340A\003*>\n\026ChannelPar" + + "tnerLinkView\022\017\n\013UNSPECIFIED\020\000\022\t\n\005BASIC\020\001" + + "\022\010\n\004FULL\020\002*z\n\027ChannelPartnerLinkState\022*\n" + + "&CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED\020" + + "\000\022\013\n\007INVITED\020\001\022\n\n\006ACTIVE\020\002\022\013\n\007REVOKED\020\003\022" + + "\r\n\tSUSPENDED\020\004By\n\033com.google.cloud.chann" + + "el.v1B\030ChannelPartnerLinksProtoP\001Z>googl" + + "e.golang.org/genproto/googleapis/cloud/c" + + "hannel/v1;channelb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.cloud.channel.v1.CommonProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_channel_v1_ChannelPartnerLink_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_channel_v1_ChannelPartnerLink_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ChannelPartnerLink_descriptor, + new java.lang.String[] { + "Name", + "ResellerCloudIdentityId", + "LinkState", + "InviteLinkUri", + "CreateTime", + "UpdateTime", + "PublicId", + "ChannelPartnerCloudIdentityInfo", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.cloud.channel.v1.CommonProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistRequest.java new file mode 100644 index 00000000..b0ab1936 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistRequest.java @@ -0,0 +1,836 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.CheckCloudIdentityAccountsExist][google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest} + */ +public final class CheckCloudIdentityAccountsExistRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest) + CheckCloudIdentityAccountsExistRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CheckCloudIdentityAccountsExistRequest.newBuilder() to construct. + private CheckCloudIdentityAccountsExistRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CheckCloudIdentityAccountsExistRequest() { + parent_ = ""; + domain_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CheckCloudIdentityAccountsExistRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CheckCloudIdentityAccountsExistRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + domain_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest.class, + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the reseller account.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the reseller account.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOMAIN_FIELD_NUMBER = 2; + private volatile java.lang.Object domain_; + /** + * + * + *
+   * Required. Domain for which the Cloud Identity account customer is fetched.
+   * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The domain. + */ + @java.lang.Override + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Domain for which the Cloud Identity account customer is fetched.
+   * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for domain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getDomainBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, domain_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getDomainBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, domain_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest other = + (com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getDomain().equals(other.getDomain())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getDomain().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.CheckCloudIdentityAccountsExist][google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest) + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest.class, + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest.Builder.class); + } + + // Construct using + // com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + domain_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest + getDefaultInstanceForType() { + return com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest build() { + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest buildPartial() { + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest result = + new com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest(this); + result.parent_ = parent_; + result.domain_ = domain_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest) { + return mergeFrom( + (com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest other) { + if (other + == com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest + .getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getDomain().isEmpty()) { + domain_ = other.domain_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the reseller account.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller account.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller account.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller account.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller account.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object domain_ = ""; + /** + * + * + *
+     * Required. Domain for which the Cloud Identity account customer is fetched.
+     * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The domain. + */ + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Domain for which the Cloud Identity account customer is fetched.
+     * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for domain. + */ + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Domain for which the Cloud Identity account customer is fetched.
+     * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The domain to set. + * @return This builder for chaining. + */ + public Builder setDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + domain_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Domain for which the Cloud Identity account customer is fetched.
+     * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDomain() { + + domain_ = getDefaultInstance().getDomain(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Domain for which the Cloud Identity account customer is fetched.
+     * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for domain to set. + * @return This builder for chaining. + */ + public Builder setDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + domain_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest) + private static final com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest(); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckCloudIdentityAccountsExistRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CheckCloudIdentityAccountsExistRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistRequestOrBuilder.java new file mode 100644 index 00000000..fed7a571 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistRequestOrBuilder.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/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface CheckCloudIdentityAccountsExistRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.CheckCloudIdentityAccountsExistRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the reseller account.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the reseller account.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Domain for which the Cloud Identity account customer is fetched.
+   * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The domain. + */ + java.lang.String getDomain(); + /** + * + * + *
+   * Required. Domain for which the Cloud Identity account customer is fetched.
+   * 
+ * + * string domain = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for domain. + */ + com.google.protobuf.ByteString getDomainBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistResponse.java new file mode 100644 index 00000000..4e2b2cde --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistResponse.java @@ -0,0 +1,1041 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for
+ * [CloudChannelService.CheckCloudIdentityAccountsExist][google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse} + */ +public final class CheckCloudIdentityAccountsExistResponse + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse) + CheckCloudIdentityAccountsExistResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CheckCloudIdentityAccountsExistResponse.newBuilder() to construct. + private CheckCloudIdentityAccountsExistResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CheckCloudIdentityAccountsExistResponse() { + cloudIdentityAccounts_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CheckCloudIdentityAccountsExistResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CheckCloudIdentityAccountsExistResponse( + 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)) { + cloudIdentityAccounts_ = + new java.util.ArrayList< + com.google.cloud.channel.v1.CloudIdentityCustomerAccount>(); + mutable_bitField0_ |= 0x00000001; + } + cloudIdentityAccounts_.add( + input.readMessage( + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.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)) { + cloudIdentityAccounts_ = java.util.Collections.unmodifiableList(cloudIdentityAccounts_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse.class, + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse.Builder.class); + } + + public static final int CLOUD_IDENTITY_ACCOUNTS_FIELD_NUMBER = 1; + private java.util.List + cloudIdentityAccounts_; + /** + * + * + *
+   * The Cloud Identity accounts associated with the domain.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + @java.lang.Override + public java.util.List + getCloudIdentityAccountsList() { + return cloudIdentityAccounts_; + } + /** + * + * + *
+   * The Cloud Identity accounts associated with the domain.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + @java.lang.Override + public java.util.List + getCloudIdentityAccountsOrBuilderList() { + return cloudIdentityAccounts_; + } + /** + * + * + *
+   * The Cloud Identity accounts associated with the domain.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + @java.lang.Override + public int getCloudIdentityAccountsCount() { + return cloudIdentityAccounts_.size(); + } + /** + * + * + *
+   * The Cloud Identity accounts associated with the domain.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityCustomerAccount getCloudIdentityAccounts( + int index) { + return cloudIdentityAccounts_.get(index); + } + /** + * + * + *
+   * The Cloud Identity accounts associated with the domain.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityCustomerAccountOrBuilder + getCloudIdentityAccountsOrBuilder(int index) { + return cloudIdentityAccounts_.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 < cloudIdentityAccounts_.size(); i++) { + output.writeMessage(1, cloudIdentityAccounts_.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 < cloudIdentityAccounts_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 1, cloudIdentityAccounts_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse other = + (com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse) obj; + + if (!getCloudIdentityAccountsList().equals(other.getCloudIdentityAccountsList())) return false; + if (!unknownFields.equals(other.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 (getCloudIdentityAccountsCount() > 0) { + hash = (37 * hash) + CLOUD_IDENTITY_ACCOUNTS_FIELD_NUMBER; + hash = (53 * hash) + getCloudIdentityAccountsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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
+   * [CloudChannelService.CheckCloudIdentityAccountsExist][google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse) + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse.class, + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse.Builder.class); + } + + // Construct using + // com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCloudIdentityAccountsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (cloudIdentityAccountsBuilder_ == null) { + cloudIdentityAccounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + cloudIdentityAccountsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse + getDefaultInstanceForType() { + return com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse build() { + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse buildPartial() { + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse result = + new com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse(this); + int from_bitField0_ = bitField0_; + if (cloudIdentityAccountsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + cloudIdentityAccounts_ = java.util.Collections.unmodifiableList(cloudIdentityAccounts_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.cloudIdentityAccounts_ = cloudIdentityAccounts_; + } else { + result.cloudIdentityAccounts_ = cloudIdentityAccountsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse) { + return mergeFrom( + (com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse other) { + if (other + == com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse + .getDefaultInstance()) return this; + if (cloudIdentityAccountsBuilder_ == null) { + if (!other.cloudIdentityAccounts_.isEmpty()) { + if (cloudIdentityAccounts_.isEmpty()) { + cloudIdentityAccounts_ = other.cloudIdentityAccounts_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCloudIdentityAccountsIsMutable(); + cloudIdentityAccounts_.addAll(other.cloudIdentityAccounts_); + } + onChanged(); + } + } else { + if (!other.cloudIdentityAccounts_.isEmpty()) { + if (cloudIdentityAccountsBuilder_.isEmpty()) { + cloudIdentityAccountsBuilder_.dispose(); + cloudIdentityAccountsBuilder_ = null; + cloudIdentityAccounts_ = other.cloudIdentityAccounts_; + bitField0_ = (bitField0_ & ~0x00000001); + cloudIdentityAccountsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCloudIdentityAccountsFieldBuilder() + : null; + } else { + cloudIdentityAccountsBuilder_.addAllMessages(other.cloudIdentityAccounts_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List + cloudIdentityAccounts_ = java.util.Collections.emptyList(); + + private void ensureCloudIdentityAccountsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + cloudIdentityAccounts_ = + new java.util.ArrayList( + cloudIdentityAccounts_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityCustomerAccount, + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.Builder, + com.google.cloud.channel.v1.CloudIdentityCustomerAccountOrBuilder> + cloudIdentityAccountsBuilder_; + + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public java.util.List + getCloudIdentityAccountsList() { + if (cloudIdentityAccountsBuilder_ == null) { + return java.util.Collections.unmodifiableList(cloudIdentityAccounts_); + } else { + return cloudIdentityAccountsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public int getCloudIdentityAccountsCount() { + if (cloudIdentityAccountsBuilder_ == null) { + return cloudIdentityAccounts_.size(); + } else { + return cloudIdentityAccountsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public com.google.cloud.channel.v1.CloudIdentityCustomerAccount getCloudIdentityAccounts( + int index) { + if (cloudIdentityAccountsBuilder_ == null) { + return cloudIdentityAccounts_.get(index); + } else { + return cloudIdentityAccountsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public Builder setCloudIdentityAccounts( + int index, com.google.cloud.channel.v1.CloudIdentityCustomerAccount value) { + if (cloudIdentityAccountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCloudIdentityAccountsIsMutable(); + cloudIdentityAccounts_.set(index, value); + onChanged(); + } else { + cloudIdentityAccountsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public Builder setCloudIdentityAccounts( + int index, + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.Builder builderForValue) { + if (cloudIdentityAccountsBuilder_ == null) { + ensureCloudIdentityAccountsIsMutable(); + cloudIdentityAccounts_.set(index, builderForValue.build()); + onChanged(); + } else { + cloudIdentityAccountsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public Builder addCloudIdentityAccounts( + com.google.cloud.channel.v1.CloudIdentityCustomerAccount value) { + if (cloudIdentityAccountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCloudIdentityAccountsIsMutable(); + cloudIdentityAccounts_.add(value); + onChanged(); + } else { + cloudIdentityAccountsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public Builder addCloudIdentityAccounts( + int index, com.google.cloud.channel.v1.CloudIdentityCustomerAccount value) { + if (cloudIdentityAccountsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCloudIdentityAccountsIsMutable(); + cloudIdentityAccounts_.add(index, value); + onChanged(); + } else { + cloudIdentityAccountsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public Builder addCloudIdentityAccounts( + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.Builder builderForValue) { + if (cloudIdentityAccountsBuilder_ == null) { + ensureCloudIdentityAccountsIsMutable(); + cloudIdentityAccounts_.add(builderForValue.build()); + onChanged(); + } else { + cloudIdentityAccountsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public Builder addCloudIdentityAccounts( + int index, + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.Builder builderForValue) { + if (cloudIdentityAccountsBuilder_ == null) { + ensureCloudIdentityAccountsIsMutable(); + cloudIdentityAccounts_.add(index, builderForValue.build()); + onChanged(); + } else { + cloudIdentityAccountsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public Builder addAllCloudIdentityAccounts( + java.lang.Iterable + values) { + if (cloudIdentityAccountsBuilder_ == null) { + ensureCloudIdentityAccountsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, cloudIdentityAccounts_); + onChanged(); + } else { + cloudIdentityAccountsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public Builder clearCloudIdentityAccounts() { + if (cloudIdentityAccountsBuilder_ == null) { + cloudIdentityAccounts_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + cloudIdentityAccountsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public Builder removeCloudIdentityAccounts(int index) { + if (cloudIdentityAccountsBuilder_ == null) { + ensureCloudIdentityAccountsIsMutable(); + cloudIdentityAccounts_.remove(index); + onChanged(); + } else { + cloudIdentityAccountsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public com.google.cloud.channel.v1.CloudIdentityCustomerAccount.Builder + getCloudIdentityAccountsBuilder(int index) { + return getCloudIdentityAccountsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public com.google.cloud.channel.v1.CloudIdentityCustomerAccountOrBuilder + getCloudIdentityAccountsOrBuilder(int index) { + if (cloudIdentityAccountsBuilder_ == null) { + return cloudIdentityAccounts_.get(index); + } else { + return cloudIdentityAccountsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public java.util.List< + ? extends com.google.cloud.channel.v1.CloudIdentityCustomerAccountOrBuilder> + getCloudIdentityAccountsOrBuilderList() { + if (cloudIdentityAccountsBuilder_ != null) { + return cloudIdentityAccountsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(cloudIdentityAccounts_); + } + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public com.google.cloud.channel.v1.CloudIdentityCustomerAccount.Builder + addCloudIdentityAccountsBuilder() { + return getCloudIdentityAccountsFieldBuilder() + .addBuilder( + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.getDefaultInstance()); + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public com.google.cloud.channel.v1.CloudIdentityCustomerAccount.Builder + addCloudIdentityAccountsBuilder(int index) { + return getCloudIdentityAccountsFieldBuilder() + .addBuilder( + index, com.google.cloud.channel.v1.CloudIdentityCustomerAccount.getDefaultInstance()); + } + /** + * + * + *
+     * The Cloud Identity accounts associated with the domain.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + public java.util.List + getCloudIdentityAccountsBuilderList() { + return getCloudIdentityAccountsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityCustomerAccount, + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.Builder, + com.google.cloud.channel.v1.CloudIdentityCustomerAccountOrBuilder> + getCloudIdentityAccountsFieldBuilder() { + if (cloudIdentityAccountsBuilder_ == null) { + cloudIdentityAccountsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityCustomerAccount, + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.Builder, + com.google.cloud.channel.v1.CloudIdentityCustomerAccountOrBuilder>( + cloudIdentityAccounts_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + cloudIdentityAccounts_ = null; + } + return cloudIdentityAccountsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse) + private static final com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse(); + } + + public static com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CheckCloudIdentityAccountsExistResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CheckCloudIdentityAccountsExistResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistResponseOrBuilder.java new file mode 100644 index 00000000..61c6a80e --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CheckCloudIdentityAccountsExistResponseOrBuilder.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/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface CheckCloudIdentityAccountsExistResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.CheckCloudIdentityAccountsExistResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Cloud Identity accounts associated with the domain.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + java.util.List + getCloudIdentityAccountsList(); + /** + * + * + *
+   * The Cloud Identity accounts associated with the domain.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + com.google.cloud.channel.v1.CloudIdentityCustomerAccount getCloudIdentityAccounts(int index); + /** + * + * + *
+   * The Cloud Identity accounts associated with the domain.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + int getCloudIdentityAccountsCount(); + /** + * + * + *
+   * The Cloud Identity accounts associated with the domain.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + java.util.List + getCloudIdentityAccountsOrBuilderList(); + /** + * + * + *
+   * The Cloud Identity accounts associated with the domain.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityCustomerAccount cloud_identity_accounts = 1; + * + */ + com.google.cloud.channel.v1.CloudIdentityCustomerAccountOrBuilder + getCloudIdentityAccountsOrBuilder(int index); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityCustomerAccount.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityCustomerAccount.java new file mode 100644 index 00000000..658d6d78 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityCustomerAccount.java @@ -0,0 +1,1030 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Entity representing a Cloud Identity account which may or may not be
+ * associated with a Channel Services API partner.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CloudIdentityCustomerAccount} + */ +public final class CloudIdentityCustomerAccount extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.CloudIdentityCustomerAccount) + CloudIdentityCustomerAccountOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudIdentityCustomerAccount.newBuilder() to construct. + private CloudIdentityCustomerAccount(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudIdentityCustomerAccount() { + customerName_ = ""; + customerCloudIdentityId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudIdentityCustomerAccount(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CloudIdentityCustomerAccount( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + existing_ = input.readBool(); + break; + } + case 16: + { + owned_ = input.readBool(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + customerName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + customerCloudIdentityId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CloudIdentityCustomerAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CloudIdentityCustomerAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.class, + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.Builder.class); + } + + public static final int EXISTING_FIELD_NUMBER = 1; + private boolean existing_; + /** + * + * + *
+   * True if a Cloud Identity account exists for a specific domain.
+   * 
+ * + * bool existing = 1; + * + * @return The existing. + */ + @java.lang.Override + public boolean getExisting() { + return existing_; + } + + public static final int OWNED_FIELD_NUMBER = 2; + private boolean owned_; + /** + * + * + *
+   * True if the Cloud Identity account is associated with a customer
+   * belonging to the Channel Services partner making the API call.
+   * 
+ * + * bool owned = 2; + * + * @return The owned. + */ + @java.lang.Override + public boolean getOwned() { + return owned_; + } + + public static final int CUSTOMER_NAME_FIELD_NUMBER = 3; + private volatile java.lang.Object customerName_; + /** + * + * + *
+   * Name of the customer that owns the Cloud Identity account. This field is
+   * populated ONLY if owned = true.
+   * The customer_name takes the format:
+   * accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string customer_name = 3; + * + * @return The customerName. + */ + @java.lang.Override + public java.lang.String getCustomerName() { + java.lang.Object ref = customerName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customerName_ = s; + return s; + } + } + /** + * + * + *
+   * Name of the customer that owns the Cloud Identity account. This field is
+   * populated ONLY if owned = true.
+   * The customer_name takes the format:
+   * accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string customer_name = 3; + * + * @return The bytes for customerName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomerNameBytes() { + java.lang.Object ref = customerName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOMER_CLOUD_IDENTITY_ID_FIELD_NUMBER = 4; + private volatile java.lang.Object customerCloudIdentityId_; + /** + * + * + *
+   * Cloud Identity ID of the customer. This field is populated ONLY if
+   * existing = true.
+   * 
+ * + * string customer_cloud_identity_id = 4; + * + * @return The customerCloudIdentityId. + */ + @java.lang.Override + public java.lang.String getCustomerCloudIdentityId() { + java.lang.Object ref = customerCloudIdentityId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customerCloudIdentityId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud Identity ID of the customer. This field is populated ONLY if
+   * existing = true.
+   * 
+ * + * string customer_cloud_identity_id = 4; + * + * @return The bytes for customerCloudIdentityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomerCloudIdentityIdBytes() { + java.lang.Object ref = customerCloudIdentityId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerCloudIdentityId_ = 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 (existing_ != false) { + output.writeBool(1, existing_); + } + if (owned_ != false) { + output.writeBool(2, owned_); + } + if (!getCustomerNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, customerName_); + } + if (!getCustomerCloudIdentityIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, customerCloudIdentityId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (existing_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, existing_); + } + if (owned_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, owned_); + } + if (!getCustomerNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, customerName_); + } + if (!getCustomerCloudIdentityIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, customerCloudIdentityId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.CloudIdentityCustomerAccount)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.CloudIdentityCustomerAccount other = + (com.google.cloud.channel.v1.CloudIdentityCustomerAccount) obj; + + if (getExisting() != other.getExisting()) return false; + if (getOwned() != other.getOwned()) return false; + if (!getCustomerName().equals(other.getCustomerName())) return false; + if (!getCustomerCloudIdentityId().equals(other.getCustomerCloudIdentityId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + EXISTING_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExisting()); + hash = (37 * hash) + OWNED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOwned()); + hash = (37 * hash) + CUSTOMER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCustomerName().hashCode(); + hash = (37 * hash) + CUSTOMER_CLOUD_IDENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getCustomerCloudIdentityId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.CloudIdentityCustomerAccount prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Entity representing a Cloud Identity account which may or may not be
+   * associated with a Channel Services API partner.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CloudIdentityCustomerAccount} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.CloudIdentityCustomerAccount) + com.google.cloud.channel.v1.CloudIdentityCustomerAccountOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CloudIdentityCustomerAccount_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CloudIdentityCustomerAccount_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.class, + com.google.cloud.channel.v1.CloudIdentityCustomerAccount.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.CloudIdentityCustomerAccount.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + existing_ = false; + + owned_ = false; + + customerName_ = ""; + + customerCloudIdentityId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CloudIdentityCustomerAccount_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityCustomerAccount getDefaultInstanceForType() { + return com.google.cloud.channel.v1.CloudIdentityCustomerAccount.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityCustomerAccount build() { + com.google.cloud.channel.v1.CloudIdentityCustomerAccount result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityCustomerAccount buildPartial() { + com.google.cloud.channel.v1.CloudIdentityCustomerAccount result = + new com.google.cloud.channel.v1.CloudIdentityCustomerAccount(this); + result.existing_ = existing_; + result.owned_ = owned_; + result.customerName_ = customerName_; + result.customerCloudIdentityId_ = customerCloudIdentityId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.CloudIdentityCustomerAccount) { + return mergeFrom((com.google.cloud.channel.v1.CloudIdentityCustomerAccount) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.CloudIdentityCustomerAccount other) { + if (other == com.google.cloud.channel.v1.CloudIdentityCustomerAccount.getDefaultInstance()) + return this; + if (other.getExisting() != false) { + setExisting(other.getExisting()); + } + if (other.getOwned() != false) { + setOwned(other.getOwned()); + } + if (!other.getCustomerName().isEmpty()) { + customerName_ = other.customerName_; + onChanged(); + } + if (!other.getCustomerCloudIdentityId().isEmpty()) { + customerCloudIdentityId_ = other.customerCloudIdentityId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.CloudIdentityCustomerAccount parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.CloudIdentityCustomerAccount) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean existing_; + /** + * + * + *
+     * True if a Cloud Identity account exists for a specific domain.
+     * 
+ * + * bool existing = 1; + * + * @return The existing. + */ + @java.lang.Override + public boolean getExisting() { + return existing_; + } + /** + * + * + *
+     * True if a Cloud Identity account exists for a specific domain.
+     * 
+ * + * bool existing = 1; + * + * @param value The existing to set. + * @return This builder for chaining. + */ + public Builder setExisting(boolean value) { + + existing_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * True if a Cloud Identity account exists for a specific domain.
+     * 
+ * + * bool existing = 1; + * + * @return This builder for chaining. + */ + public Builder clearExisting() { + + existing_ = false; + onChanged(); + return this; + } + + private boolean owned_; + /** + * + * + *
+     * True if the Cloud Identity account is associated with a customer
+     * belonging to the Channel Services partner making the API call.
+     * 
+ * + * bool owned = 2; + * + * @return The owned. + */ + @java.lang.Override + public boolean getOwned() { + return owned_; + } + /** + * + * + *
+     * True if the Cloud Identity account is associated with a customer
+     * belonging to the Channel Services partner making the API call.
+     * 
+ * + * bool owned = 2; + * + * @param value The owned to set. + * @return This builder for chaining. + */ + public Builder setOwned(boolean value) { + + owned_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * True if the Cloud Identity account is associated with a customer
+     * belonging to the Channel Services partner making the API call.
+     * 
+ * + * bool owned = 2; + * + * @return This builder for chaining. + */ + public Builder clearOwned() { + + owned_ = false; + onChanged(); + return this; + } + + private java.lang.Object customerName_ = ""; + /** + * + * + *
+     * Name of the customer that owns the Cloud Identity account. This field is
+     * populated ONLY if owned = true.
+     * The customer_name takes the format:
+     * accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string customer_name = 3; + * + * @return The customerName. + */ + public java.lang.String getCustomerName() { + java.lang.Object ref = customerName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customerName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Name of the customer that owns the Cloud Identity account. This field is
+     * populated ONLY if owned = true.
+     * The customer_name takes the format:
+     * accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string customer_name = 3; + * + * @return The bytes for customerName. + */ + public com.google.protobuf.ByteString getCustomerNameBytes() { + java.lang.Object ref = customerName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Name of the customer that owns the Cloud Identity account. This field is
+     * populated ONLY if owned = true.
+     * The customer_name takes the format:
+     * accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string customer_name = 3; + * + * @param value The customerName to set. + * @return This builder for chaining. + */ + public Builder setCustomerName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customerName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the customer that owns the Cloud Identity account. This field is
+     * populated ONLY if owned = true.
+     * The customer_name takes the format:
+     * accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string customer_name = 3; + * + * @return This builder for chaining. + */ + public Builder clearCustomerName() { + + customerName_ = getDefaultInstance().getCustomerName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the customer that owns the Cloud Identity account. This field is
+     * populated ONLY if owned = true.
+     * The customer_name takes the format:
+     * accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string customer_name = 3; + * + * @param value The bytes for customerName to set. + * @return This builder for chaining. + */ + public Builder setCustomerNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customerName_ = value; + onChanged(); + return this; + } + + private java.lang.Object customerCloudIdentityId_ = ""; + /** + * + * + *
+     * Cloud Identity ID of the customer. This field is populated ONLY if
+     * existing = true.
+     * 
+ * + * string customer_cloud_identity_id = 4; + * + * @return The customerCloudIdentityId. + */ + public java.lang.String getCustomerCloudIdentityId() { + java.lang.Object ref = customerCloudIdentityId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customerCloudIdentityId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud Identity ID of the customer. This field is populated ONLY if
+     * existing = true.
+     * 
+ * + * string customer_cloud_identity_id = 4; + * + * @return The bytes for customerCloudIdentityId. + */ + public com.google.protobuf.ByteString getCustomerCloudIdentityIdBytes() { + java.lang.Object ref = customerCloudIdentityId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customerCloudIdentityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud Identity ID of the customer. This field is populated ONLY if
+     * existing = true.
+     * 
+ * + * string customer_cloud_identity_id = 4; + * + * @param value The customerCloudIdentityId to set. + * @return This builder for chaining. + */ + public Builder setCustomerCloudIdentityId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customerCloudIdentityId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud Identity ID of the customer. This field is populated ONLY if
+     * existing = true.
+     * 
+ * + * string customer_cloud_identity_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearCustomerCloudIdentityId() { + + customerCloudIdentityId_ = getDefaultInstance().getCustomerCloudIdentityId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud Identity ID of the customer. This field is populated ONLY if
+     * existing = true.
+     * 
+ * + * string customer_cloud_identity_id = 4; + * + * @param value The bytes for customerCloudIdentityId to set. + * @return This builder for chaining. + */ + public Builder setCustomerCloudIdentityIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customerCloudIdentityId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.CloudIdentityCustomerAccount) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.CloudIdentityCustomerAccount) + private static final com.google.cloud.channel.v1.CloudIdentityCustomerAccount DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.CloudIdentityCustomerAccount(); + } + + public static com.google.cloud.channel.v1.CloudIdentityCustomerAccount getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudIdentityCustomerAccount parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloudIdentityCustomerAccount(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityCustomerAccount getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityCustomerAccountOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityCustomerAccountOrBuilder.java new file mode 100644 index 00000000..39852e48 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityCustomerAccountOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface CloudIdentityCustomerAccountOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.CloudIdentityCustomerAccount) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * True if a Cloud Identity account exists for a specific domain.
+   * 
+ * + * bool existing = 1; + * + * @return The existing. + */ + boolean getExisting(); + + /** + * + * + *
+   * True if the Cloud Identity account is associated with a customer
+   * belonging to the Channel Services partner making the API call.
+   * 
+ * + * bool owned = 2; + * + * @return The owned. + */ + boolean getOwned(); + + /** + * + * + *
+   * Name of the customer that owns the Cloud Identity account. This field is
+   * populated ONLY if owned = true.
+   * The customer_name takes the format:
+   * accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string customer_name = 3; + * + * @return The customerName. + */ + java.lang.String getCustomerName(); + /** + * + * + *
+   * Name of the customer that owns the Cloud Identity account. This field is
+   * populated ONLY if owned = true.
+   * The customer_name takes the format:
+   * accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string customer_name = 3; + * + * @return The bytes for customerName. + */ + com.google.protobuf.ByteString getCustomerNameBytes(); + + /** + * + * + *
+   * Cloud Identity ID of the customer. This field is populated ONLY if
+   * existing = true.
+   * 
+ * + * string customer_cloud_identity_id = 4; + * + * @return The customerCloudIdentityId. + */ + java.lang.String getCustomerCloudIdentityId(); + /** + * + * + *
+   * Cloud Identity ID of the customer. This field is populated ONLY if
+   * existing = true.
+   * 
+ * + * string customer_cloud_identity_id = 4; + * + * @return The bytes for customerCloudIdentityId. + */ + com.google.protobuf.ByteString getCustomerCloudIdentityIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityInfo.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityInfo.java new file mode 100644 index 00000000..2214e25e --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityInfo.java @@ -0,0 +1,2031 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/common.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Cloud Identity information for the Cloud Channel Customer.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CloudIdentityInfo} + */ +public final class CloudIdentityInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.CloudIdentityInfo) + CloudIdentityInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use CloudIdentityInfo.newBuilder() to construct. + private CloudIdentityInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CloudIdentityInfo() { + customerType_ = 0; + primaryDomain_ = ""; + alternateEmail_ = ""; + phoneNumber_ = ""; + languageCode_ = ""; + adminConsoleUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CloudIdentityInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CloudIdentityInfo( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + customerType_ = rawValue; + break; + } + case 32: + { + isDomainVerified_ = input.readBool(); + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + alternateEmail_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + phoneNumber_ = s; + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + primaryDomain_ = s; + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + adminConsoleUri_ = s; + break; + } + case 178: + { + com.google.cloud.channel.v1.EduData.Builder subBuilder = null; + if (eduData_ != null) { + subBuilder = eduData_.toBuilder(); + } + eduData_ = + input.readMessage( + com.google.cloud.channel.v1.EduData.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(eduData_); + eduData_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_CloudIdentityInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_CloudIdentityInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CloudIdentityInfo.class, + com.google.cloud.channel.v1.CloudIdentityInfo.Builder.class); + } + + /** + * + * + *
+   * CustomerType of the customer
+   * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.CloudIdentityInfo.CustomerType} + */ + public enum CustomerType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This state doesn't show unless an error occurs.
+     * 
+ * + * CUSTOMER_TYPE_UNSPECIFIED = 0; + */ + CUSTOMER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Domain-owning customer which needs domain verification to use services.
+     * 
+ * + * DOMAIN = 1; + */ + DOMAIN(1), + /** + * + * + *
+     * Team customer which needs email verification to use services.
+     * 
+ * + * TEAM = 2; + */ + TEAM(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This state doesn't show unless an error occurs.
+     * 
+ * + * CUSTOMER_TYPE_UNSPECIFIED = 0; + */ + public static final int CUSTOMER_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Domain-owning customer which needs domain verification to use services.
+     * 
+ * + * DOMAIN = 1; + */ + public static final int DOMAIN_VALUE = 1; + /** + * + * + *
+     * Team customer which needs email verification to use services.
+     * 
+ * + * TEAM = 2; + */ + public static final int TEAM_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static CustomerType 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 CustomerType forNumber(int value) { + switch (value) { + case 0: + return CUSTOMER_TYPE_UNSPECIFIED; + case 1: + return DOMAIN; + case 2: + return TEAM; + 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 CustomerType findValueByNumber(int number) { + return CustomerType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.CloudIdentityInfo.getDescriptor().getEnumTypes().get(0); + } + + private static final CustomerType[] VALUES = values(); + + public static CustomerType 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 CustomerType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.CloudIdentityInfo.CustomerType) + } + + public static final int CUSTOMER_TYPE_FIELD_NUMBER = 1; + private int customerType_; + /** + * + * + *
+   * CustomerType indicates verification type needed for using services.
+   * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 1; + * + * @return The enum numeric value on the wire for customerType. + */ + @java.lang.Override + public int getCustomerTypeValue() { + return customerType_; + } + /** + * + * + *
+   * CustomerType indicates verification type needed for using services.
+   * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 1; + * + * @return The customerType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType getCustomerType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType result = + com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType.valueOf(customerType_); + return result == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType.UNRECOGNIZED + : result; + } + + public static final int PRIMARY_DOMAIN_FIELD_NUMBER = 9; + private volatile java.lang.Object primaryDomain_; + /** + * + * + *
+   * Output only. The primary domain name.
+   * 
+ * + * string primary_domain = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The primaryDomain. + */ + @java.lang.Override + public java.lang.String getPrimaryDomain() { + java.lang.Object ref = primaryDomain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + primaryDomain_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The primary domain name.
+   * 
+ * + * string primary_domain = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for primaryDomain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPrimaryDomainBytes() { + java.lang.Object ref = primaryDomain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryDomain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int IS_DOMAIN_VERIFIED_FIELD_NUMBER = 4; + private boolean isDomainVerified_; + /** + * + * + *
+   * Whether the domain is verified.
+   * 
+ * + * bool is_domain_verified = 4; + * + * @return The isDomainVerified. + */ + @java.lang.Override + public boolean getIsDomainVerified() { + return isDomainVerified_; + } + + public static final int ALTERNATE_EMAIL_FIELD_NUMBER = 6; + private volatile java.lang.Object alternateEmail_; + /** + * + * + *
+   * The alternate email.
+   * 
+ * + * string alternate_email = 6; + * + * @return The alternateEmail. + */ + @java.lang.Override + public java.lang.String getAlternateEmail() { + java.lang.Object ref = alternateEmail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alternateEmail_ = s; + return s; + } + } + /** + * + * + *
+   * The alternate email.
+   * 
+ * + * string alternate_email = 6; + * + * @return The bytes for alternateEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAlternateEmailBytes() { + java.lang.Object ref = alternateEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + alternateEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHONE_NUMBER_FIELD_NUMBER = 7; + private volatile java.lang.Object phoneNumber_; + /** + * + * + *
+   * Phone number associated with the Cloud Identity.
+   * 
+ * + * string phone_number = 7; + * + * @return The phoneNumber. + */ + @java.lang.Override + public java.lang.String getPhoneNumber() { + java.lang.Object ref = phoneNumber_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneNumber_ = s; + return s; + } + } + /** + * + * + *
+   * Phone number associated with the Cloud Identity.
+   * 
+ * + * string phone_number = 7; + * + * @return The bytes for phoneNumber. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPhoneNumberBytes() { + java.lang.Object ref = phoneNumber_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phoneNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 8; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * Language code.
+   * 
+ * + * string language_code = 8; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Language code.
+   * 
+ * + * string language_code = 8; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ADMIN_CONSOLE_URI_FIELD_NUMBER = 10; + private volatile java.lang.Object adminConsoleUri_; + /** + * + * + *
+   * Output only. URI of Customer's Admin console dashboard.
+   * 
+ * + * string admin_console_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The adminConsoleUri. + */ + @java.lang.Override + public java.lang.String getAdminConsoleUri() { + java.lang.Object ref = adminConsoleUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + adminConsoleUri_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. URI of Customer's Admin console dashboard.
+   * 
+ * + * string admin_console_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for adminConsoleUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAdminConsoleUriBytes() { + java.lang.Object ref = adminConsoleUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + adminConsoleUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EDU_DATA_FIELD_NUMBER = 22; + private com.google.cloud.channel.v1.EduData eduData_; + /** + * + * + *
+   * Edu information about the customer.
+   * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + * + * @return Whether the eduData field is set. + */ + @java.lang.Override + public boolean hasEduData() { + return eduData_ != null; + } + /** + * + * + *
+   * Edu information about the customer.
+   * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + * + * @return The eduData. + */ + @java.lang.Override + public com.google.cloud.channel.v1.EduData getEduData() { + return eduData_ == null ? com.google.cloud.channel.v1.EduData.getDefaultInstance() : eduData_; + } + /** + * + * + *
+   * Edu information about the customer.
+   * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + */ + @java.lang.Override + public com.google.cloud.channel.v1.EduDataOrBuilder getEduDataOrBuilder() { + return getEduData(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (customerType_ + != com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType.CUSTOMER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, customerType_); + } + if (isDomainVerified_ != false) { + output.writeBool(4, isDomainVerified_); + } + if (!getAlternateEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, alternateEmail_); + } + if (!getPhoneNumberBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, phoneNumber_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, languageCode_); + } + if (!getPrimaryDomainBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, primaryDomain_); + } + if (!getAdminConsoleUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, adminConsoleUri_); + } + if (eduData_ != null) { + output.writeMessage(22, getEduData()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (customerType_ + != com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType.CUSTOMER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, customerType_); + } + if (isDomainVerified_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, isDomainVerified_); + } + if (!getAlternateEmailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, alternateEmail_); + } + if (!getPhoneNumberBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, phoneNumber_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, languageCode_); + } + if (!getPrimaryDomainBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, primaryDomain_); + } + if (!getAdminConsoleUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, adminConsoleUri_); + } + if (eduData_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(22, getEduData()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.CloudIdentityInfo)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.CloudIdentityInfo other = + (com.google.cloud.channel.v1.CloudIdentityInfo) obj; + + if (customerType_ != other.customerType_) return false; + if (!getPrimaryDomain().equals(other.getPrimaryDomain())) return false; + if (getIsDomainVerified() != other.getIsDomainVerified()) return false; + if (!getAlternateEmail().equals(other.getAlternateEmail())) return false; + if (!getPhoneNumber().equals(other.getPhoneNumber())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getAdminConsoleUri().equals(other.getAdminConsoleUri())) return false; + if (hasEduData() != other.hasEduData()) return false; + if (hasEduData()) { + if (!getEduData().equals(other.getEduData())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + CUSTOMER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + customerType_; + hash = (37 * hash) + PRIMARY_DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getPrimaryDomain().hashCode(); + hash = (37 * hash) + IS_DOMAIN_VERIFIED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsDomainVerified()); + hash = (37 * hash) + ALTERNATE_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getAlternateEmail().hashCode(); + hash = (37 * hash) + PHONE_NUMBER_FIELD_NUMBER; + hash = (53 * hash) + getPhoneNumber().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (37 * hash) + ADMIN_CONSOLE_URI_FIELD_NUMBER; + hash = (53 * hash) + getAdminConsoleUri().hashCode(); + if (hasEduData()) { + hash = (37 * hash) + EDU_DATA_FIELD_NUMBER; + hash = (53 * hash) + getEduData().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.CloudIdentityInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Cloud Identity information for the Cloud Channel Customer.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CloudIdentityInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.CloudIdentityInfo) + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_CloudIdentityInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_CloudIdentityInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CloudIdentityInfo.class, + com.google.cloud.channel.v1.CloudIdentityInfo.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.CloudIdentityInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + customerType_ = 0; + + primaryDomain_ = ""; + + isDomainVerified_ = false; + + alternateEmail_ = ""; + + phoneNumber_ = ""; + + languageCode_ = ""; + + adminConsoleUri_ = ""; + + if (eduDataBuilder_ == null) { + eduData_ = null; + } else { + eduData_ = null; + eduDataBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_CloudIdentityInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfo getDefaultInstanceForType() { + return com.google.cloud.channel.v1.CloudIdentityInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfo build() { + com.google.cloud.channel.v1.CloudIdentityInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfo buildPartial() { + com.google.cloud.channel.v1.CloudIdentityInfo result = + new com.google.cloud.channel.v1.CloudIdentityInfo(this); + result.customerType_ = customerType_; + result.primaryDomain_ = primaryDomain_; + result.isDomainVerified_ = isDomainVerified_; + result.alternateEmail_ = alternateEmail_; + result.phoneNumber_ = phoneNumber_; + result.languageCode_ = languageCode_; + result.adminConsoleUri_ = adminConsoleUri_; + if (eduDataBuilder_ == null) { + result.eduData_ = eduData_; + } else { + result.eduData_ = eduDataBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.CloudIdentityInfo) { + return mergeFrom((com.google.cloud.channel.v1.CloudIdentityInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.CloudIdentityInfo other) { + if (other == com.google.cloud.channel.v1.CloudIdentityInfo.getDefaultInstance()) return this; + if (other.customerType_ != 0) { + setCustomerTypeValue(other.getCustomerTypeValue()); + } + if (!other.getPrimaryDomain().isEmpty()) { + primaryDomain_ = other.primaryDomain_; + onChanged(); + } + if (other.getIsDomainVerified() != false) { + setIsDomainVerified(other.getIsDomainVerified()); + } + if (!other.getAlternateEmail().isEmpty()) { + alternateEmail_ = other.alternateEmail_; + onChanged(); + } + if (!other.getPhoneNumber().isEmpty()) { + phoneNumber_ = other.phoneNumber_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (!other.getAdminConsoleUri().isEmpty()) { + adminConsoleUri_ = other.adminConsoleUri_; + onChanged(); + } + if (other.hasEduData()) { + mergeEduData(other.getEduData()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.CloudIdentityInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.CloudIdentityInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int customerType_ = 0; + /** + * + * + *
+     * CustomerType indicates verification type needed for using services.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 1; + * + * @return The enum numeric value on the wire for customerType. + */ + @java.lang.Override + public int getCustomerTypeValue() { + return customerType_; + } + /** + * + * + *
+     * CustomerType indicates verification type needed for using services.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 1; + * + * @param value The enum numeric value on the wire for customerType to set. + * @return This builder for chaining. + */ + public Builder setCustomerTypeValue(int value) { + + customerType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * CustomerType indicates verification type needed for using services.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 1; + * + * @return The customerType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType getCustomerType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType result = + com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType.valueOf(customerType_); + return result == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * CustomerType indicates verification type needed for using services.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 1; + * + * @param value The customerType to set. + * @return This builder for chaining. + */ + public Builder setCustomerType( + com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType value) { + if (value == null) { + throw new NullPointerException(); + } + + customerType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * CustomerType indicates verification type needed for using services.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearCustomerType() { + + customerType_ = 0; + onChanged(); + return this; + } + + private java.lang.Object primaryDomain_ = ""; + /** + * + * + *
+     * Output only. The primary domain name.
+     * 
+ * + * string primary_domain = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The primaryDomain. + */ + public java.lang.String getPrimaryDomain() { + java.lang.Object ref = primaryDomain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + primaryDomain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The primary domain name.
+     * 
+ * + * string primary_domain = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for primaryDomain. + */ + public com.google.protobuf.ByteString getPrimaryDomainBytes() { + java.lang.Object ref = primaryDomain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + primaryDomain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The primary domain name.
+     * 
+ * + * string primary_domain = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The primaryDomain to set. + * @return This builder for chaining. + */ + public Builder setPrimaryDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + primaryDomain_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The primary domain name.
+     * 
+ * + * string primary_domain = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearPrimaryDomain() { + + primaryDomain_ = getDefaultInstance().getPrimaryDomain(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The primary domain name.
+     * 
+ * + * string primary_domain = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for primaryDomain to set. + * @return This builder for chaining. + */ + public Builder setPrimaryDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + primaryDomain_ = value; + onChanged(); + return this; + } + + private boolean isDomainVerified_; + /** + * + * + *
+     * Whether the domain is verified.
+     * 
+ * + * bool is_domain_verified = 4; + * + * @return The isDomainVerified. + */ + @java.lang.Override + public boolean getIsDomainVerified() { + return isDomainVerified_; + } + /** + * + * + *
+     * Whether the domain is verified.
+     * 
+ * + * bool is_domain_verified = 4; + * + * @param value The isDomainVerified to set. + * @return This builder for chaining. + */ + public Builder setIsDomainVerified(boolean value) { + + isDomainVerified_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether the domain is verified.
+     * 
+ * + * bool is_domain_verified = 4; + * + * @return This builder for chaining. + */ + public Builder clearIsDomainVerified() { + + isDomainVerified_ = false; + onChanged(); + return this; + } + + private java.lang.Object alternateEmail_ = ""; + /** + * + * + *
+     * The alternate email.
+     * 
+ * + * string alternate_email = 6; + * + * @return The alternateEmail. + */ + public java.lang.String getAlternateEmail() { + java.lang.Object ref = alternateEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alternateEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The alternate email.
+     * 
+ * + * string alternate_email = 6; + * + * @return The bytes for alternateEmail. + */ + public com.google.protobuf.ByteString getAlternateEmailBytes() { + java.lang.Object ref = alternateEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + alternateEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The alternate email.
+     * 
+ * + * string alternate_email = 6; + * + * @param value The alternateEmail to set. + * @return This builder for chaining. + */ + public Builder setAlternateEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + alternateEmail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The alternate email.
+     * 
+ * + * string alternate_email = 6; + * + * @return This builder for chaining. + */ + public Builder clearAlternateEmail() { + + alternateEmail_ = getDefaultInstance().getAlternateEmail(); + onChanged(); + return this; + } + /** + * + * + *
+     * The alternate email.
+     * 
+ * + * string alternate_email = 6; + * + * @param value The bytes for alternateEmail to set. + * @return This builder for chaining. + */ + public Builder setAlternateEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + alternateEmail_ = value; + onChanged(); + return this; + } + + private java.lang.Object phoneNumber_ = ""; + /** + * + * + *
+     * Phone number associated with the Cloud Identity.
+     * 
+ * + * string phone_number = 7; + * + * @return The phoneNumber. + */ + public java.lang.String getPhoneNumber() { + java.lang.Object ref = phoneNumber_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phoneNumber_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Phone number associated with the Cloud Identity.
+     * 
+ * + * string phone_number = 7; + * + * @return The bytes for phoneNumber. + */ + public com.google.protobuf.ByteString getPhoneNumberBytes() { + java.lang.Object ref = phoneNumber_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phoneNumber_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Phone number associated with the Cloud Identity.
+     * 
+ * + * string phone_number = 7; + * + * @param value The phoneNumber to set. + * @return This builder for chaining. + */ + public Builder setPhoneNumber(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + phoneNumber_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Phone number associated with the Cloud Identity.
+     * 
+ * + * string phone_number = 7; + * + * @return This builder for chaining. + */ + public Builder clearPhoneNumber() { + + phoneNumber_ = getDefaultInstance().getPhoneNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Phone number associated with the Cloud Identity.
+     * 
+ * + * string phone_number = 7; + * + * @param value The bytes for phoneNumber to set. + * @return This builder for chaining. + */ + public Builder setPhoneNumberBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + phoneNumber_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Language code.
+     * 
+ * + * string language_code = 8; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Language code.
+     * 
+ * + * string language_code = 8; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Language code.
+     * 
+ * + * string language_code = 8; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Language code.
+     * 
+ * + * string language_code = 8; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Language code.
+     * 
+ * + * string language_code = 8; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private java.lang.Object adminConsoleUri_ = ""; + /** + * + * + *
+     * Output only. URI of Customer's Admin console dashboard.
+     * 
+ * + * string admin_console_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The adminConsoleUri. + */ + public java.lang.String getAdminConsoleUri() { + java.lang.Object ref = adminConsoleUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + adminConsoleUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. URI of Customer's Admin console dashboard.
+     * 
+ * + * string admin_console_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for adminConsoleUri. + */ + public com.google.protobuf.ByteString getAdminConsoleUriBytes() { + java.lang.Object ref = adminConsoleUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + adminConsoleUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. URI of Customer's Admin console dashboard.
+     * 
+ * + * string admin_console_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The adminConsoleUri to set. + * @return This builder for chaining. + */ + public Builder setAdminConsoleUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + adminConsoleUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. URI of Customer's Admin console dashboard.
+     * 
+ * + * string admin_console_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearAdminConsoleUri() { + + adminConsoleUri_ = getDefaultInstance().getAdminConsoleUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. URI of Customer's Admin console dashboard.
+     * 
+ * + * string admin_console_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for adminConsoleUri to set. + * @return This builder for chaining. + */ + public Builder setAdminConsoleUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + adminConsoleUri_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.EduData eduData_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.EduData, + com.google.cloud.channel.v1.EduData.Builder, + com.google.cloud.channel.v1.EduDataOrBuilder> + eduDataBuilder_; + /** + * + * + *
+     * Edu information about the customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + * + * @return Whether the eduData field is set. + */ + public boolean hasEduData() { + return eduDataBuilder_ != null || eduData_ != null; + } + /** + * + * + *
+     * Edu information about the customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + * + * @return The eduData. + */ + public com.google.cloud.channel.v1.EduData getEduData() { + if (eduDataBuilder_ == null) { + return eduData_ == null + ? com.google.cloud.channel.v1.EduData.getDefaultInstance() + : eduData_; + } else { + return eduDataBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Edu information about the customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + */ + public Builder setEduData(com.google.cloud.channel.v1.EduData value) { + if (eduDataBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + eduData_ = value; + onChanged(); + } else { + eduDataBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Edu information about the customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + */ + public Builder setEduData(com.google.cloud.channel.v1.EduData.Builder builderForValue) { + if (eduDataBuilder_ == null) { + eduData_ = builderForValue.build(); + onChanged(); + } else { + eduDataBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Edu information about the customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + */ + public Builder mergeEduData(com.google.cloud.channel.v1.EduData value) { + if (eduDataBuilder_ == null) { + if (eduData_ != null) { + eduData_ = + com.google.cloud.channel.v1.EduData.newBuilder(eduData_) + .mergeFrom(value) + .buildPartial(); + } else { + eduData_ = value; + } + onChanged(); + } else { + eduDataBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Edu information about the customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + */ + public Builder clearEduData() { + if (eduDataBuilder_ == null) { + eduData_ = null; + onChanged(); + } else { + eduData_ = null; + eduDataBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Edu information about the customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + */ + public com.google.cloud.channel.v1.EduData.Builder getEduDataBuilder() { + + onChanged(); + return getEduDataFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Edu information about the customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + */ + public com.google.cloud.channel.v1.EduDataOrBuilder getEduDataOrBuilder() { + if (eduDataBuilder_ != null) { + return eduDataBuilder_.getMessageOrBuilder(); + } else { + return eduData_ == null + ? com.google.cloud.channel.v1.EduData.getDefaultInstance() + : eduData_; + } + } + /** + * + * + *
+     * Edu information about the customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.EduData, + com.google.cloud.channel.v1.EduData.Builder, + com.google.cloud.channel.v1.EduDataOrBuilder> + getEduDataFieldBuilder() { + if (eduDataBuilder_ == null) { + eduDataBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.EduData, + com.google.cloud.channel.v1.EduData.Builder, + com.google.cloud.channel.v1.EduDataOrBuilder>( + getEduData(), getParentForChildren(), isClean()); + eduData_ = null; + } + return eduDataBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.CloudIdentityInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.CloudIdentityInfo) + private static final com.google.cloud.channel.v1.CloudIdentityInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.CloudIdentityInfo(); + } + + public static com.google.cloud.channel.v1.CloudIdentityInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CloudIdentityInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CloudIdentityInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityInfoOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityInfoOrBuilder.java new file mode 100644 index 00000000..e462bf8b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CloudIdentityInfoOrBuilder.java @@ -0,0 +1,223 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/common.proto + +package com.google.cloud.channel.v1; + +public interface CloudIdentityInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.CloudIdentityInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * CustomerType indicates verification type needed for using services.
+   * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 1; + * + * @return The enum numeric value on the wire for customerType. + */ + int getCustomerTypeValue(); + /** + * + * + *
+   * CustomerType indicates verification type needed for using services.
+   * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo.CustomerType customer_type = 1; + * + * @return The customerType. + */ + com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType getCustomerType(); + + /** + * + * + *
+   * Output only. The primary domain name.
+   * 
+ * + * string primary_domain = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The primaryDomain. + */ + java.lang.String getPrimaryDomain(); + /** + * + * + *
+   * Output only. The primary domain name.
+   * 
+ * + * string primary_domain = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for primaryDomain. + */ + com.google.protobuf.ByteString getPrimaryDomainBytes(); + + /** + * + * + *
+   * Whether the domain is verified.
+   * 
+ * + * bool is_domain_verified = 4; + * + * @return The isDomainVerified. + */ + boolean getIsDomainVerified(); + + /** + * + * + *
+   * The alternate email.
+   * 
+ * + * string alternate_email = 6; + * + * @return The alternateEmail. + */ + java.lang.String getAlternateEmail(); + /** + * + * + *
+   * The alternate email.
+   * 
+ * + * string alternate_email = 6; + * + * @return The bytes for alternateEmail. + */ + com.google.protobuf.ByteString getAlternateEmailBytes(); + + /** + * + * + *
+   * Phone number associated with the Cloud Identity.
+   * 
+ * + * string phone_number = 7; + * + * @return The phoneNumber. + */ + java.lang.String getPhoneNumber(); + /** + * + * + *
+   * Phone number associated with the Cloud Identity.
+   * 
+ * + * string phone_number = 7; + * + * @return The bytes for phoneNumber. + */ + com.google.protobuf.ByteString getPhoneNumberBytes(); + + /** + * + * + *
+   * Language code.
+   * 
+ * + * string language_code = 8; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Language code.
+   * 
+ * + * string language_code = 8; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * Output only. URI of Customer's Admin console dashboard.
+   * 
+ * + * string admin_console_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The adminConsoleUri. + */ + java.lang.String getAdminConsoleUri(); + /** + * + * + *
+   * Output only. URI of Customer's Admin console dashboard.
+   * 
+ * + * string admin_console_uri = 10 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for adminConsoleUri. + */ + com.google.protobuf.ByteString getAdminConsoleUriBytes(); + + /** + * + * + *
+   * Edu information about the customer.
+   * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + * + * @return Whether the eduData field is set. + */ + boolean hasEduData(); + /** + * + * + *
+   * Edu information about the customer.
+   * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + * + * @return The eduData. + */ + com.google.cloud.channel.v1.EduData getEduData(); + /** + * + * + *
+   * Edu information about the customer.
+   * 
+ * + * .google.cloud.channel.v1.EduData edu_data = 22; + */ + com.google.cloud.channel.v1.EduDataOrBuilder getEduDataOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CommitmentSettings.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CommitmentSettings.java new file mode 100644 index 00000000..6e15f11c --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CommitmentSettings.java @@ -0,0 +1,1316 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Commitment settings for commitment-based offers.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CommitmentSettings} + */ +public final class CommitmentSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.CommitmentSettings) + CommitmentSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CommitmentSettings.newBuilder() to construct. + private CommitmentSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CommitmentSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CommitmentSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CommitmentSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.channel.v1.RenewalSettings.Builder subBuilder = null; + if (renewalSettings_ != null) { + subBuilder = renewalSettings_.toBuilder(); + } + renewalSettings_ = + input.readMessage( + com.google.cloud.channel.v1.RenewalSettings.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(renewalSettings_); + renewalSettings_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_CommitmentSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_CommitmentSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CommitmentSettings.class, + com.google.cloud.channel.v1.CommitmentSettings.Builder.class); + } + + public static final int START_TIME_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Output only. Commitment start timestamp.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Output only. Commitment start timestamp.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Output only. Commitment start timestamp.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int RENEWAL_SETTINGS_FIELD_NUMBER = 4; + private com.google.cloud.channel.v1.RenewalSettings renewalSettings_; + /** + * + * + *
+   * Optional. Renewal settings applicable for a commitment-based Offer.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the renewalSettings field is set. + */ + @java.lang.Override + public boolean hasRenewalSettings() { + return renewalSettings_ != null; + } + /** + * + * + *
+   * Optional. Renewal settings applicable for a commitment-based Offer.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The renewalSettings. + */ + @java.lang.Override + public com.google.cloud.channel.v1.RenewalSettings getRenewalSettings() { + return renewalSettings_ == null + ? com.google.cloud.channel.v1.RenewalSettings.getDefaultInstance() + : renewalSettings_; + } + /** + * + * + *
+   * Optional. Renewal settings applicable for a commitment-based Offer.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.RenewalSettingsOrBuilder getRenewalSettingsOrBuilder() { + return getRenewalSettings(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (startTime_ != null) { + output.writeMessage(1, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + if (renewalSettings_ != null) { + output.writeMessage(4, getRenewalSettings()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + if (renewalSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getRenewalSettings()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.CommitmentSettings)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.CommitmentSettings other = + (com.google.cloud.channel.v1.CommitmentSettings) obj; + + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (hasRenewalSettings() != other.hasRenewalSettings()) return false; + if (hasRenewalSettings()) { + if (!getRenewalSettings().equals(other.getRenewalSettings())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (hasRenewalSettings()) { + hash = (37 * hash) + RENEWAL_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getRenewalSettings().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CommitmentSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.CommitmentSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Commitment settings for commitment-based offers.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CommitmentSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.CommitmentSettings) + com.google.cloud.channel.v1.CommitmentSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_CommitmentSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_CommitmentSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CommitmentSettings.class, + com.google.cloud.channel.v1.CommitmentSettings.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.CommitmentSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (renewalSettingsBuilder_ == null) { + renewalSettings_ = null; + } else { + renewalSettings_ = null; + renewalSettingsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_CommitmentSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CommitmentSettings getDefaultInstanceForType() { + return com.google.cloud.channel.v1.CommitmentSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.CommitmentSettings build() { + com.google.cloud.channel.v1.CommitmentSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CommitmentSettings buildPartial() { + com.google.cloud.channel.v1.CommitmentSettings result = + new com.google.cloud.channel.v1.CommitmentSettings(this); + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (renewalSettingsBuilder_ == null) { + result.renewalSettings_ = renewalSettings_; + } else { + result.renewalSettings_ = renewalSettingsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.CommitmentSettings) { + return mergeFrom((com.google.cloud.channel.v1.CommitmentSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.CommitmentSettings other) { + if (other == com.google.cloud.channel.v1.CommitmentSettings.getDefaultInstance()) return this; + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (other.hasRenewalSettings()) { + mergeRenewalSettings(other.getRenewalSettings()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.CommitmentSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.CommitmentSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.Timestamp startTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + startTimeBuilder_; + /** + * + * + *
+     * Output only. Commitment start timestamp.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Output only. Commitment start timestamp.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + public com.google.protobuf.Timestamp getStartTime() { + if (startTimeBuilder_ == null) { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } else { + return startTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Commitment start timestamp.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + startTime_ = value; + onChanged(); + } else { + startTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Commitment start timestamp.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Commitment start timestamp.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeStartTime(com.google.protobuf.Timestamp value) { + if (startTimeBuilder_ == null) { + if (startTime_ != null) { + startTime_ = + com.google.protobuf.Timestamp.newBuilder(startTime_).mergeFrom(value).buildPartial(); + } else { + startTime_ = value; + } + onChanged(); + } else { + startTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Commitment start timestamp.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Commitment start timestamp.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Commitment start timestamp.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Output only. Commitment start timestamp.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private com.google.cloud.channel.v1.RenewalSettings renewalSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.RenewalSettings, + com.google.cloud.channel.v1.RenewalSettings.Builder, + com.google.cloud.channel.v1.RenewalSettingsOrBuilder> + renewalSettingsBuilder_; + /** + * + * + *
+     * Optional. Renewal settings applicable for a commitment-based Offer.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the renewalSettings field is set. + */ + public boolean hasRenewalSettings() { + return renewalSettingsBuilder_ != null || renewalSettings_ != null; + } + /** + * + * + *
+     * Optional. Renewal settings applicable for a commitment-based Offer.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The renewalSettings. + */ + public com.google.cloud.channel.v1.RenewalSettings getRenewalSettings() { + if (renewalSettingsBuilder_ == null) { + return renewalSettings_ == null + ? com.google.cloud.channel.v1.RenewalSettings.getDefaultInstance() + : renewalSettings_; + } else { + return renewalSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Optional. Renewal settings applicable for a commitment-based Offer.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRenewalSettings(com.google.cloud.channel.v1.RenewalSettings value) { + if (renewalSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + renewalSettings_ = value; + onChanged(); + } else { + renewalSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Renewal settings applicable for a commitment-based Offer.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder setRenewalSettings( + com.google.cloud.channel.v1.RenewalSettings.Builder builderForValue) { + if (renewalSettingsBuilder_ == null) { + renewalSettings_ = builderForValue.build(); + onChanged(); + } else { + renewalSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Optional. Renewal settings applicable for a commitment-based Offer.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder mergeRenewalSettings(com.google.cloud.channel.v1.RenewalSettings value) { + if (renewalSettingsBuilder_ == null) { + if (renewalSettings_ != null) { + renewalSettings_ = + com.google.cloud.channel.v1.RenewalSettings.newBuilder(renewalSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + renewalSettings_ = value; + } + onChanged(); + } else { + renewalSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Optional. Renewal settings applicable for a commitment-based Offer.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public Builder clearRenewalSettings() { + if (renewalSettingsBuilder_ == null) { + renewalSettings_ = null; + onChanged(); + } else { + renewalSettings_ = null; + renewalSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Optional. Renewal settings applicable for a commitment-based Offer.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.channel.v1.RenewalSettings.Builder getRenewalSettingsBuilder() { + + onChanged(); + return getRenewalSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Optional. Renewal settings applicable for a commitment-based Offer.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + public com.google.cloud.channel.v1.RenewalSettingsOrBuilder getRenewalSettingsOrBuilder() { + if (renewalSettingsBuilder_ != null) { + return renewalSettingsBuilder_.getMessageOrBuilder(); + } else { + return renewalSettings_ == null + ? com.google.cloud.channel.v1.RenewalSettings.getDefaultInstance() + : renewalSettings_; + } + } + /** + * + * + *
+     * Optional. Renewal settings applicable for a commitment-based Offer.
+     * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.RenewalSettings, + com.google.cloud.channel.v1.RenewalSettings.Builder, + com.google.cloud.channel.v1.RenewalSettingsOrBuilder> + getRenewalSettingsFieldBuilder() { + if (renewalSettingsBuilder_ == null) { + renewalSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.RenewalSettings, + com.google.cloud.channel.v1.RenewalSettings.Builder, + com.google.cloud.channel.v1.RenewalSettingsOrBuilder>( + getRenewalSettings(), getParentForChildren(), isClean()); + renewalSettings_ = null; + } + return renewalSettingsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.CommitmentSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.CommitmentSettings) + private static final com.google.cloud.channel.v1.CommitmentSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.CommitmentSettings(); + } + + public static com.google.cloud.channel.v1.CommitmentSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CommitmentSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CommitmentSettings(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CommitmentSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CommitmentSettingsOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CommitmentSettingsOrBuilder.java new file mode 100644 index 00000000..5c2ed7df --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CommitmentSettingsOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +public interface CommitmentSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.CommitmentSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Commitment start timestamp.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Output only. Commitment start timestamp.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Output only. Commitment start timestamp.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Optional. Renewal settings applicable for a commitment-based Offer.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return Whether the renewalSettings field is set. + */ + boolean hasRenewalSettings(); + /** + * + * + *
+   * Optional. Renewal settings applicable for a commitment-based Offer.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The renewalSettings. + */ + com.google.cloud.channel.v1.RenewalSettings getRenewalSettings(); + /** + * + * + *
+   * Optional. Renewal settings applicable for a commitment-based Offer.
+   * 
+ * + * + * .google.cloud.channel.v1.RenewalSettings renewal_settings = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + */ + com.google.cloud.channel.v1.RenewalSettingsOrBuilder getRenewalSettingsOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CommonProto.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CommonProto.java new file mode 100644 index 00000000..07f8b477 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CommonProto.java @@ -0,0 +1,147 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/common.proto + +package com.google.cloud.channel.v1; + +public final class CommonProto { + private CommonProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_EduData_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_EduData_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_CloudIdentityInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_CloudIdentityInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Value_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Value_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_AdminUser_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_AdminUser_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n$google/cloud/channel/v1/common.proto\022\027" + + "google.cloud.channel.v1\032\037google/api/fiel" + + "d_behavior.proto\032\031google/protobuf/any.pr" + + "oto\032\034google/api/annotations.proto\"\260\003\n\007Ed" + + "uData\022F\n\016institute_type\030\001 \001(\0162..google.c" + + "loud.channel.v1.EduData.InstituteType\022F\n" + + "\016institute_size\030\002 \001(\0162..google.cloud.cha" + + "nnel.v1.EduData.InstituteSize\022\017\n\007website" + + "\030\003 \001(\t\"H\n\rInstituteType\022\036\n\032INSTITUTE_TYP" + + "E_UNSPECIFIED\020\000\022\007\n\003K12\020\001\022\016\n\nUNIVERSITY\020\002" + + "\"\271\001\n\rInstituteSize\022\036\n\032INSTITUTE_SIZE_UNS" + + "PECIFIED\020\000\022\016\n\nSIZE_1_100\020\001\022\020\n\014SIZE_101_5" + + "00\020\002\022\021\n\rSIZE_501_1000\020\003\022\022\n\016SIZE_1001_200" + + "0\020\004\022\022\n\016SIZE_2001_5000\020\005\022\023\n\017SIZE_5001_100" + + "00\020\006\022\026\n\022SIZE_10001_OR_MORE\020\007\"\373\002\n\021CloudId" + + "entityInfo\022N\n\rcustomer_type\030\001 \001(\01627.goog" + + "le.cloud.channel.v1.CloudIdentityInfo.Cu" + + "stomerType\022\033\n\016primary_domain\030\t \001(\tB\003\340A\003\022" + + "\032\n\022is_domain_verified\030\004 \001(\010\022\027\n\017alternate" + + "_email\030\006 \001(\t\022\024\n\014phone_number\030\007 \001(\t\022\025\n\rla" + + "nguage_code\030\010 \001(\t\022\036\n\021admin_console_uri\030\n" + + " \001(\tB\003\340A\003\0222\n\010edu_data\030\026 \001(\0132 .google.clo" + + "ud.channel.v1.EduData\"C\n\014CustomerType\022\035\n" + + "\031CUSTOMER_TYPE_UNSPECIFIED\020\000\022\n\n\006DOMAIN\020\001" + + "\022\010\n\004TEAM\020\002\"\203\001\n\005Value\022\025\n\013int64_value\030\001 \001(" + + "\003H\000\022\026\n\014string_value\030\002 \001(\tH\000\022\026\n\014double_va" + + "lue\030\003 \001(\001H\000\022+\n\013proto_value\030\004 \001(\0132\024.googl" + + "e.protobuf.AnyH\000B\006\n\004kind\"C\n\tAdminUser\022\r\n" + + "\005email\030\001 \001(\t\022\022\n\ngiven_name\030\002 \001(\t\022\023\n\013fami" + + "ly_name\030\003 \001(\tBl\n\033com.google.cloud.channe" + + "l.v1B\013CommonProtoP\001Z>google.golang.org/g" + + "enproto/googleapis/cloud/channel/v1;chan" + + "nelb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.protobuf.AnyProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_channel_v1_EduData_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_channel_v1_EduData_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_EduData_descriptor, + new java.lang.String[] { + "InstituteType", "InstituteSize", "Website", + }); + internal_static_google_cloud_channel_v1_CloudIdentityInfo_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_channel_v1_CloudIdentityInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_CloudIdentityInfo_descriptor, + new java.lang.String[] { + "CustomerType", + "PrimaryDomain", + "IsDomainVerified", + "AlternateEmail", + "PhoneNumber", + "LanguageCode", + "AdminConsoleUri", + "EduData", + }); + internal_static_google_cloud_channel_v1_Value_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_channel_v1_Value_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Value_descriptor, + new java.lang.String[] { + "Int64Value", "StringValue", "DoubleValue", "ProtoValue", "Kind", + }); + internal_static_google_cloud_channel_v1_AdminUser_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_channel_v1_AdminUser_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_AdminUser_descriptor, + new java.lang.String[] { + "Email", "GivenName", "FamilyName", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.protobuf.AnyProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Constraints.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Constraints.java new file mode 100644 index 00000000..6ab1b34d --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Constraints.java @@ -0,0 +1,733 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Represents the constraints for buying the Offer.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Constraints} + */ +public final class Constraints extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Constraints) + ConstraintsOrBuilder { + private static final long serialVersionUID = 0L; + // Use Constraints.newBuilder() to construct. + private Constraints(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Constraints() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Constraints(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Constraints( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.channel.v1.CustomerConstraints.Builder subBuilder = null; + if (customerConstraints_ != null) { + subBuilder = customerConstraints_.toBuilder(); + } + customerConstraints_ = + input.readMessage( + com.google.cloud.channel.v1.CustomerConstraints.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customerConstraints_); + customerConstraints_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Constraints_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Constraints_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Constraints.class, + com.google.cloud.channel.v1.Constraints.Builder.class); + } + + public static final int CUSTOMER_CONSTRAINTS_FIELD_NUMBER = 1; + private com.google.cloud.channel.v1.CustomerConstraints customerConstraints_; + /** + * + * + *
+   * Represents constraints required to purchase the Offer for a customer.
+   * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + * + * @return Whether the customerConstraints field is set. + */ + @java.lang.Override + public boolean hasCustomerConstraints() { + return customerConstraints_ != null; + } + /** + * + * + *
+   * Represents constraints required to purchase the Offer for a customer.
+   * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + * + * @return The customerConstraints. + */ + @java.lang.Override + public com.google.cloud.channel.v1.CustomerConstraints getCustomerConstraints() { + return customerConstraints_ == null + ? com.google.cloud.channel.v1.CustomerConstraints.getDefaultInstance() + : customerConstraints_; + } + /** + * + * + *
+   * Represents constraints required to purchase the Offer for a customer.
+   * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.CustomerConstraintsOrBuilder + getCustomerConstraintsOrBuilder() { + return getCustomerConstraints(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (customerConstraints_ != null) { + output.writeMessage(1, getCustomerConstraints()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (customerConstraints_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCustomerConstraints()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Constraints)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Constraints other = (com.google.cloud.channel.v1.Constraints) obj; + + if (hasCustomerConstraints() != other.hasCustomerConstraints()) return false; + if (hasCustomerConstraints()) { + if (!getCustomerConstraints().equals(other.getCustomerConstraints())) return false; + } + if (!unknownFields.equals(other.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 (hasCustomerConstraints()) { + hash = (37 * hash) + CUSTOMER_CONSTRAINTS_FIELD_NUMBER; + hash = (53 * hash) + getCustomerConstraints().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Constraints parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Constraints parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Constraints parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Constraints parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Constraints parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Constraints parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Constraints parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Constraints parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Constraints parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Constraints parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Constraints parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Constraints parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Constraints prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 constraints for buying the Offer.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Constraints} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Constraints) + com.google.cloud.channel.v1.ConstraintsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Constraints_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Constraints_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Constraints.class, + com.google.cloud.channel.v1.Constraints.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Constraints.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (customerConstraintsBuilder_ == null) { + customerConstraints_ = null; + } else { + customerConstraints_ = null; + customerConstraintsBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Constraints_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Constraints getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Constraints.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Constraints build() { + com.google.cloud.channel.v1.Constraints result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Constraints buildPartial() { + com.google.cloud.channel.v1.Constraints result = + new com.google.cloud.channel.v1.Constraints(this); + if (customerConstraintsBuilder_ == null) { + result.customerConstraints_ = customerConstraints_; + } else { + result.customerConstraints_ = customerConstraintsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Constraints) { + return mergeFrom((com.google.cloud.channel.v1.Constraints) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Constraints other) { + if (other == com.google.cloud.channel.v1.Constraints.getDefaultInstance()) return this; + if (other.hasCustomerConstraints()) { + mergeCustomerConstraints(other.getCustomerConstraints()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Constraints parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Constraints) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.channel.v1.CustomerConstraints customerConstraints_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CustomerConstraints, + com.google.cloud.channel.v1.CustomerConstraints.Builder, + com.google.cloud.channel.v1.CustomerConstraintsOrBuilder> + customerConstraintsBuilder_; + /** + * + * + *
+     * Represents constraints required to purchase the Offer for a customer.
+     * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + * + * @return Whether the customerConstraints field is set. + */ + public boolean hasCustomerConstraints() { + return customerConstraintsBuilder_ != null || customerConstraints_ != null; + } + /** + * + * + *
+     * Represents constraints required to purchase the Offer for a customer.
+     * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + * + * @return The customerConstraints. + */ + public com.google.cloud.channel.v1.CustomerConstraints getCustomerConstraints() { + if (customerConstraintsBuilder_ == null) { + return customerConstraints_ == null + ? com.google.cloud.channel.v1.CustomerConstraints.getDefaultInstance() + : customerConstraints_; + } else { + return customerConstraintsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Represents constraints required to purchase the Offer for a customer.
+     * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + */ + public Builder setCustomerConstraints(com.google.cloud.channel.v1.CustomerConstraints value) { + if (customerConstraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customerConstraints_ = value; + onChanged(); + } else { + customerConstraintsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Represents constraints required to purchase the Offer for a customer.
+     * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + */ + public Builder setCustomerConstraints( + com.google.cloud.channel.v1.CustomerConstraints.Builder builderForValue) { + if (customerConstraintsBuilder_ == null) { + customerConstraints_ = builderForValue.build(); + onChanged(); + } else { + customerConstraintsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Represents constraints required to purchase the Offer for a customer.
+     * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + */ + public Builder mergeCustomerConstraints(com.google.cloud.channel.v1.CustomerConstraints value) { + if (customerConstraintsBuilder_ == null) { + if (customerConstraints_ != null) { + customerConstraints_ = + com.google.cloud.channel.v1.CustomerConstraints.newBuilder(customerConstraints_) + .mergeFrom(value) + .buildPartial(); + } else { + customerConstraints_ = value; + } + onChanged(); + } else { + customerConstraintsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Represents constraints required to purchase the Offer for a customer.
+     * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + */ + public Builder clearCustomerConstraints() { + if (customerConstraintsBuilder_ == null) { + customerConstraints_ = null; + onChanged(); + } else { + customerConstraints_ = null; + customerConstraintsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Represents constraints required to purchase the Offer for a customer.
+     * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + */ + public com.google.cloud.channel.v1.CustomerConstraints.Builder getCustomerConstraintsBuilder() { + + onChanged(); + return getCustomerConstraintsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Represents constraints required to purchase the Offer for a customer.
+     * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + */ + public com.google.cloud.channel.v1.CustomerConstraintsOrBuilder + getCustomerConstraintsOrBuilder() { + if (customerConstraintsBuilder_ != null) { + return customerConstraintsBuilder_.getMessageOrBuilder(); + } else { + return customerConstraints_ == null + ? com.google.cloud.channel.v1.CustomerConstraints.getDefaultInstance() + : customerConstraints_; + } + } + /** + * + * + *
+     * Represents constraints required to purchase the Offer for a customer.
+     * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CustomerConstraints, + com.google.cloud.channel.v1.CustomerConstraints.Builder, + com.google.cloud.channel.v1.CustomerConstraintsOrBuilder> + getCustomerConstraintsFieldBuilder() { + if (customerConstraintsBuilder_ == null) { + customerConstraintsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CustomerConstraints, + com.google.cloud.channel.v1.CustomerConstraints.Builder, + com.google.cloud.channel.v1.CustomerConstraintsOrBuilder>( + getCustomerConstraints(), getParentForChildren(), isClean()); + customerConstraints_ = null; + } + return customerConstraintsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Constraints) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Constraints) + private static final com.google.cloud.channel.v1.Constraints DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Constraints(); + } + + public static com.google.cloud.channel.v1.Constraints getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Constraints parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Constraints(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Constraints getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ConstraintsOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ConstraintsOrBuilder.java new file mode 100644 index 00000000..6f8b79bb --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ConstraintsOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +public interface ConstraintsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Constraints) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Represents constraints required to purchase the Offer for a customer.
+   * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + * + * @return Whether the customerConstraints field is set. + */ + boolean hasCustomerConstraints(); + /** + * + * + *
+   * Represents constraints required to purchase the Offer for a customer.
+   * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + * + * @return The customerConstraints. + */ + com.google.cloud.channel.v1.CustomerConstraints getCustomerConstraints(); + /** + * + * + *
+   * Represents constraints required to purchase the Offer for a customer.
+   * 
+ * + * .google.cloud.channel.v1.CustomerConstraints customer_constraints = 1; + */ + com.google.cloud.channel.v1.CustomerConstraintsOrBuilder getCustomerConstraintsOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ContactInfo.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ContactInfo.java new file mode 100644 index 00000000..01eed955 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ContactInfo.java @@ -0,0 +1,1556 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/customers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Contact information for a customer account.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ContactInfo} + */ +public final class ContactInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ContactInfo) + ContactInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use ContactInfo.newBuilder() to construct. + private ContactInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ContactInfo() { + firstName_ = ""; + lastName_ = ""; + displayName_ = ""; + email_ = ""; + title_ = ""; + phone_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ContactInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ContactInfo( + 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(); + + firstName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + lastName_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + displayName_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + email_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + title_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + phone_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CustomersProto + .internal_static_google_cloud_channel_v1_ContactInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CustomersProto + .internal_static_google_cloud_channel_v1_ContactInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ContactInfo.class, + com.google.cloud.channel.v1.ContactInfo.Builder.class); + } + + public static final int FIRST_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object firstName_; + /** + * + * + *
+   * First name of the contact in the customer account.
+   * 
+ * + * string first_name = 1; + * + * @return The firstName. + */ + @java.lang.Override + public java.lang.String getFirstName() { + java.lang.Object ref = firstName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + firstName_ = s; + return s; + } + } + /** + * + * + *
+   * First name of the contact in the customer account.
+   * 
+ * + * string first_name = 1; + * + * @return The bytes for firstName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFirstNameBytes() { + java.lang.Object ref = firstName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firstName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LAST_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object lastName_; + /** + * + * + *
+   * Last name of the contact in the customer account.
+   * 
+ * + * string last_name = 2; + * + * @return The lastName. + */ + @java.lang.Override + public java.lang.String getLastName() { + java.lang.Object ref = lastName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastName_ = s; + return s; + } + } + /** + * + * + *
+   * Last name of the contact in the customer account.
+   * 
+ * + * string last_name = 2; + * + * @return The bytes for lastName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLastNameBytes() { + java.lang.Object ref = lastName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 4; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Output only. Display name of the contact in the customer account.
+   * Populated by combining customer first name and last name.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Display name of the contact in the customer account.
+   * Populated by combining customer first name and last name.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int EMAIL_FIELD_NUMBER = 5; + private volatile java.lang.Object email_; + /** + * + * + *
+   * Email of the contact in the customer account.
+   * Email is required for entitlements that need creation of admin.google.com
+   * accounts. The email will be the username used in credentials to access the
+   * admin.google.com account.
+   * 
+ * + * string email = 5; + * + * @return The email. + */ + @java.lang.Override + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } + } + /** + * + * + *
+   * Email of the contact in the customer account.
+   * Email is required for entitlements that need creation of admin.google.com
+   * accounts. The email will be the username used in credentials to access the
+   * admin.google.com account.
+   * 
+ * + * string email = 5; + * + * @return The bytes for email. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TITLE_FIELD_NUMBER = 6; + private volatile java.lang.Object title_; + /** + * + * + *
+   * Optional. Job title of the contact in the customer account.
+   * 
+ * + * string title = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. Job title of the contact in the customer account.
+   * 
+ * + * string title = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PHONE_FIELD_NUMBER = 7; + private volatile java.lang.Object phone_; + /** + * + * + *
+   * Phone number of the contact in the customer account.
+   * 
+ * + * string phone = 7; + * + * @return The phone. + */ + @java.lang.Override + public java.lang.String getPhone() { + java.lang.Object ref = phone_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phone_ = s; + return s; + } + } + /** + * + * + *
+   * Phone number of the contact in the customer account.
+   * 
+ * + * string phone = 7; + * + * @return The bytes for phone. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPhoneBytes() { + java.lang.Object ref = phone_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phone_ = 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 (!getFirstNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, firstName_); + } + if (!getLastNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, lastName_); + } + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, displayName_); + } + if (!getEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, email_); + } + if (!getTitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, title_); + } + if (!getPhoneBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, phone_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getFirstNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, firstName_); + } + if (!getLastNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, lastName_); + } + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, displayName_); + } + if (!getEmailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, email_); + } + if (!getTitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, title_); + } + if (!getPhoneBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, phone_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ContactInfo)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ContactInfo other = (com.google.cloud.channel.v1.ContactInfo) obj; + + if (!getFirstName().equals(other.getFirstName())) return false; + if (!getLastName().equals(other.getLastName())) return false; + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getEmail().equals(other.getEmail())) return false; + if (!getTitle().equals(other.getTitle())) return false; + if (!getPhone().equals(other.getPhone())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIRST_NAME_FIELD_NUMBER; + hash = (53 * hash) + getFirstName().hashCode(); + hash = (37 * hash) + LAST_NAME_FIELD_NUMBER; + hash = (53 * hash) + getLastName().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getEmail().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + PHONE_FIELD_NUMBER; + hash = (53 * hash) + getPhone().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ContactInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ContactInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ContactInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ContactInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ContactInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ContactInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ContactInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ContactInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ContactInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ContactInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ContactInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ContactInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ContactInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Contact information for a customer account.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ContactInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ContactInfo) + com.google.cloud.channel.v1.ContactInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CustomersProto + .internal_static_google_cloud_channel_v1_ContactInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CustomersProto + .internal_static_google_cloud_channel_v1_ContactInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ContactInfo.class, + com.google.cloud.channel.v1.ContactInfo.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ContactInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + firstName_ = ""; + + lastName_ = ""; + + displayName_ = ""; + + email_ = ""; + + title_ = ""; + + phone_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.CustomersProto + .internal_static_google_cloud_channel_v1_ContactInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ContactInfo getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ContactInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ContactInfo build() { + com.google.cloud.channel.v1.ContactInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ContactInfo buildPartial() { + com.google.cloud.channel.v1.ContactInfo result = + new com.google.cloud.channel.v1.ContactInfo(this); + result.firstName_ = firstName_; + result.lastName_ = lastName_; + result.displayName_ = displayName_; + result.email_ = email_; + result.title_ = title_; + result.phone_ = phone_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ContactInfo) { + return mergeFrom((com.google.cloud.channel.v1.ContactInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ContactInfo other) { + if (other == com.google.cloud.channel.v1.ContactInfo.getDefaultInstance()) return this; + if (!other.getFirstName().isEmpty()) { + firstName_ = other.firstName_; + onChanged(); + } + if (!other.getLastName().isEmpty()) { + lastName_ = other.lastName_; + onChanged(); + } + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getEmail().isEmpty()) { + email_ = other.email_; + onChanged(); + } + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + onChanged(); + } + if (!other.getPhone().isEmpty()) { + phone_ = other.phone_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ContactInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ContactInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object firstName_ = ""; + /** + * + * + *
+     * First name of the contact in the customer account.
+     * 
+ * + * string first_name = 1; + * + * @return The firstName. + */ + public java.lang.String getFirstName() { + java.lang.Object ref = firstName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + firstName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * First name of the contact in the customer account.
+     * 
+ * + * string first_name = 1; + * + * @return The bytes for firstName. + */ + public com.google.protobuf.ByteString getFirstNameBytes() { + java.lang.Object ref = firstName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + firstName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * First name of the contact in the customer account.
+     * 
+ * + * string first_name = 1; + * + * @param value The firstName to set. + * @return This builder for chaining. + */ + public Builder setFirstName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + firstName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * First name of the contact in the customer account.
+     * 
+ * + * string first_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearFirstName() { + + firstName_ = getDefaultInstance().getFirstName(); + onChanged(); + return this; + } + /** + * + * + *
+     * First name of the contact in the customer account.
+     * 
+ * + * string first_name = 1; + * + * @param value The bytes for firstName to set. + * @return This builder for chaining. + */ + public Builder setFirstNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + firstName_ = value; + onChanged(); + return this; + } + + private java.lang.Object lastName_ = ""; + /** + * + * + *
+     * Last name of the contact in the customer account.
+     * 
+ * + * string last_name = 2; + * + * @return The lastName. + */ + public java.lang.String getLastName() { + java.lang.Object ref = lastName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + lastName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Last name of the contact in the customer account.
+     * 
+ * + * string last_name = 2; + * + * @return The bytes for lastName. + */ + public com.google.protobuf.ByteString getLastNameBytes() { + java.lang.Object ref = lastName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + lastName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Last name of the contact in the customer account.
+     * 
+ * + * string last_name = 2; + * + * @param value The lastName to set. + * @return This builder for chaining. + */ + public Builder setLastName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + lastName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Last name of the contact in the customer account.
+     * 
+ * + * string last_name = 2; + * + * @return This builder for chaining. + */ + public Builder clearLastName() { + + lastName_ = getDefaultInstance().getLastName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Last name of the contact in the customer account.
+     * 
+ * + * string last_name = 2; + * + * @param value The bytes for lastName to set. + * @return This builder for chaining. + */ + public Builder setLastNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + lastName_ = value; + onChanged(); + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Output only. Display name of the contact in the customer account.
+     * Populated by combining customer first name and last name.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Display name of the contact in the customer account.
+     * Populated by combining customer first name and last name.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Display name of the contact in the customer account.
+     * Populated by combining customer first name and last name.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Display name of the contact in the customer account.
+     * Populated by combining customer first name and last name.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Display name of the contact in the customer account.
+     * Populated by combining customer first name and last name.
+     * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object email_ = ""; + /** + * + * + *
+     * Email of the contact in the customer account.
+     * Email is required for entitlements that need creation of admin.google.com
+     * accounts. The email will be the username used in credentials to access the
+     * admin.google.com account.
+     * 
+ * + * string email = 5; + * + * @return The email. + */ + public java.lang.String getEmail() { + java.lang.Object ref = email_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + email_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Email of the contact in the customer account.
+     * Email is required for entitlements that need creation of admin.google.com
+     * accounts. The email will be the username used in credentials to access the
+     * admin.google.com account.
+     * 
+ * + * string email = 5; + * + * @return The bytes for email. + */ + public com.google.protobuf.ByteString getEmailBytes() { + java.lang.Object ref = email_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + email_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Email of the contact in the customer account.
+     * Email is required for entitlements that need creation of admin.google.com
+     * accounts. The email will be the username used in credentials to access the
+     * admin.google.com account.
+     * 
+ * + * string email = 5; + * + * @param value The email to set. + * @return This builder for chaining. + */ + public Builder setEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + email_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Email of the contact in the customer account.
+     * Email is required for entitlements that need creation of admin.google.com
+     * accounts. The email will be the username used in credentials to access the
+     * admin.google.com account.
+     * 
+ * + * string email = 5; + * + * @return This builder for chaining. + */ + public Builder clearEmail() { + + email_ = getDefaultInstance().getEmail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Email of the contact in the customer account.
+     * Email is required for entitlements that need creation of admin.google.com
+     * accounts. The email will be the username used in credentials to access the
+     * admin.google.com account.
+     * 
+ * + * string email = 5; + * + * @param value The bytes for email to set. + * @return This builder for chaining. + */ + public Builder setEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + email_ = value; + onChanged(); + return this; + } + + private java.lang.Object title_ = ""; + /** + * + * + *
+     * Optional. Job title of the contact in the customer account.
+     * 
+ * + * string title = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. Job title of the contact in the customer account.
+     * 
+ * + * string title = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. Job title of the contact in the customer account.
+     * 
+ * + * string title = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + title_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Job title of the contact in the customer account.
+     * 
+ * + * string title = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + + title_ = getDefaultInstance().getTitle(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Job title of the contact in the customer account.
+     * 
+ * + * string title = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + title_ = value; + onChanged(); + return this; + } + + private java.lang.Object phone_ = ""; + /** + * + * + *
+     * Phone number of the contact in the customer account.
+     * 
+ * + * string phone = 7; + * + * @return The phone. + */ + public java.lang.String getPhone() { + java.lang.Object ref = phone_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + phone_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Phone number of the contact in the customer account.
+     * 
+ * + * string phone = 7; + * + * @return The bytes for phone. + */ + public com.google.protobuf.ByteString getPhoneBytes() { + java.lang.Object ref = phone_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + phone_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Phone number of the contact in the customer account.
+     * 
+ * + * string phone = 7; + * + * @param value The phone to set. + * @return This builder for chaining. + */ + public Builder setPhone(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + phone_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Phone number of the contact in the customer account.
+     * 
+ * + * string phone = 7; + * + * @return This builder for chaining. + */ + public Builder clearPhone() { + + phone_ = getDefaultInstance().getPhone(); + onChanged(); + return this; + } + /** + * + * + *
+     * Phone number of the contact in the customer account.
+     * 
+ * + * string phone = 7; + * + * @param value The bytes for phone to set. + * @return This builder for chaining. + */ + public Builder setPhoneBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + phone_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ContactInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ContactInfo) + private static final com.google.cloud.channel.v1.ContactInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ContactInfo(); + } + + public static com.google.cloud.channel.v1.ContactInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ContactInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ContactInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ContactInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ContactInfoOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ContactInfoOrBuilder.java new file mode 100644 index 00000000..4e6c2c72 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ContactInfoOrBuilder.java @@ -0,0 +1,183 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/customers.proto + +package com.google.cloud.channel.v1; + +public interface ContactInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ContactInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * First name of the contact in the customer account.
+   * 
+ * + * string first_name = 1; + * + * @return The firstName. + */ + java.lang.String getFirstName(); + /** + * + * + *
+   * First name of the contact in the customer account.
+   * 
+ * + * string first_name = 1; + * + * @return The bytes for firstName. + */ + com.google.protobuf.ByteString getFirstNameBytes(); + + /** + * + * + *
+   * Last name of the contact in the customer account.
+   * 
+ * + * string last_name = 2; + * + * @return The lastName. + */ + java.lang.String getLastName(); + /** + * + * + *
+   * Last name of the contact in the customer account.
+   * 
+ * + * string last_name = 2; + * + * @return The bytes for lastName. + */ + com.google.protobuf.ByteString getLastNameBytes(); + + /** + * + * + *
+   * Output only. Display name of the contact in the customer account.
+   * Populated by combining customer first name and last name.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Output only. Display name of the contact in the customer account.
+   * Populated by combining customer first name and last name.
+   * 
+ * + * string display_name = 4 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Email of the contact in the customer account.
+   * Email is required for entitlements that need creation of admin.google.com
+   * accounts. The email will be the username used in credentials to access the
+   * admin.google.com account.
+   * 
+ * + * string email = 5; + * + * @return The email. + */ + java.lang.String getEmail(); + /** + * + * + *
+   * Email of the contact in the customer account.
+   * Email is required for entitlements that need creation of admin.google.com
+   * accounts. The email will be the username used in credentials to access the
+   * admin.google.com account.
+   * 
+ * + * string email = 5; + * + * @return The bytes for email. + */ + com.google.protobuf.ByteString getEmailBytes(); + + /** + * + * + *
+   * Optional. Job title of the contact in the customer account.
+   * 
+ * + * string title = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+   * Optional. Job title of the contact in the customer account.
+   * 
+ * + * string title = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+   * Phone number of the contact in the customer account.
+   * 
+ * + * string phone = 7; + * + * @return The phone. + */ + java.lang.String getPhone(); + /** + * + * + *
+   * Phone number of the contact in the customer account.
+   * 
+ * + * string phone = 7; + * + * @return The bytes for phone. + */ + com.google.protobuf.ByteString getPhoneBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateChannelPartnerLinkRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateChannelPartnerLinkRequest.java new file mode 100644 index 00000000..af1eebc1 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateChannelPartnerLinkRequest.java @@ -0,0 +1,1172 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.CreateChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerLink]
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CreateChannelPartnerLinkRequest} + */ +public final class CreateChannelPartnerLinkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.CreateChannelPartnerLinkRequest) + CreateChannelPartnerLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateChannelPartnerLinkRequest.newBuilder() to construct. + private CreateChannelPartnerLinkRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateChannelPartnerLinkRequest() { + parent_ = ""; + domain_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateChannelPartnerLinkRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateChannelPartnerLinkRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.channel.v1.ChannelPartnerLink.Builder subBuilder = null; + if (channelPartnerLink_ != null) { + subBuilder = channelPartnerLink_.toBuilder(); + } + channelPartnerLink_ = + input.readMessage( + com.google.cloud.channel.v1.ChannelPartnerLink.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(channelPartnerLink_); + channelPartnerLink_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + domain_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateChannelPartnerLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateChannelPartnerLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest.class, + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of reseller's account for which to create a channel
+   * partner link.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of reseller's account for which to create a channel
+   * partner link.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHANNEL_PARTNER_LINK_FIELD_NUMBER = 2; + private com.google.cloud.channel.v1.ChannelPartnerLink channelPartnerLink_; + /** + * + * + *
+   * Required. The channel partner link to create.
+   * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+   * used to create a link.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the channelPartnerLink field is set. + */ + @java.lang.Override + public boolean hasChannelPartnerLink() { + return channelPartnerLink_ != null; + } + /** + * + * + *
+   * Required. The channel partner link to create.
+   * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+   * used to create a link.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The channelPartnerLink. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLink getChannelPartnerLink() { + return channelPartnerLink_ == null + ? com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance() + : channelPartnerLink_; + } + /** + * + * + *
+   * Required. The channel partner link to create.
+   * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+   * used to create a link.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder getChannelPartnerLinkOrBuilder() { + return getChannelPartnerLink(); + } + + public static final int DOMAIN_FIELD_NUMBER = 3; + private volatile java.lang.Object domain_; + /** + * + * + *
+   * Optional. The invited partner's domain. Either domain or
+   * channel_partner_link.reseller_cloud_identity_id can be used to create a
+   * link.
+   * 
+ * + * string domain = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The domain. + */ + @java.lang.Override + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The invited partner's domain. Either domain or
+   * channel_partner_link.reseller_cloud_identity_id can be used to create a
+   * link.
+   * 
+ * + * string domain = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for domain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (channelPartnerLink_ != null) { + output.writeMessage(2, getChannelPartnerLink()); + } + if (!getDomainBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, domain_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (channelPartnerLink_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getChannelPartnerLink()); + } + if (!getDomainBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, domain_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest other = + (com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasChannelPartnerLink() != other.hasChannelPartnerLink()) return false; + if (hasChannelPartnerLink()) { + if (!getChannelPartnerLink().equals(other.getChannelPartnerLink())) return false; + } + if (!getDomain().equals(other.getDomain())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasChannelPartnerLink()) { + hash = (37 * hash) + CHANNEL_PARTNER_LINK_FIELD_NUMBER; + hash = (53 * hash) + getChannelPartnerLink().hashCode(); + } + hash = (37 * hash) + DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getDomain().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.CreateChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerLink]
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CreateChannelPartnerLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.CreateChannelPartnerLinkRequest) + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateChannelPartnerLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateChannelPartnerLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest.class, + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (channelPartnerLinkBuilder_ == null) { + channelPartnerLink_ = null; + } else { + channelPartnerLink_ = null; + channelPartnerLinkBuilder_ = null; + } + domain_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateChannelPartnerLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest build() { + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest buildPartial() { + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest result = + new com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest(this); + result.parent_ = parent_; + if (channelPartnerLinkBuilder_ == null) { + result.channelPartnerLink_ = channelPartnerLink_; + } else { + result.channelPartnerLink_ = channelPartnerLinkBuilder_.build(); + } + result.domain_ = domain_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest) { + return mergeFrom((com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest other) { + if (other == com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasChannelPartnerLink()) { + mergeChannelPartnerLink(other.getChannelPartnerLink()); + } + if (!other.getDomain().isEmpty()) { + domain_ = other.domain_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of reseller's account for which to create a channel
+     * partner link.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of reseller's account for which to create a channel
+     * partner link.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of reseller's account for which to create a channel
+     * partner link.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of reseller's account for which to create a channel
+     * partner link.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of reseller's account for which to create a channel
+     * partner link.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.ChannelPartnerLink channelPartnerLink_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ChannelPartnerLink, + com.google.cloud.channel.v1.ChannelPartnerLink.Builder, + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder> + channelPartnerLinkBuilder_; + /** + * + * + *
+     * Required. The channel partner link to create.
+     * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+     * used to create a link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the channelPartnerLink field is set. + */ + public boolean hasChannelPartnerLink() { + return channelPartnerLinkBuilder_ != null || channelPartnerLink_ != null; + } + /** + * + * + *
+     * Required. The channel partner link to create.
+     * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+     * used to create a link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The channelPartnerLink. + */ + public com.google.cloud.channel.v1.ChannelPartnerLink getChannelPartnerLink() { + if (channelPartnerLinkBuilder_ == null) { + return channelPartnerLink_ == null + ? com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance() + : channelPartnerLink_; + } else { + return channelPartnerLinkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The channel partner link to create.
+     * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+     * used to create a link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setChannelPartnerLink(com.google.cloud.channel.v1.ChannelPartnerLink value) { + if (channelPartnerLinkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + channelPartnerLink_ = value; + onChanged(); + } else { + channelPartnerLinkBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The channel partner link to create.
+     * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+     * used to create a link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setChannelPartnerLink( + com.google.cloud.channel.v1.ChannelPartnerLink.Builder builderForValue) { + if (channelPartnerLinkBuilder_ == null) { + channelPartnerLink_ = builderForValue.build(); + onChanged(); + } else { + channelPartnerLinkBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The channel partner link to create.
+     * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+     * used to create a link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeChannelPartnerLink(com.google.cloud.channel.v1.ChannelPartnerLink value) { + if (channelPartnerLinkBuilder_ == null) { + if (channelPartnerLink_ != null) { + channelPartnerLink_ = + com.google.cloud.channel.v1.ChannelPartnerLink.newBuilder(channelPartnerLink_) + .mergeFrom(value) + .buildPartial(); + } else { + channelPartnerLink_ = value; + } + onChanged(); + } else { + channelPartnerLinkBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The channel partner link to create.
+     * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+     * used to create a link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearChannelPartnerLink() { + if (channelPartnerLinkBuilder_ == null) { + channelPartnerLink_ = null; + onChanged(); + } else { + channelPartnerLink_ = null; + channelPartnerLinkBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The channel partner link to create.
+     * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+     * used to create a link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.ChannelPartnerLink.Builder getChannelPartnerLinkBuilder() { + + onChanged(); + return getChannelPartnerLinkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The channel partner link to create.
+     * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+     * used to create a link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder + getChannelPartnerLinkOrBuilder() { + if (channelPartnerLinkBuilder_ != null) { + return channelPartnerLinkBuilder_.getMessageOrBuilder(); + } else { + return channelPartnerLink_ == null + ? com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance() + : channelPartnerLink_; + } + } + /** + * + * + *
+     * Required. The channel partner link to create.
+     * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+     * used to create a link.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ChannelPartnerLink, + com.google.cloud.channel.v1.ChannelPartnerLink.Builder, + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder> + getChannelPartnerLinkFieldBuilder() { + if (channelPartnerLinkBuilder_ == null) { + channelPartnerLinkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ChannelPartnerLink, + com.google.cloud.channel.v1.ChannelPartnerLink.Builder, + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder>( + getChannelPartnerLink(), getParentForChildren(), isClean()); + channelPartnerLink_ = null; + } + return channelPartnerLinkBuilder_; + } + + private java.lang.Object domain_ = ""; + /** + * + * + *
+     * Optional. The invited partner's domain. Either domain or
+     * channel_partner_link.reseller_cloud_identity_id can be used to create a
+     * link.
+     * 
+ * + * string domain = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The domain. + */ + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The invited partner's domain. Either domain or
+     * channel_partner_link.reseller_cloud_identity_id can be used to create a
+     * link.
+     * 
+ * + * string domain = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for domain. + */ + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The invited partner's domain. Either domain or
+     * channel_partner_link.reseller_cloud_identity_id can be used to create a
+     * link.
+     * 
+ * + * string domain = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The domain to set. + * @return This builder for chaining. + */ + public Builder setDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + domain_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The invited partner's domain. Either domain or
+     * channel_partner_link.reseller_cloud_identity_id can be used to create a
+     * link.
+     * 
+ * + * string domain = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearDomain() { + + domain_ = getDefaultInstance().getDomain(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The invited partner's domain. Either domain or
+     * channel_partner_link.reseller_cloud_identity_id can be used to create a
+     * link.
+     * 
+ * + * string domain = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for domain to set. + * @return This builder for chaining. + */ + public Builder setDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + domain_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.CreateChannelPartnerLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.CreateChannelPartnerLinkRequest) + private static final com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest(); + } + + public static com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateChannelPartnerLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateChannelPartnerLinkRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateChannelPartnerLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateChannelPartnerLinkRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateChannelPartnerLinkRequestOrBuilder.java new file mode 100644 index 00000000..d22aeac6 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateChannelPartnerLinkRequestOrBuilder.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/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface CreateChannelPartnerLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.CreateChannelPartnerLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of reseller's account for which to create a channel
+   * partner link.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of reseller's account for which to create a channel
+   * partner link.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The channel partner link to create.
+   * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+   * used to create a link.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the channelPartnerLink field is set. + */ + boolean hasChannelPartnerLink(); + /** + * + * + *
+   * Required. The channel partner link to create.
+   * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+   * used to create a link.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The channelPartnerLink. + */ + com.google.cloud.channel.v1.ChannelPartnerLink getChannelPartnerLink(); + /** + * + * + *
+   * Required. The channel partner link to create.
+   * Either channel_partner_link.reseller_cloud_identity_id or domain can be
+   * used to create a link.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder getChannelPartnerLinkOrBuilder(); + + /** + * + * + *
+   * Optional. The invited partner's domain. Either domain or
+   * channel_partner_link.reseller_cloud_identity_id can be used to create a
+   * link.
+   * 
+ * + * string domain = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The domain. + */ + java.lang.String getDomain(); + /** + * + * + *
+   * Optional. The invited partner's domain. Either domain or
+   * channel_partner_link.reseller_cloud_identity_id can be used to create a
+   * link.
+   * 
+ * + * string domain = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for domain. + */ + com.google.protobuf.ByteString getDomainBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateCustomerRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateCustomerRequest.java new file mode 100644 index 00000000..d55f12c9 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateCustomerRequest.java @@ -0,0 +1,941 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.CreateCustomer][google.cloud.channel.v1.CloudChannelService.CreateCustomer]
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CreateCustomerRequest} + */ +public final class CreateCustomerRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.CreateCustomerRequest) + CreateCustomerRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateCustomerRequest.newBuilder() to construct. + private CreateCustomerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateCustomerRequest() { + parent_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateCustomerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateCustomerRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.channel.v1.Customer.Builder subBuilder = null; + if (customer_ != null) { + subBuilder = customer_.toBuilder(); + } + customer_ = + input.readMessage( + com.google.cloud.channel.v1.Customer.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customer_); + customer_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateCustomerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateCustomerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CreateCustomerRequest.class, + com.google.cloud.channel.v1.CreateCustomerRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of reseller account in which to create the customer.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of reseller account in which to create the customer.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOMER_FIELD_NUMBER = 2; + private com.google.cloud.channel.v1.Customer customer_; + /** + * + * + *
+   * Required. The customer to create.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customer field is set. + */ + @java.lang.Override + public boolean hasCustomer() { + return customer_ != null; + } + /** + * + * + *
+   * Required. The customer to create.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customer. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Customer getCustomer() { + return customer_ == null + ? com.google.cloud.channel.v1.Customer.getDefaultInstance() + : customer_; + } + /** + * + * + *
+   * Required. The customer to create.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.CustomerOrBuilder getCustomerOrBuilder() { + return getCustomer(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (customer_ != null) { + output.writeMessage(2, getCustomer()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (customer_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCustomer()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.CreateCustomerRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.CreateCustomerRequest other = + (com.google.cloud.channel.v1.CreateCustomerRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasCustomer() != other.hasCustomer()) return false; + if (hasCustomer()) { + if (!getCustomer().equals(other.getCustomer())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasCustomer()) { + hash = (37 * hash) + CUSTOMER_FIELD_NUMBER; + hash = (53 * hash) + getCustomer().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.CreateCustomerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.CreateCustomer][google.cloud.channel.v1.CloudChannelService.CreateCustomer]
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CreateCustomerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.CreateCustomerRequest) + com.google.cloud.channel.v1.CreateCustomerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateCustomerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateCustomerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CreateCustomerRequest.class, + com.google.cloud.channel.v1.CreateCustomerRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.CreateCustomerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (customerBuilder_ == null) { + customer_ = null; + } else { + customer_ = null; + customerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateCustomerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateCustomerRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.CreateCustomerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateCustomerRequest build() { + com.google.cloud.channel.v1.CreateCustomerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateCustomerRequest buildPartial() { + com.google.cloud.channel.v1.CreateCustomerRequest result = + new com.google.cloud.channel.v1.CreateCustomerRequest(this); + result.parent_ = parent_; + if (customerBuilder_ == null) { + result.customer_ = customer_; + } else { + result.customer_ = customerBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.CreateCustomerRequest) { + return mergeFrom((com.google.cloud.channel.v1.CreateCustomerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.CreateCustomerRequest other) { + if (other == com.google.cloud.channel.v1.CreateCustomerRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasCustomer()) { + mergeCustomer(other.getCustomer()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.CreateCustomerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.CreateCustomerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of reseller account in which to create the customer.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of reseller account in which to create the customer.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of reseller account in which to create the customer.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of reseller account in which to create the customer.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of reseller account in which to create the customer.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.Customer customer_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Customer, + com.google.cloud.channel.v1.Customer.Builder, + com.google.cloud.channel.v1.CustomerOrBuilder> + customerBuilder_; + /** + * + * + *
+     * Required. The customer to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customer field is set. + */ + public boolean hasCustomer() { + return customerBuilder_ != null || customer_ != null; + } + /** + * + * + *
+     * Required. The customer to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customer. + */ + public com.google.cloud.channel.v1.Customer getCustomer() { + if (customerBuilder_ == null) { + return customer_ == null + ? com.google.cloud.channel.v1.Customer.getDefaultInstance() + : customer_; + } else { + return customerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The customer to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomer(com.google.cloud.channel.v1.Customer value) { + if (customerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customer_ = value; + onChanged(); + } else { + customerBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The customer to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomer(com.google.cloud.channel.v1.Customer.Builder builderForValue) { + if (customerBuilder_ == null) { + customer_ = builderForValue.build(); + onChanged(); + } else { + customerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The customer to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCustomer(com.google.cloud.channel.v1.Customer value) { + if (customerBuilder_ == null) { + if (customer_ != null) { + customer_ = + com.google.cloud.channel.v1.Customer.newBuilder(customer_) + .mergeFrom(value) + .buildPartial(); + } else { + customer_ = value; + } + onChanged(); + } else { + customerBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The customer to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCustomer() { + if (customerBuilder_ == null) { + customer_ = null; + onChanged(); + } else { + customer_ = null; + customerBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The customer to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Customer.Builder getCustomerBuilder() { + + onChanged(); + return getCustomerFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The customer to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.CustomerOrBuilder getCustomerOrBuilder() { + if (customerBuilder_ != null) { + return customerBuilder_.getMessageOrBuilder(); + } else { + return customer_ == null + ? com.google.cloud.channel.v1.Customer.getDefaultInstance() + : customer_; + } + } + /** + * + * + *
+     * Required. The customer to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Customer, + com.google.cloud.channel.v1.Customer.Builder, + com.google.cloud.channel.v1.CustomerOrBuilder> + getCustomerFieldBuilder() { + if (customerBuilder_ == null) { + customerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Customer, + com.google.cloud.channel.v1.Customer.Builder, + com.google.cloud.channel.v1.CustomerOrBuilder>( + getCustomer(), getParentForChildren(), isClean()); + customer_ = null; + } + return customerBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.CreateCustomerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.CreateCustomerRequest) + private static final com.google.cloud.channel.v1.CreateCustomerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.CreateCustomerRequest(); + } + + public static com.google.cloud.channel.v1.CreateCustomerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateCustomerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateCustomerRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateCustomerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateCustomerRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateCustomerRequestOrBuilder.java new file mode 100644 index 00000000..7e1a5a58 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateCustomerRequestOrBuilder.java @@ -0,0 +1,90 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface CreateCustomerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.CreateCustomerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of reseller account in which to create the customer.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of reseller account in which to create the customer.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The customer to create.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customer field is set. + */ + boolean hasCustomer(); + /** + * + * + *
+   * Required. The customer to create.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customer. + */ + com.google.cloud.channel.v1.Customer getCustomer(); + /** + * + * + *
+   * Required. The customer to create.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.CustomerOrBuilder getCustomerOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateEntitlementRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateEntitlementRequest.java new file mode 100644 index 00000000..f7503d23 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateEntitlementRequest.java @@ -0,0 +1,1207 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement]
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CreateEntitlementRequest} + */ +public final class CreateEntitlementRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.CreateEntitlementRequest) + CreateEntitlementRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEntitlementRequest.newBuilder() to construct. + private CreateEntitlementRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEntitlementRequest() { + parent_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEntitlementRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateEntitlementRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + com.google.cloud.channel.v1.Entitlement.Builder subBuilder = null; + if (entitlement_ != null) { + subBuilder = entitlement_.toBuilder(); + } + entitlement_ = + input.readMessage( + com.google.cloud.channel.v1.Entitlement.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(entitlement_); + entitlement_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateEntitlementRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateEntitlementRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CreateEntitlementRequest.class, + com.google.cloud.channel.v1.CreateEntitlementRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of reseller's customer account in which to create the
+   * entitlement.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of reseller's customer account in which to create the
+   * entitlement.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITLEMENT_FIELD_NUMBER = 2; + private com.google.cloud.channel.v1.Entitlement entitlement_; + /** + * + * + *
+   * Required. The entitlement to create.
+   * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entitlement field is set. + */ + @java.lang.Override + public boolean hasEntitlement() { + return entitlement_ != null; + } + /** + * + * + *
+   * Required. The entitlement to create.
+   * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entitlement. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement getEntitlement() { + return entitlement_ == null + ? com.google.cloud.channel.v1.Entitlement.getDefaultInstance() + : entitlement_; + } + /** + * + * + *
+   * Required. The entitlement to create.
+   * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementOrBuilder() { + return getEntitlement(); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 5; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (entitlement_ != null) { + output.writeMessage(2, getEntitlement()); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (entitlement_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEntitlement()); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.CreateEntitlementRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.CreateEntitlementRequest other = + (com.google.cloud.channel.v1.CreateEntitlementRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (hasEntitlement() != other.hasEntitlement()) return false; + if (hasEntitlement()) { + if (!getEntitlement().equals(other.getEntitlement())) return false; + } + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (hasEntitlement()) { + hash = (37 * hash) + ENTITLEMENT_FIELD_NUMBER; + hash = (53 * hash) + getEntitlement().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.CreateEntitlementRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement]
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CreateEntitlementRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.CreateEntitlementRequest) + com.google.cloud.channel.v1.CreateEntitlementRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateEntitlementRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateEntitlementRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CreateEntitlementRequest.class, + com.google.cloud.channel.v1.CreateEntitlementRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.CreateEntitlementRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (entitlementBuilder_ == null) { + entitlement_ = null; + } else { + entitlement_ = null; + entitlementBuilder_ = null; + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_CreateEntitlementRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateEntitlementRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.CreateEntitlementRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateEntitlementRequest build() { + com.google.cloud.channel.v1.CreateEntitlementRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateEntitlementRequest buildPartial() { + com.google.cloud.channel.v1.CreateEntitlementRequest result = + new com.google.cloud.channel.v1.CreateEntitlementRequest(this); + result.parent_ = parent_; + if (entitlementBuilder_ == null) { + result.entitlement_ = entitlement_; + } else { + result.entitlement_ = entitlementBuilder_.build(); + } + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.CreateEntitlementRequest) { + return mergeFrom((com.google.cloud.channel.v1.CreateEntitlementRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.CreateEntitlementRequest other) { + if (other == com.google.cloud.channel.v1.CreateEntitlementRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.hasEntitlement()) { + mergeEntitlement(other.getEntitlement()); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.CreateEntitlementRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.CreateEntitlementRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of reseller's customer account in which to create the
+     * entitlement.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account in which to create the
+     * entitlement.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account in which to create the
+     * entitlement.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account in which to create the
+     * entitlement.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account in which to create the
+     * entitlement.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.Entitlement entitlement_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder> + entitlementBuilder_; + /** + * + * + *
+     * Required. The entitlement to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entitlement field is set. + */ + public boolean hasEntitlement() { + return entitlementBuilder_ != null || entitlement_ != null; + } + /** + * + * + *
+     * Required. The entitlement to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entitlement. + */ + public com.google.cloud.channel.v1.Entitlement getEntitlement() { + if (entitlementBuilder_ == null) { + return entitlement_ == null + ? com.google.cloud.channel.v1.Entitlement.getDefaultInstance() + : entitlement_; + } else { + return entitlementBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The entitlement to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntitlement(com.google.cloud.channel.v1.Entitlement value) { + if (entitlementBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + entitlement_ = value; + onChanged(); + } else { + entitlementBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The entitlement to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntitlement(com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementBuilder_ == null) { + entitlement_ = builderForValue.build(); + onChanged(); + } else { + entitlementBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The entitlement to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeEntitlement(com.google.cloud.channel.v1.Entitlement value) { + if (entitlementBuilder_ == null) { + if (entitlement_ != null) { + entitlement_ = + com.google.cloud.channel.v1.Entitlement.newBuilder(entitlement_) + .mergeFrom(value) + .buildPartial(); + } else { + entitlement_ = value; + } + onChanged(); + } else { + entitlementBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The entitlement to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEntitlement() { + if (entitlementBuilder_ == null) { + entitlement_ = null; + onChanged(); + } else { + entitlement_ = null; + entitlementBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The entitlement to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Entitlement.Builder getEntitlementBuilder() { + + onChanged(); + return getEntitlementFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The entitlement to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementOrBuilder() { + if (entitlementBuilder_ != null) { + return entitlementBuilder_.getMessageOrBuilder(); + } else { + return entitlement_ == null + ? com.google.cloud.channel.v1.Entitlement.getDefaultInstance() + : entitlement_; + } + } + /** + * + * + *
+     * Required. The entitlement to create.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder> + getEntitlementFieldBuilder() { + if (entitlementBuilder_ == null) { + entitlementBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder>( + getEntitlement(), getParentForChildren(), isClean()); + entitlement_ = null; + } + return entitlementBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.CreateEntitlementRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.CreateEntitlementRequest) + private static final com.google.cloud.channel.v1.CreateEntitlementRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.CreateEntitlementRequest(); + } + + public static com.google.cloud.channel.v1.CreateEntitlementRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEntitlementRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateEntitlementRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CreateEntitlementRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateEntitlementRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateEntitlementRequestOrBuilder.java new file mode 100644 index 00000000..87f0b4e8 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CreateEntitlementRequestOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface CreateEntitlementRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.CreateEntitlementRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of reseller's customer account in which to create the
+   * entitlement.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of reseller's customer account in which to create the
+   * entitlement.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The entitlement to create.
+   * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the entitlement field is set. + */ + boolean hasEntitlement(); + /** + * + * + *
+   * Required. The entitlement to create.
+   * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The entitlement. + */ + com.google.cloud.channel.v1.Entitlement getEntitlement(); + /** + * + * + *
+   * Required. The entitlement to create.
+   * 
+ * + * + * .google.cloud.channel.v1.Entitlement entitlement = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementOrBuilder(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Customer.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Customer.java new file mode 100644 index 00000000..dbc0145a --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Customer.java @@ -0,0 +1,3296 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/customers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Entity representing a customer of a reseller or distributor.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Customer} + */ +public final class Customer extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Customer) + CustomerOrBuilder { + private static final long serialVersionUID = 0L; + // Use Customer.newBuilder() to construct. + private Customer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Customer() { + name_ = ""; + orgDisplayName_ = ""; + alternateEmail_ = ""; + domain_ = ""; + cloudIdentityId_ = ""; + languageCode_ = ""; + channelPartnerId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Customer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Customer( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + orgDisplayName_ = s; + break; + } + case 26: + { + com.google.type.PostalAddress.Builder subBuilder = null; + if (orgPostalAddress_ != null) { + subBuilder = orgPostalAddress_.toBuilder(); + } + orgPostalAddress_ = + input.readMessage(com.google.type.PostalAddress.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(orgPostalAddress_); + orgPostalAddress_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.channel.v1.ContactInfo.Builder subBuilder = null; + if (primaryContactInfo_ != null) { + subBuilder = primaryContactInfo_.toBuilder(); + } + primaryContactInfo_ = + input.readMessage( + com.google.cloud.channel.v1.ContactInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(primaryContactInfo_); + primaryContactInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + alternateEmail_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + domain_ = s; + break; + } + case 58: + { + 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 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + java.lang.String s = input.readStringRequireUtf8(); + + cloudIdentityId_ = s; + break; + } + case 82: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 98: + { + com.google.cloud.channel.v1.CloudIdentityInfo.Builder subBuilder = null; + if (cloudIdentityInfo_ != null) { + subBuilder = cloudIdentityInfo_.toBuilder(); + } + cloudIdentityInfo_ = + input.readMessage( + com.google.cloud.channel.v1.CloudIdentityInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cloudIdentityInfo_); + cloudIdentityInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 106: + { + java.lang.String s = input.readStringRequireUtf8(); + + channelPartnerId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CustomersProto + .internal_static_google_cloud_channel_v1_Customer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CustomersProto + .internal_static_google_cloud_channel_v1_Customer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Customer.class, + com.google.cloud.channel.v1.Customer.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of the customer.
+   * Format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of the customer.
+   * Format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORG_DISPLAY_NAME_FIELD_NUMBER = 2; + private volatile java.lang.Object orgDisplayName_; + /** + * + * + *
+   * Required. Name of the organization that the customer entity represents.
+   * 
+ * + * string org_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The orgDisplayName. + */ + @java.lang.Override + public java.lang.String getOrgDisplayName() { + java.lang.Object ref = orgDisplayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orgDisplayName_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Name of the organization that the customer entity represents.
+   * 
+ * + * string org_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for orgDisplayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOrgDisplayNameBytes() { + java.lang.Object ref = orgDisplayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orgDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ORG_POSTAL_ADDRESS_FIELD_NUMBER = 3; + private com.google.type.PostalAddress orgPostalAddress_; + /** + * + * + *
+   * Required. Address of the organization of the customer entity.
+   * Region and zip codes are required to enforce US laws and embargoes.
+   * Language code is discarded. Use the Customer-level language code to set the
+   * customer's language.
+   * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the orgPostalAddress field is set. + */ + @java.lang.Override + public boolean hasOrgPostalAddress() { + return orgPostalAddress_ != null; + } + /** + * + * + *
+   * Required. Address of the organization of the customer entity.
+   * Region and zip codes are required to enforce US laws and embargoes.
+   * Language code is discarded. Use the Customer-level language code to set the
+   * customer's language.
+   * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The orgPostalAddress. + */ + @java.lang.Override + public com.google.type.PostalAddress getOrgPostalAddress() { + return orgPostalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : orgPostalAddress_; + } + /** + * + * + *
+   * Required. Address of the organization of the customer entity.
+   * Region and zip codes are required to enforce US laws and embargoes.
+   * Language code is discarded. Use the Customer-level language code to set the
+   * customer's language.
+   * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.type.PostalAddressOrBuilder getOrgPostalAddressOrBuilder() { + return getOrgPostalAddress(); + } + + public static final int PRIMARY_CONTACT_INFO_FIELD_NUMBER = 4; + private com.google.cloud.channel.v1.ContactInfo primaryContactInfo_; + /** + * + * + *
+   * Primary contact info.
+   * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + * + * @return Whether the primaryContactInfo field is set. + */ + @java.lang.Override + public boolean hasPrimaryContactInfo() { + return primaryContactInfo_ != null; + } + /** + * + * + *
+   * Primary contact info.
+   * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + * + * @return The primaryContactInfo. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ContactInfo getPrimaryContactInfo() { + return primaryContactInfo_ == null + ? com.google.cloud.channel.v1.ContactInfo.getDefaultInstance() + : primaryContactInfo_; + } + /** + * + * + *
+   * Primary contact info.
+   * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ContactInfoOrBuilder getPrimaryContactInfoOrBuilder() { + return getPrimaryContactInfo(); + } + + public static final int ALTERNATE_EMAIL_FIELD_NUMBER = 5; + private volatile java.lang.Object alternateEmail_; + /** + * + * + *
+   * Secondary contact email.
+   * Alternate email and primary contact email are required to have different
+   * domains if primary contact email is present.
+   * When creating admin.google.com accounts, users get notified credentials at
+   * this email. This email address is also used as a recovery email.
+   * 
+ * + * string alternate_email = 5; + * + * @return The alternateEmail. + */ + @java.lang.Override + public java.lang.String getAlternateEmail() { + java.lang.Object ref = alternateEmail_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alternateEmail_ = s; + return s; + } + } + /** + * + * + *
+   * Secondary contact email.
+   * Alternate email and primary contact email are required to have different
+   * domains if primary contact email is present.
+   * When creating admin.google.com accounts, users get notified credentials at
+   * this email. This email address is also used as a recovery email.
+   * 
+ * + * string alternate_email = 5; + * + * @return The bytes for alternateEmail. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAlternateEmailBytes() { + java.lang.Object ref = alternateEmail_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + alternateEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOMAIN_FIELD_NUMBER = 6; + private volatile java.lang.Object domain_; + /** + * + * + *
+   * Required. Primary domain used by the customer.
+   * Domain of primary contact email is required to be same as the provided
+   * domain.
+   * 
+ * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The domain. + */ + @java.lang.Override + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Primary domain used by the customer.
+   * Domain of primary contact email is required to be same as the provided
+   * domain.
+   * 
+ * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for domain. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which the customer is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which the customer is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which the customer is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which the customer is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which the customer is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time at which the customer is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int CLOUD_IDENTITY_ID_FIELD_NUMBER = 9; + private volatile java.lang.Object cloudIdentityId_; + /** + * + * + *
+   * Output only. Customer's cloud_identity_id.
+   * Populated only if a Cloud Identity resource exists for this customer.
+   * 
+ * + * string cloud_identity_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The cloudIdentityId. + */ + @java.lang.Override + public java.lang.String getCloudIdentityId() { + java.lang.Object ref = cloudIdentityId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudIdentityId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Customer's cloud_identity_id.
+   * Populated only if a Cloud Identity resource exists for this customer.
+   * 
+ * + * string cloud_identity_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for cloudIdentityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudIdentityIdBytes() { + java.lang.Object ref = cloudIdentityId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudIdentityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 10; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_IDENTITY_INFO_FIELD_NUMBER = 12; + private com.google.cloud.channel.v1.CloudIdentityInfo cloudIdentityInfo_; + /** + * + * + *
+   * Output only. Cloud Identity information for the customer.
+   * Populated only if a Cloud Identity account exists for this customer.
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudIdentityInfo field is set. + */ + @java.lang.Override + public boolean hasCloudIdentityInfo() { + return cloudIdentityInfo_ != null; + } + /** + * + * + *
+   * Output only. Cloud Identity information for the customer.
+   * Populated only if a Cloud Identity account exists for this customer.
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudIdentityInfo. + */ + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfo getCloudIdentityInfo() { + return cloudIdentityInfo_ == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.getDefaultInstance() + : cloudIdentityInfo_; + } + /** + * + * + *
+   * Output only. Cloud Identity information for the customer.
+   * Populated only if a Cloud Identity account exists for this customer.
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder getCloudIdentityInfoOrBuilder() { + return getCloudIdentityInfo(); + } + + public static final int CHANNEL_PARTNER_ID_FIELD_NUMBER = 13; + private volatile java.lang.Object channelPartnerId_; + /** + * + * + *
+   * Cloud Identity ID of the customer's channel partner.
+   * Populated only if a channel partner exists for this customer.
+   * 
+ * + * string channel_partner_id = 13; + * + * @return The channelPartnerId. + */ + @java.lang.Override + public java.lang.String getChannelPartnerId() { + java.lang.Object ref = channelPartnerId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelPartnerId_ = s; + return s; + } + } + /** + * + * + *
+   * Cloud Identity ID of the customer's channel partner.
+   * Populated only if a channel partner exists for this customer.
+   * 
+ * + * string channel_partner_id = 13; + * + * @return The bytes for channelPartnerId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getChannelPartnerIdBytes() { + java.lang.Object ref = channelPartnerId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + channelPartnerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getOrgDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, orgDisplayName_); + } + if (orgPostalAddress_ != null) { + output.writeMessage(3, getOrgPostalAddress()); + } + if (primaryContactInfo_ != null) { + output.writeMessage(4, getPrimaryContactInfo()); + } + if (!getAlternateEmailBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, alternateEmail_); + } + if (!getDomainBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, domain_); + } + if (createTime_ != null) { + output.writeMessage(7, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(8, getUpdateTime()); + } + if (!getCloudIdentityIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 9, cloudIdentityId_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 10, languageCode_); + } + if (cloudIdentityInfo_ != null) { + output.writeMessage(12, getCloudIdentityInfo()); + } + if (!getChannelPartnerIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 13, channelPartnerId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getOrgDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, orgDisplayName_); + } + if (orgPostalAddress_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getOrgPostalAddress()); + } + if (primaryContactInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPrimaryContactInfo()); + } + if (!getAlternateEmailBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, alternateEmail_); + } + if (!getDomainBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, domain_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getUpdateTime()); + } + if (!getCloudIdentityIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, cloudIdentityId_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, languageCode_); + } + if (cloudIdentityInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCloudIdentityInfo()); + } + if (!getChannelPartnerIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, channelPartnerId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Customer)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Customer other = (com.google.cloud.channel.v1.Customer) obj; + + if (!getName().equals(other.getName())) return false; + if (!getOrgDisplayName().equals(other.getOrgDisplayName())) return false; + if (hasOrgPostalAddress() != other.hasOrgPostalAddress()) return false; + if (hasOrgPostalAddress()) { + if (!getOrgPostalAddress().equals(other.getOrgPostalAddress())) return false; + } + if (hasPrimaryContactInfo() != other.hasPrimaryContactInfo()) return false; + if (hasPrimaryContactInfo()) { + if (!getPrimaryContactInfo().equals(other.getPrimaryContactInfo())) return false; + } + if (!getAlternateEmail().equals(other.getAlternateEmail())) return false; + if (!getDomain().equals(other.getDomain())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getCloudIdentityId().equals(other.getCloudIdentityId())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (hasCloudIdentityInfo() != other.hasCloudIdentityInfo()) return false; + if (hasCloudIdentityInfo()) { + if (!getCloudIdentityInfo().equals(other.getCloudIdentityInfo())) return false; + } + if (!getChannelPartnerId().equals(other.getChannelPartnerId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + ORG_DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getOrgDisplayName().hashCode(); + if (hasOrgPostalAddress()) { + hash = (37 * hash) + ORG_POSTAL_ADDRESS_FIELD_NUMBER; + hash = (53 * hash) + getOrgPostalAddress().hashCode(); + } + if (hasPrimaryContactInfo()) { + hash = (37 * hash) + PRIMARY_CONTACT_INFO_FIELD_NUMBER; + hash = (53 * hash) + getPrimaryContactInfo().hashCode(); + } + hash = (37 * hash) + ALTERNATE_EMAIL_FIELD_NUMBER; + hash = (53 * hash) + getAlternateEmail().hashCode(); + hash = (37 * hash) + DOMAIN_FIELD_NUMBER; + hash = (53 * hash) + getDomain().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + CLOUD_IDENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getCloudIdentityId().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + if (hasCloudIdentityInfo()) { + hash = (37 * hash) + CLOUD_IDENTITY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getCloudIdentityInfo().hashCode(); + } + hash = (37 * hash) + CHANNEL_PARTNER_ID_FIELD_NUMBER; + hash = (53 * hash) + getChannelPartnerId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Customer parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Customer parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Customer parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Customer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Customer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Customer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Customer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Customer parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Customer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Customer parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Customer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Customer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Customer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Entity representing a customer of a reseller or distributor.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Customer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Customer) + com.google.cloud.channel.v1.CustomerOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CustomersProto + .internal_static_google_cloud_channel_v1_Customer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CustomersProto + .internal_static_google_cloud_channel_v1_Customer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Customer.class, + com.google.cloud.channel.v1.Customer.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Customer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + orgDisplayName_ = ""; + + if (orgPostalAddressBuilder_ == null) { + orgPostalAddress_ = null; + } else { + orgPostalAddress_ = null; + orgPostalAddressBuilder_ = null; + } + if (primaryContactInfoBuilder_ == null) { + primaryContactInfo_ = null; + } else { + primaryContactInfo_ = null; + primaryContactInfoBuilder_ = null; + } + alternateEmail_ = ""; + + domain_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + cloudIdentityId_ = ""; + + languageCode_ = ""; + + if (cloudIdentityInfoBuilder_ == null) { + cloudIdentityInfo_ = null; + } else { + cloudIdentityInfo_ = null; + cloudIdentityInfoBuilder_ = null; + } + channelPartnerId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.CustomersProto + .internal_static_google_cloud_channel_v1_Customer_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Customer getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Customer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Customer build() { + com.google.cloud.channel.v1.Customer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Customer buildPartial() { + com.google.cloud.channel.v1.Customer result = new com.google.cloud.channel.v1.Customer(this); + result.name_ = name_; + result.orgDisplayName_ = orgDisplayName_; + if (orgPostalAddressBuilder_ == null) { + result.orgPostalAddress_ = orgPostalAddress_; + } else { + result.orgPostalAddress_ = orgPostalAddressBuilder_.build(); + } + if (primaryContactInfoBuilder_ == null) { + result.primaryContactInfo_ = primaryContactInfo_; + } else { + result.primaryContactInfo_ = primaryContactInfoBuilder_.build(); + } + result.alternateEmail_ = alternateEmail_; + result.domain_ = domain_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.cloudIdentityId_ = cloudIdentityId_; + result.languageCode_ = languageCode_; + if (cloudIdentityInfoBuilder_ == null) { + result.cloudIdentityInfo_ = cloudIdentityInfo_; + } else { + result.cloudIdentityInfo_ = cloudIdentityInfoBuilder_.build(); + } + result.channelPartnerId_ = channelPartnerId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Customer) { + return mergeFrom((com.google.cloud.channel.v1.Customer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Customer other) { + if (other == com.google.cloud.channel.v1.Customer.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getOrgDisplayName().isEmpty()) { + orgDisplayName_ = other.orgDisplayName_; + onChanged(); + } + if (other.hasOrgPostalAddress()) { + mergeOrgPostalAddress(other.getOrgPostalAddress()); + } + if (other.hasPrimaryContactInfo()) { + mergePrimaryContactInfo(other.getPrimaryContactInfo()); + } + if (!other.getAlternateEmail().isEmpty()) { + alternateEmail_ = other.alternateEmail_; + onChanged(); + } + if (!other.getDomain().isEmpty()) { + domain_ = other.domain_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getCloudIdentityId().isEmpty()) { + cloudIdentityId_ = other.cloudIdentityId_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + if (other.hasCloudIdentityInfo()) { + mergeCloudIdentityInfo(other.getCloudIdentityInfo()); + } + if (!other.getChannelPartnerId().isEmpty()) { + channelPartnerId_ = other.channelPartnerId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Customer parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Customer) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of the customer.
+     * Format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the customer.
+     * Format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of the customer.
+     * Format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the customer.
+     * Format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of the customer.
+     * Format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object orgDisplayName_ = ""; + /** + * + * + *
+     * Required. Name of the organization that the customer entity represents.
+     * 
+ * + * string org_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The orgDisplayName. + */ + public java.lang.String getOrgDisplayName() { + java.lang.Object ref = orgDisplayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + orgDisplayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Name of the organization that the customer entity represents.
+     * 
+ * + * string org_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for orgDisplayName. + */ + public com.google.protobuf.ByteString getOrgDisplayNameBytes() { + java.lang.Object ref = orgDisplayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + orgDisplayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Name of the organization that the customer entity represents.
+     * 
+ * + * string org_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The orgDisplayName to set. + * @return This builder for chaining. + */ + public Builder setOrgDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + orgDisplayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the organization that the customer entity represents.
+     * 
+ * + * string org_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearOrgDisplayName() { + + orgDisplayName_ = getDefaultInstance().getOrgDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Name of the organization that the customer entity represents.
+     * 
+ * + * string org_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for orgDisplayName to set. + * @return This builder for chaining. + */ + public Builder setOrgDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + orgDisplayName_ = value; + onChanged(); + return this; + } + + private com.google.type.PostalAddress orgPostalAddress_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + orgPostalAddressBuilder_; + /** + * + * + *
+     * Required. Address of the organization of the customer entity.
+     * Region and zip codes are required to enforce US laws and embargoes.
+     * Language code is discarded. Use the Customer-level language code to set the
+     * customer's language.
+     * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the orgPostalAddress field is set. + */ + public boolean hasOrgPostalAddress() { + return orgPostalAddressBuilder_ != null || orgPostalAddress_ != null; + } + /** + * + * + *
+     * Required. Address of the organization of the customer entity.
+     * Region and zip codes are required to enforce US laws and embargoes.
+     * Language code is discarded. Use the Customer-level language code to set the
+     * customer's language.
+     * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The orgPostalAddress. + */ + public com.google.type.PostalAddress getOrgPostalAddress() { + if (orgPostalAddressBuilder_ == null) { + return orgPostalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : orgPostalAddress_; + } else { + return orgPostalAddressBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. Address of the organization of the customer entity.
+     * Region and zip codes are required to enforce US laws and embargoes.
+     * Language code is discarded. Use the Customer-level language code to set the
+     * customer's language.
+     * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOrgPostalAddress(com.google.type.PostalAddress value) { + if (orgPostalAddressBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + orgPostalAddress_ = value; + onChanged(); + } else { + orgPostalAddressBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. Address of the organization of the customer entity.
+     * Region and zip codes are required to enforce US laws and embargoes.
+     * Language code is discarded. Use the Customer-level language code to set the
+     * customer's language.
+     * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setOrgPostalAddress(com.google.type.PostalAddress.Builder builderForValue) { + if (orgPostalAddressBuilder_ == null) { + orgPostalAddress_ = builderForValue.build(); + onChanged(); + } else { + orgPostalAddressBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. Address of the organization of the customer entity.
+     * Region and zip codes are required to enforce US laws and embargoes.
+     * Language code is discarded. Use the Customer-level language code to set the
+     * customer's language.
+     * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeOrgPostalAddress(com.google.type.PostalAddress value) { + if (orgPostalAddressBuilder_ == null) { + if (orgPostalAddress_ != null) { + orgPostalAddress_ = + com.google.type.PostalAddress.newBuilder(orgPostalAddress_) + .mergeFrom(value) + .buildPartial(); + } else { + orgPostalAddress_ = value; + } + onChanged(); + } else { + orgPostalAddressBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. Address of the organization of the customer entity.
+     * Region and zip codes are required to enforce US laws and embargoes.
+     * Language code is discarded. Use the Customer-level language code to set the
+     * customer's language.
+     * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearOrgPostalAddress() { + if (orgPostalAddressBuilder_ == null) { + orgPostalAddress_ = null; + onChanged(); + } else { + orgPostalAddress_ = null; + orgPostalAddressBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. Address of the organization of the customer entity.
+     * Region and zip codes are required to enforce US laws and embargoes.
+     * Language code is discarded. Use the Customer-level language code to set the
+     * customer's language.
+     * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.type.PostalAddress.Builder getOrgPostalAddressBuilder() { + + onChanged(); + return getOrgPostalAddressFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. Address of the organization of the customer entity.
+     * Region and zip codes are required to enforce US laws and embargoes.
+     * Language code is discarded. Use the Customer-level language code to set the
+     * customer's language.
+     * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.type.PostalAddressOrBuilder getOrgPostalAddressOrBuilder() { + if (orgPostalAddressBuilder_ != null) { + return orgPostalAddressBuilder_.getMessageOrBuilder(); + } else { + return orgPostalAddress_ == null + ? com.google.type.PostalAddress.getDefaultInstance() + : orgPostalAddress_; + } + } + /** + * + * + *
+     * Required. Address of the organization of the customer entity.
+     * Region and zip codes are required to enforce US laws and embargoes.
+     * Language code is discarded. Use the Customer-level language code to set the
+     * customer's language.
+     * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder> + getOrgPostalAddressFieldBuilder() { + if (orgPostalAddressBuilder_ == null) { + orgPostalAddressBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.PostalAddress, + com.google.type.PostalAddress.Builder, + com.google.type.PostalAddressOrBuilder>( + getOrgPostalAddress(), getParentForChildren(), isClean()); + orgPostalAddress_ = null; + } + return orgPostalAddressBuilder_; + } + + private com.google.cloud.channel.v1.ContactInfo primaryContactInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ContactInfo, + com.google.cloud.channel.v1.ContactInfo.Builder, + com.google.cloud.channel.v1.ContactInfoOrBuilder> + primaryContactInfoBuilder_; + /** + * + * + *
+     * Primary contact info.
+     * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + * + * @return Whether the primaryContactInfo field is set. + */ + public boolean hasPrimaryContactInfo() { + return primaryContactInfoBuilder_ != null || primaryContactInfo_ != null; + } + /** + * + * + *
+     * Primary contact info.
+     * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + * + * @return The primaryContactInfo. + */ + public com.google.cloud.channel.v1.ContactInfo getPrimaryContactInfo() { + if (primaryContactInfoBuilder_ == null) { + return primaryContactInfo_ == null + ? com.google.cloud.channel.v1.ContactInfo.getDefaultInstance() + : primaryContactInfo_; + } else { + return primaryContactInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Primary contact info.
+     * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + */ + public Builder setPrimaryContactInfo(com.google.cloud.channel.v1.ContactInfo value) { + if (primaryContactInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + primaryContactInfo_ = value; + onChanged(); + } else { + primaryContactInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Primary contact info.
+     * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + */ + public Builder setPrimaryContactInfo( + com.google.cloud.channel.v1.ContactInfo.Builder builderForValue) { + if (primaryContactInfoBuilder_ == null) { + primaryContactInfo_ = builderForValue.build(); + onChanged(); + } else { + primaryContactInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Primary contact info.
+     * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + */ + public Builder mergePrimaryContactInfo(com.google.cloud.channel.v1.ContactInfo value) { + if (primaryContactInfoBuilder_ == null) { + if (primaryContactInfo_ != null) { + primaryContactInfo_ = + com.google.cloud.channel.v1.ContactInfo.newBuilder(primaryContactInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + primaryContactInfo_ = value; + } + onChanged(); + } else { + primaryContactInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Primary contact info.
+     * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + */ + public Builder clearPrimaryContactInfo() { + if (primaryContactInfoBuilder_ == null) { + primaryContactInfo_ = null; + onChanged(); + } else { + primaryContactInfo_ = null; + primaryContactInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Primary contact info.
+     * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + */ + public com.google.cloud.channel.v1.ContactInfo.Builder getPrimaryContactInfoBuilder() { + + onChanged(); + return getPrimaryContactInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Primary contact info.
+     * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + */ + public com.google.cloud.channel.v1.ContactInfoOrBuilder getPrimaryContactInfoOrBuilder() { + if (primaryContactInfoBuilder_ != null) { + return primaryContactInfoBuilder_.getMessageOrBuilder(); + } else { + return primaryContactInfo_ == null + ? com.google.cloud.channel.v1.ContactInfo.getDefaultInstance() + : primaryContactInfo_; + } + } + /** + * + * + *
+     * Primary contact info.
+     * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ContactInfo, + com.google.cloud.channel.v1.ContactInfo.Builder, + com.google.cloud.channel.v1.ContactInfoOrBuilder> + getPrimaryContactInfoFieldBuilder() { + if (primaryContactInfoBuilder_ == null) { + primaryContactInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ContactInfo, + com.google.cloud.channel.v1.ContactInfo.Builder, + com.google.cloud.channel.v1.ContactInfoOrBuilder>( + getPrimaryContactInfo(), getParentForChildren(), isClean()); + primaryContactInfo_ = null; + } + return primaryContactInfoBuilder_; + } + + private java.lang.Object alternateEmail_ = ""; + /** + * + * + *
+     * Secondary contact email.
+     * Alternate email and primary contact email are required to have different
+     * domains if primary contact email is present.
+     * When creating admin.google.com accounts, users get notified credentials at
+     * this email. This email address is also used as a recovery email.
+     * 
+ * + * string alternate_email = 5; + * + * @return The alternateEmail. + */ + public java.lang.String getAlternateEmail() { + java.lang.Object ref = alternateEmail_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + alternateEmail_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Secondary contact email.
+     * Alternate email and primary contact email are required to have different
+     * domains if primary contact email is present.
+     * When creating admin.google.com accounts, users get notified credentials at
+     * this email. This email address is also used as a recovery email.
+     * 
+ * + * string alternate_email = 5; + * + * @return The bytes for alternateEmail. + */ + public com.google.protobuf.ByteString getAlternateEmailBytes() { + java.lang.Object ref = alternateEmail_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + alternateEmail_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Secondary contact email.
+     * Alternate email and primary contact email are required to have different
+     * domains if primary contact email is present.
+     * When creating admin.google.com accounts, users get notified credentials at
+     * this email. This email address is also used as a recovery email.
+     * 
+ * + * string alternate_email = 5; + * + * @param value The alternateEmail to set. + * @return This builder for chaining. + */ + public Builder setAlternateEmail(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + alternateEmail_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Secondary contact email.
+     * Alternate email and primary contact email are required to have different
+     * domains if primary contact email is present.
+     * When creating admin.google.com accounts, users get notified credentials at
+     * this email. This email address is also used as a recovery email.
+     * 
+ * + * string alternate_email = 5; + * + * @return This builder for chaining. + */ + public Builder clearAlternateEmail() { + + alternateEmail_ = getDefaultInstance().getAlternateEmail(); + onChanged(); + return this; + } + /** + * + * + *
+     * Secondary contact email.
+     * Alternate email and primary contact email are required to have different
+     * domains if primary contact email is present.
+     * When creating admin.google.com accounts, users get notified credentials at
+     * this email. This email address is also used as a recovery email.
+     * 
+ * + * string alternate_email = 5; + * + * @param value The bytes for alternateEmail to set. + * @return This builder for chaining. + */ + public Builder setAlternateEmailBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + alternateEmail_ = value; + onChanged(); + return this; + } + + private java.lang.Object domain_ = ""; + /** + * + * + *
+     * Required. Primary domain used by the customer.
+     * Domain of primary contact email is required to be same as the provided
+     * domain.
+     * 
+ * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The domain. + */ + public java.lang.String getDomain() { + java.lang.Object ref = domain_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + domain_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Primary domain used by the customer.
+     * Domain of primary contact email is required to be same as the provided
+     * domain.
+     * 
+ * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for domain. + */ + public com.google.protobuf.ByteString getDomainBytes() { + java.lang.Object ref = domain_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + domain_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Primary domain used by the customer.
+     * Domain of primary contact email is required to be same as the provided
+     * domain.
+     * 
+ * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The domain to set. + * @return This builder for chaining. + */ + public Builder setDomain(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + domain_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Primary domain used by the customer.
+     * Domain of primary contact email is required to be same as the provided
+     * domain.
+     * 
+ * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearDomain() { + + domain_ = getDefaultInstance().getDomain(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Primary domain used by the customer.
+     * Domain of primary contact email is required to be same as the provided
+     * domain.
+     * 
+ * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for domain to set. + * @return This builder for chaining. + */ + public Builder setDomainBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + domain_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which the customer is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which the customer is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which the customer is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the customer is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the customer is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the customer is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the customer is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which the customer is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which the customer is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which the customer is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which the customer is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which the customer is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the customer is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the customer is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the customer is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the customer is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which the customer is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time at which the customer is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object cloudIdentityId_ = ""; + /** + * + * + *
+     * Output only. Customer's cloud_identity_id.
+     * Populated only if a Cloud Identity resource exists for this customer.
+     * 
+ * + * string cloud_identity_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The cloudIdentityId. + */ + public java.lang.String getCloudIdentityId() { + java.lang.Object ref = cloudIdentityId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + cloudIdentityId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Customer's cloud_identity_id.
+     * Populated only if a Cloud Identity resource exists for this customer.
+     * 
+ * + * string cloud_identity_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for cloudIdentityId. + */ + public com.google.protobuf.ByteString getCloudIdentityIdBytes() { + java.lang.Object ref = cloudIdentityId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + cloudIdentityId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Customer's cloud_identity_id.
+     * Populated only if a Cloud Identity resource exists for this customer.
+     * 
+ * + * string cloud_identity_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The cloudIdentityId to set. + * @return This builder for chaining. + */ + public Builder setCloudIdentityId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + cloudIdentityId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Customer's cloud_identity_id.
+     * Populated only if a Cloud Identity resource exists for this customer.
+     * 
+ * + * string cloud_identity_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearCloudIdentityId() { + + cloudIdentityId_ = getDefaultInstance().getCloudIdentityId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Customer's cloud_identity_id.
+     * Populated only if a Cloud Identity resource exists for this customer.
+     * 
+ * + * string cloud_identity_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for cloudIdentityId to set. + * @return This builder for chaining. + */ + public Builder setCloudIdentityIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + cloudIdentityId_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+     * information, see
+     * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+     * 
+ * + * string language_code = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.CloudIdentityInfo cloudIdentityInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityInfo, + com.google.cloud.channel.v1.CloudIdentityInfo.Builder, + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder> + cloudIdentityInfoBuilder_; + /** + * + * + *
+     * Output only. Cloud Identity information for the customer.
+     * Populated only if a Cloud Identity account exists for this customer.
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudIdentityInfo field is set. + */ + public boolean hasCloudIdentityInfo() { + return cloudIdentityInfoBuilder_ != null || cloudIdentityInfo_ != null; + } + /** + * + * + *
+     * Output only. Cloud Identity information for the customer.
+     * Populated only if a Cloud Identity account exists for this customer.
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudIdentityInfo. + */ + public com.google.cloud.channel.v1.CloudIdentityInfo getCloudIdentityInfo() { + if (cloudIdentityInfoBuilder_ == null) { + return cloudIdentityInfo_ == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.getDefaultInstance() + : cloudIdentityInfo_; + } else { + return cloudIdentityInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Cloud Identity information for the customer.
+     * Populated only if a Cloud Identity account exists for this customer.
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudIdentityInfo(com.google.cloud.channel.v1.CloudIdentityInfo value) { + if (cloudIdentityInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudIdentityInfo_ = value; + onChanged(); + } else { + cloudIdentityInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Cloud Identity information for the customer.
+     * Populated only if a Cloud Identity account exists for this customer.
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCloudIdentityInfo( + com.google.cloud.channel.v1.CloudIdentityInfo.Builder builderForValue) { + if (cloudIdentityInfoBuilder_ == null) { + cloudIdentityInfo_ = builderForValue.build(); + onChanged(); + } else { + cloudIdentityInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Cloud Identity information for the customer.
+     * Populated only if a Cloud Identity account exists for this customer.
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCloudIdentityInfo(com.google.cloud.channel.v1.CloudIdentityInfo value) { + if (cloudIdentityInfoBuilder_ == null) { + if (cloudIdentityInfo_ != null) { + cloudIdentityInfo_ = + com.google.cloud.channel.v1.CloudIdentityInfo.newBuilder(cloudIdentityInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + cloudIdentityInfo_ = value; + } + onChanged(); + } else { + cloudIdentityInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Cloud Identity information for the customer.
+     * Populated only if a Cloud Identity account exists for this customer.
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCloudIdentityInfo() { + if (cloudIdentityInfoBuilder_ == null) { + cloudIdentityInfo_ = null; + onChanged(); + } else { + cloudIdentityInfo_ = null; + cloudIdentityInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Cloud Identity information for the customer.
+     * Populated only if a Cloud Identity account exists for this customer.
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.channel.v1.CloudIdentityInfo.Builder getCloudIdentityInfoBuilder() { + + onChanged(); + return getCloudIdentityInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Cloud Identity information for the customer.
+     * Populated only if a Cloud Identity account exists for this customer.
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder getCloudIdentityInfoOrBuilder() { + if (cloudIdentityInfoBuilder_ != null) { + return cloudIdentityInfoBuilder_.getMessageOrBuilder(); + } else { + return cloudIdentityInfo_ == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.getDefaultInstance() + : cloudIdentityInfo_; + } + } + /** + * + * + *
+     * Output only. Cloud Identity information for the customer.
+     * Populated only if a Cloud Identity account exists for this customer.
+     * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityInfo, + com.google.cloud.channel.v1.CloudIdentityInfo.Builder, + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder> + getCloudIdentityInfoFieldBuilder() { + if (cloudIdentityInfoBuilder_ == null) { + cloudIdentityInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityInfo, + com.google.cloud.channel.v1.CloudIdentityInfo.Builder, + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder>( + getCloudIdentityInfo(), getParentForChildren(), isClean()); + cloudIdentityInfo_ = null; + } + return cloudIdentityInfoBuilder_; + } + + private java.lang.Object channelPartnerId_ = ""; + /** + * + * + *
+     * Cloud Identity ID of the customer's channel partner.
+     * Populated only if a channel partner exists for this customer.
+     * 
+ * + * string channel_partner_id = 13; + * + * @return The channelPartnerId. + */ + public java.lang.String getChannelPartnerId() { + java.lang.Object ref = channelPartnerId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + channelPartnerId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Cloud Identity ID of the customer's channel partner.
+     * Populated only if a channel partner exists for this customer.
+     * 
+ * + * string channel_partner_id = 13; + * + * @return The bytes for channelPartnerId. + */ + public com.google.protobuf.ByteString getChannelPartnerIdBytes() { + java.lang.Object ref = channelPartnerId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + channelPartnerId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Cloud Identity ID of the customer's channel partner.
+     * Populated only if a channel partner exists for this customer.
+     * 
+ * + * string channel_partner_id = 13; + * + * @param value The channelPartnerId to set. + * @return This builder for chaining. + */ + public Builder setChannelPartnerId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + channelPartnerId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud Identity ID of the customer's channel partner.
+     * Populated only if a channel partner exists for this customer.
+     * 
+ * + * string channel_partner_id = 13; + * + * @return This builder for chaining. + */ + public Builder clearChannelPartnerId() { + + channelPartnerId_ = getDefaultInstance().getChannelPartnerId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Cloud Identity ID of the customer's channel partner.
+     * Populated only if a channel partner exists for this customer.
+     * 
+ * + * string channel_partner_id = 13; + * + * @param value The bytes for channelPartnerId to set. + * @return This builder for chaining. + */ + public Builder setChannelPartnerIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + channelPartnerId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Customer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Customer) + private static final com.google.cloud.channel.v1.Customer DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Customer(); + } + + public static com.google.cloud.channel.v1.Customer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Customer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Customer(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Customer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerConstraints.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerConstraints.java new file mode 100644 index 00000000..f167fb85 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerConstraints.java @@ -0,0 +1,1585 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Represents constraints required to purchase the Offer for a customer.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CustomerConstraints} + */ +public final class CustomerConstraints extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.CustomerConstraints) + CustomerConstraintsOrBuilder { + private static final long serialVersionUID = 0L; + // Use CustomerConstraints.newBuilder() to construct. + private CustomerConstraints(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CustomerConstraints() { + allowedRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + allowedCustomerTypes_ = java.util.Collections.emptyList(); + promotionalOrderTypes_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CustomerConstraints(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CustomerConstraints( + 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)) { + allowedRegions_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + allowedRegions_.add(s); + break; + } + case 16: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + allowedCustomerTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + allowedCustomerTypes_.add(rawValue); + break; + } + case 18: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + allowedCustomerTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + allowedCustomerTypes_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 24: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + promotionalOrderTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + promotionalOrderTypes_.add(rawValue); + break; + } + case 26: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + promotionalOrderTypes_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000004; + } + promotionalOrderTypes_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + allowedRegions_ = allowedRegions_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + allowedCustomerTypes_ = java.util.Collections.unmodifiableList(allowedCustomerTypes_); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + promotionalOrderTypes_ = java.util.Collections.unmodifiableList(promotionalOrderTypes_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_CustomerConstraints_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_CustomerConstraints_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CustomerConstraints.class, + com.google.cloud.channel.v1.CustomerConstraints.Builder.class); + } + + public static final int ALLOWED_REGIONS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList allowedRegions_; + /** + * + * + *
+   * Allowed geographical regions of the customer.
+   * 
+ * + * repeated string allowed_regions = 1; + * + * @return A list containing the allowedRegions. + */ + public com.google.protobuf.ProtocolStringList getAllowedRegionsList() { + return allowedRegions_; + } + /** + * + * + *
+   * Allowed geographical regions of the customer.
+   * 
+ * + * repeated string allowed_regions = 1; + * + * @return The count of allowedRegions. + */ + public int getAllowedRegionsCount() { + return allowedRegions_.size(); + } + /** + * + * + *
+   * Allowed geographical regions of the customer.
+   * 
+ * + * repeated string allowed_regions = 1; + * + * @param index The index of the element to return. + * @return The allowedRegions at the given index. + */ + public java.lang.String getAllowedRegions(int index) { + return allowedRegions_.get(index); + } + /** + * + * + *
+   * Allowed geographical regions of the customer.
+   * 
+ * + * repeated string allowed_regions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the allowedRegions at the given index. + */ + public com.google.protobuf.ByteString getAllowedRegionsBytes(int index) { + return allowedRegions_.getByteString(index); + } + + public static final int ALLOWED_CUSTOMER_TYPES_FIELD_NUMBER = 2; + private java.util.List allowedCustomerTypes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType> + allowedCustomerTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType>() { + public com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType result = + com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType.valueOf(from); + return result == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Allowed Customer Type.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @return A list containing the allowedCustomerTypes. + */ + @java.lang.Override + public java.util.List + getAllowedCustomerTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType>( + allowedCustomerTypes_, allowedCustomerTypes_converter_); + } + /** + * + * + *
+   * Allowed Customer Type.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @return The count of allowedCustomerTypes. + */ + @java.lang.Override + public int getAllowedCustomerTypesCount() { + return allowedCustomerTypes_.size(); + } + /** + * + * + *
+   * Allowed Customer Type.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param index The index of the element to return. + * @return The allowedCustomerTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType getAllowedCustomerTypes( + int index) { + return allowedCustomerTypes_converter_.convert(allowedCustomerTypes_.get(index)); + } + /** + * + * + *
+   * Allowed Customer Type.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @return A list containing the enum numeric values on the wire for allowedCustomerTypes. + */ + @java.lang.Override + public java.util.List getAllowedCustomerTypesValueList() { + return allowedCustomerTypes_; + } + /** + * + * + *
+   * Allowed Customer Type.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of allowedCustomerTypes at the given index. + */ + @java.lang.Override + public int getAllowedCustomerTypesValue(int index) { + return allowedCustomerTypes_.get(index); + } + + private int allowedCustomerTypesMemoizedSerializedSize; + + public static final int PROMOTIONAL_ORDER_TYPES_FIELD_NUMBER = 3; + private java.util.List promotionalOrderTypes_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.channel.v1.PromotionalOrderType> + promotionalOrderTypes_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.channel.v1.PromotionalOrderType>() { + public com.google.cloud.channel.v1.PromotionalOrderType convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.PromotionalOrderType result = + com.google.cloud.channel.v1.PromotionalOrderType.valueOf(from); + return result == null + ? com.google.cloud.channel.v1.PromotionalOrderType.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Allowed Promotional Order Type. Present for Promotional offers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @return A list containing the promotionalOrderTypes. + */ + @java.lang.Override + public java.util.List + getPromotionalOrderTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.channel.v1.PromotionalOrderType>( + promotionalOrderTypes_, promotionalOrderTypes_converter_); + } + /** + * + * + *
+   * Allowed Promotional Order Type. Present for Promotional offers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @return The count of promotionalOrderTypes. + */ + @java.lang.Override + public int getPromotionalOrderTypesCount() { + return promotionalOrderTypes_.size(); + } + /** + * + * + *
+   * Allowed Promotional Order Type. Present for Promotional offers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param index The index of the element to return. + * @return The promotionalOrderTypes at the given index. + */ + @java.lang.Override + public com.google.cloud.channel.v1.PromotionalOrderType getPromotionalOrderTypes(int index) { + return promotionalOrderTypes_converter_.convert(promotionalOrderTypes_.get(index)); + } + /** + * + * + *
+   * Allowed Promotional Order Type. Present for Promotional offers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @return A list containing the enum numeric values on the wire for promotionalOrderTypes. + */ + @java.lang.Override + public java.util.List getPromotionalOrderTypesValueList() { + return promotionalOrderTypes_; + } + /** + * + * + *
+   * Allowed Promotional Order Type. Present for Promotional offers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of promotionalOrderTypes at the given index. + */ + @java.lang.Override + public int getPromotionalOrderTypesValue(int index) { + return promotionalOrderTypes_.get(index); + } + + private int promotionalOrderTypesMemoizedSerializedSize; + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + for (int i = 0; i < allowedRegions_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, allowedRegions_.getRaw(i)); + } + if (getAllowedCustomerTypesList().size() > 0) { + output.writeUInt32NoTag(18); + output.writeUInt32NoTag(allowedCustomerTypesMemoizedSerializedSize); + } + for (int i = 0; i < allowedCustomerTypes_.size(); i++) { + output.writeEnumNoTag(allowedCustomerTypes_.get(i)); + } + if (getPromotionalOrderTypesList().size() > 0) { + output.writeUInt32NoTag(26); + output.writeUInt32NoTag(promotionalOrderTypesMemoizedSerializedSize); + } + for (int i = 0; i < promotionalOrderTypes_.size(); i++) { + output.writeEnumNoTag(promotionalOrderTypes_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < allowedRegions_.size(); i++) { + dataSize += computeStringSizeNoTag(allowedRegions_.getRaw(i)); + } + size += dataSize; + size += 1 * getAllowedRegionsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < allowedCustomerTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + allowedCustomerTypes_.get(i)); + } + size += dataSize; + if (!getAllowedCustomerTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + allowedCustomerTypesMemoizedSerializedSize = dataSize; + } + { + int dataSize = 0; + for (int i = 0; i < promotionalOrderTypes_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag( + promotionalOrderTypes_.get(i)); + } + size += dataSize; + if (!getPromotionalOrderTypesList().isEmpty()) { + size += 1; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + promotionalOrderTypesMemoizedSerializedSize = dataSize; + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.CustomerConstraints)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.CustomerConstraints other = + (com.google.cloud.channel.v1.CustomerConstraints) obj; + + if (!getAllowedRegionsList().equals(other.getAllowedRegionsList())) return false; + if (!allowedCustomerTypes_.equals(other.allowedCustomerTypes_)) return false; + if (!promotionalOrderTypes_.equals(other.promotionalOrderTypes_)) return false; + if (!unknownFields.equals(other.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 (getAllowedRegionsCount() > 0) { + hash = (37 * hash) + ALLOWED_REGIONS_FIELD_NUMBER; + hash = (53 * hash) + getAllowedRegionsList().hashCode(); + } + if (getAllowedCustomerTypesCount() > 0) { + hash = (37 * hash) + ALLOWED_CUSTOMER_TYPES_FIELD_NUMBER; + hash = (53 * hash) + allowedCustomerTypes_.hashCode(); + } + if (getPromotionalOrderTypesCount() > 0) { + hash = (37 * hash) + PROMOTIONAL_ORDER_TYPES_FIELD_NUMBER; + hash = (53 * hash) + promotionalOrderTypes_.hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.CustomerConstraints parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.CustomerConstraints prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 constraints required to purchase the Offer for a customer.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.CustomerConstraints} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.CustomerConstraints) + com.google.cloud.channel.v1.CustomerConstraintsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_CustomerConstraints_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_CustomerConstraints_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.CustomerConstraints.class, + com.google.cloud.channel.v1.CustomerConstraints.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.CustomerConstraints.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + allowedRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + allowedCustomerTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + promotionalOrderTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_CustomerConstraints_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CustomerConstraints getDefaultInstanceForType() { + return com.google.cloud.channel.v1.CustomerConstraints.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.CustomerConstraints build() { + com.google.cloud.channel.v1.CustomerConstraints result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CustomerConstraints buildPartial() { + com.google.cloud.channel.v1.CustomerConstraints result = + new com.google.cloud.channel.v1.CustomerConstraints(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + allowedRegions_ = allowedRegions_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedRegions_ = allowedRegions_; + if (((bitField0_ & 0x00000002) != 0)) { + allowedCustomerTypes_ = java.util.Collections.unmodifiableList(allowedCustomerTypes_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.allowedCustomerTypes_ = allowedCustomerTypes_; + if (((bitField0_ & 0x00000004) != 0)) { + promotionalOrderTypes_ = java.util.Collections.unmodifiableList(promotionalOrderTypes_); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.promotionalOrderTypes_ = promotionalOrderTypes_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.CustomerConstraints) { + return mergeFrom((com.google.cloud.channel.v1.CustomerConstraints) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.CustomerConstraints other) { + if (other == com.google.cloud.channel.v1.CustomerConstraints.getDefaultInstance()) + return this; + if (!other.allowedRegions_.isEmpty()) { + if (allowedRegions_.isEmpty()) { + allowedRegions_ = other.allowedRegions_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedRegionsIsMutable(); + allowedRegions_.addAll(other.allowedRegions_); + } + onChanged(); + } + if (!other.allowedCustomerTypes_.isEmpty()) { + if (allowedCustomerTypes_.isEmpty()) { + allowedCustomerTypes_ = other.allowedCustomerTypes_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureAllowedCustomerTypesIsMutable(); + allowedCustomerTypes_.addAll(other.allowedCustomerTypes_); + } + onChanged(); + } + if (!other.promotionalOrderTypes_.isEmpty()) { + if (promotionalOrderTypes_.isEmpty()) { + promotionalOrderTypes_ = other.promotionalOrderTypes_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensurePromotionalOrderTypesIsMutable(); + promotionalOrderTypes_.addAll(other.promotionalOrderTypes_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.CustomerConstraints parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.CustomerConstraints) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList allowedRegions_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAllowedRegionsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedRegions_ = new com.google.protobuf.LazyStringArrayList(allowedRegions_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Allowed geographical regions of the customer.
+     * 
+ * + * repeated string allowed_regions = 1; + * + * @return A list containing the allowedRegions. + */ + public com.google.protobuf.ProtocolStringList getAllowedRegionsList() { + return allowedRegions_.getUnmodifiableView(); + } + /** + * + * + *
+     * Allowed geographical regions of the customer.
+     * 
+ * + * repeated string allowed_regions = 1; + * + * @return The count of allowedRegions. + */ + public int getAllowedRegionsCount() { + return allowedRegions_.size(); + } + /** + * + * + *
+     * Allowed geographical regions of the customer.
+     * 
+ * + * repeated string allowed_regions = 1; + * + * @param index The index of the element to return. + * @return The allowedRegions at the given index. + */ + public java.lang.String getAllowedRegions(int index) { + return allowedRegions_.get(index); + } + /** + * + * + *
+     * Allowed geographical regions of the customer.
+     * 
+ * + * repeated string allowed_regions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the allowedRegions at the given index. + */ + public com.google.protobuf.ByteString getAllowedRegionsBytes(int index) { + return allowedRegions_.getByteString(index); + } + /** + * + * + *
+     * Allowed geographical regions of the customer.
+     * 
+ * + * repeated string allowed_regions = 1; + * + * @param index The index to set the value at. + * @param value The allowedRegions to set. + * @return This builder for chaining. + */ + public Builder setAllowedRegions(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedRegionsIsMutable(); + allowedRegions_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed geographical regions of the customer.
+     * 
+ * + * repeated string allowed_regions = 1; + * + * @param value The allowedRegions to add. + * @return This builder for chaining. + */ + public Builder addAllowedRegions(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedRegionsIsMutable(); + allowedRegions_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed geographical regions of the customer.
+     * 
+ * + * repeated string allowed_regions = 1; + * + * @param values The allowedRegions to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedRegions(java.lang.Iterable values) { + ensureAllowedRegionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedRegions_); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed geographical regions of the customer.
+     * 
+ * + * repeated string allowed_regions = 1; + * + * @return This builder for chaining. + */ + public Builder clearAllowedRegions() { + allowedRegions_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed geographical regions of the customer.
+     * 
+ * + * repeated string allowed_regions = 1; + * + * @param value The bytes of the allowedRegions to add. + * @return This builder for chaining. + */ + public Builder addAllowedRegionsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAllowedRegionsIsMutable(); + allowedRegions_.add(value); + onChanged(); + return this; + } + + private java.util.List allowedCustomerTypes_ = + java.util.Collections.emptyList(); + + private void ensureAllowedCustomerTypesIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + allowedCustomerTypes_ = new java.util.ArrayList(allowedCustomerTypes_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @return A list containing the allowedCustomerTypes. + */ + public java.util.List + getAllowedCustomerTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType>( + allowedCustomerTypes_, allowedCustomerTypes_converter_); + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @return The count of allowedCustomerTypes. + */ + public int getAllowedCustomerTypesCount() { + return allowedCustomerTypes_.size(); + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param index The index of the element to return. + * @return The allowedCustomerTypes at the given index. + */ + public com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType getAllowedCustomerTypes( + int index) { + return allowedCustomerTypes_converter_.convert(allowedCustomerTypes_.get(index)); + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param index The index to set the value at. + * @param value The allowedCustomerTypes to set. + * @return This builder for chaining. + */ + public Builder setAllowedCustomerTypes( + int index, com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedCustomerTypesIsMutable(); + allowedCustomerTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param value The allowedCustomerTypes to add. + * @return This builder for chaining. + */ + public Builder addAllowedCustomerTypes( + com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedCustomerTypesIsMutable(); + allowedCustomerTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param values The allowedCustomerTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedCustomerTypes( + java.lang.Iterable + values) { + ensureAllowedCustomerTypesIsMutable(); + for (com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType value : values) { + allowedCustomerTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @return This builder for chaining. + */ + public Builder clearAllowedCustomerTypes() { + allowedCustomerTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @return A list containing the enum numeric values on the wire for allowedCustomerTypes. + */ + public java.util.List getAllowedCustomerTypesValueList() { + return java.util.Collections.unmodifiableList(allowedCustomerTypes_); + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of allowedCustomerTypes at the given index. + */ + public int getAllowedCustomerTypesValue(int index) { + return allowedCustomerTypes_.get(index); + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of allowedCustomerTypes at the given index. + * @return This builder for chaining. + */ + public Builder setAllowedCustomerTypesValue(int index, int value) { + ensureAllowedCustomerTypesIsMutable(); + allowedCustomerTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param value The enum numeric value on the wire for allowedCustomerTypes to add. + * @return This builder for chaining. + */ + public Builder addAllowedCustomerTypesValue(int value) { + ensureAllowedCustomerTypesIsMutable(); + allowedCustomerTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Customer Type.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param values The enum numeric values on the wire for allowedCustomerTypes to add. + * @return This builder for chaining. + */ + public Builder addAllAllowedCustomerTypesValue(java.lang.Iterable values) { + ensureAllowedCustomerTypesIsMutable(); + for (int value : values) { + allowedCustomerTypes_.add(value); + } + onChanged(); + return this; + } + + private java.util.List promotionalOrderTypes_ = + java.util.Collections.emptyList(); + + private void ensurePromotionalOrderTypesIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + promotionalOrderTypes_ = new java.util.ArrayList(promotionalOrderTypes_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @return A list containing the promotionalOrderTypes. + */ + public java.util.List + getPromotionalOrderTypesList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.channel.v1.PromotionalOrderType>( + promotionalOrderTypes_, promotionalOrderTypes_converter_); + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @return The count of promotionalOrderTypes. + */ + public int getPromotionalOrderTypesCount() { + return promotionalOrderTypes_.size(); + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param index The index of the element to return. + * @return The promotionalOrderTypes at the given index. + */ + public com.google.cloud.channel.v1.PromotionalOrderType getPromotionalOrderTypes(int index) { + return promotionalOrderTypes_converter_.convert(promotionalOrderTypes_.get(index)); + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param index The index to set the value at. + * @param value The promotionalOrderTypes to set. + * @return This builder for chaining. + */ + public Builder setPromotionalOrderTypes( + int index, com.google.cloud.channel.v1.PromotionalOrderType value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromotionalOrderTypesIsMutable(); + promotionalOrderTypes_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param value The promotionalOrderTypes to add. + * @return This builder for chaining. + */ + public Builder addPromotionalOrderTypes( + com.google.cloud.channel.v1.PromotionalOrderType value) { + if (value == null) { + throw new NullPointerException(); + } + ensurePromotionalOrderTypesIsMutable(); + promotionalOrderTypes_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param values The promotionalOrderTypes to add. + * @return This builder for chaining. + */ + public Builder addAllPromotionalOrderTypes( + java.lang.Iterable values) { + ensurePromotionalOrderTypesIsMutable(); + for (com.google.cloud.channel.v1.PromotionalOrderType value : values) { + promotionalOrderTypes_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @return This builder for chaining. + */ + public Builder clearPromotionalOrderTypes() { + promotionalOrderTypes_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @return A list containing the enum numeric values on the wire for promotionalOrderTypes. + */ + public java.util.List getPromotionalOrderTypesValueList() { + return java.util.Collections.unmodifiableList(promotionalOrderTypes_); + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of promotionalOrderTypes at the given index. + */ + public int getPromotionalOrderTypesValue(int index) { + return promotionalOrderTypes_.get(index); + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of promotionalOrderTypes at the given index. + * @return This builder for chaining. + */ + public Builder setPromotionalOrderTypesValue(int index, int value) { + ensurePromotionalOrderTypesIsMutable(); + promotionalOrderTypes_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param value The enum numeric value on the wire for promotionalOrderTypes to add. + * @return This builder for chaining. + */ + public Builder addPromotionalOrderTypesValue(int value) { + ensurePromotionalOrderTypesIsMutable(); + promotionalOrderTypes_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Allowed Promotional Order Type. Present for Promotional offers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param values The enum numeric values on the wire for promotionalOrderTypes to add. + * @return This builder for chaining. + */ + public Builder addAllPromotionalOrderTypesValue(java.lang.Iterable values) { + ensurePromotionalOrderTypesIsMutable(); + for (int value : values) { + promotionalOrderTypes_.add(value); + } + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.CustomerConstraints) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.CustomerConstraints) + private static final com.google.cloud.channel.v1.CustomerConstraints DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.CustomerConstraints(); + } + + public static com.google.cloud.channel.v1.CustomerConstraints getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CustomerConstraints parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CustomerConstraints(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.CustomerConstraints getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerConstraintsOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerConstraintsOrBuilder.java new file mode 100644 index 00000000..5107108d --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerConstraintsOrBuilder.java @@ -0,0 +1,218 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +public interface CustomerConstraintsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.CustomerConstraints) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Allowed geographical regions of the customer.
+   * 
+ * + * repeated string allowed_regions = 1; + * + * @return A list containing the allowedRegions. + */ + java.util.List getAllowedRegionsList(); + /** + * + * + *
+   * Allowed geographical regions of the customer.
+   * 
+ * + * repeated string allowed_regions = 1; + * + * @return The count of allowedRegions. + */ + int getAllowedRegionsCount(); + /** + * + * + *
+   * Allowed geographical regions of the customer.
+   * 
+ * + * repeated string allowed_regions = 1; + * + * @param index The index of the element to return. + * @return The allowedRegions at the given index. + */ + java.lang.String getAllowedRegions(int index); + /** + * + * + *
+   * Allowed geographical regions of the customer.
+   * 
+ * + * repeated string allowed_regions = 1; + * + * @param index The index of the value to return. + * @return The bytes of the allowedRegions at the given index. + */ + com.google.protobuf.ByteString getAllowedRegionsBytes(int index); + + /** + * + * + *
+   * Allowed Customer Type.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @return A list containing the allowedCustomerTypes. + */ + java.util.List + getAllowedCustomerTypesList(); + /** + * + * + *
+   * Allowed Customer Type.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @return The count of allowedCustomerTypes. + */ + int getAllowedCustomerTypesCount(); + /** + * + * + *
+   * Allowed Customer Type.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param index The index of the element to return. + * @return The allowedCustomerTypes at the given index. + */ + com.google.cloud.channel.v1.CloudIdentityInfo.CustomerType getAllowedCustomerTypes(int index); + /** + * + * + *
+   * Allowed Customer Type.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @return A list containing the enum numeric values on the wire for allowedCustomerTypes. + */ + java.util.List getAllowedCustomerTypesValueList(); + /** + * + * + *
+   * Allowed Customer Type.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.CloudIdentityInfo.CustomerType allowed_customer_types = 2; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of allowedCustomerTypes at the given index. + */ + int getAllowedCustomerTypesValue(int index); + + /** + * + * + *
+   * Allowed Promotional Order Type. Present for Promotional offers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @return A list containing the promotionalOrderTypes. + */ + java.util.List getPromotionalOrderTypesList(); + /** + * + * + *
+   * Allowed Promotional Order Type. Present for Promotional offers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @return The count of promotionalOrderTypes. + */ + int getPromotionalOrderTypesCount(); + /** + * + * + *
+   * Allowed Promotional Order Type. Present for Promotional offers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param index The index of the element to return. + * @return The promotionalOrderTypes at the given index. + */ + com.google.cloud.channel.v1.PromotionalOrderType getPromotionalOrderTypes(int index); + /** + * + * + *
+   * Allowed Promotional Order Type. Present for Promotional offers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @return A list containing the enum numeric values on the wire for promotionalOrderTypes. + */ + java.util.List getPromotionalOrderTypesValueList(); + /** + * + * + *
+   * Allowed Promotional Order Type. Present for Promotional offers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PromotionalOrderType promotional_order_types = 3; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of promotionalOrderTypes at the given index. + */ + int getPromotionalOrderTypesValue(int index); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerName.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerName.java new file mode 100644 index 00000000..26d329dd --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerName.java @@ -0,0 +1,192 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class CustomerName implements ResourceName { + private static final PathTemplate ACCOUNT_CUSTOMER = + PathTemplate.createWithoutUrlEncoding("accounts/{account}/customers/{customer}"); + private volatile Map fieldValuesMap; + private final String account; + private final String customer; + + @Deprecated + protected CustomerName() { + account = null; + customer = null; + } + + private CustomerName(Builder builder) { + account = Preconditions.checkNotNull(builder.getAccount()); + customer = Preconditions.checkNotNull(builder.getCustomer()); + } + + public String getAccount() { + return account; + } + + public String getCustomer() { + return customer; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static CustomerName of(String account, String customer) { + return newBuilder().setAccount(account).setCustomer(customer).build(); + } + + public static String format(String account, String customer) { + return newBuilder().setAccount(account).setCustomer(customer).build().toString(); + } + + public static CustomerName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ACCOUNT_CUSTOMER.validatedMatch( + formattedString, "CustomerName.parse: formattedString not in valid format"); + return of(matchMap.get("account"), matchMap.get("customer")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (CustomerName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ACCOUNT_CUSTOMER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (account != null) { + fieldMapBuilder.put("account", account); + } + if (customer != null) { + fieldMapBuilder.put("customer", customer); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ACCOUNT_CUSTOMER.instantiate("account", account, "customer", customer); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + CustomerName that = ((CustomerName) o); + return Objects.equals(this.account, that.account) + && Objects.equals(this.customer, that.customer); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(account); + h *= 1000003; + h ^= Objects.hashCode(customer); + return h; + } + + /** Builder for accounts/{account}/customers/{customer}. */ + public static class Builder { + private String account; + private String customer; + + protected Builder() {} + + public String getAccount() { + return account; + } + + public String getCustomer() { + return customer; + } + + public Builder setAccount(String account) { + this.account = account; + return this; + } + + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + private Builder(CustomerName customerName) { + account = customerName.account; + customer = customerName.customer; + } + + public CustomerName build() { + return new CustomerName(this); + } + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerOrBuilder.java new file mode 100644 index 00000000..0366df25 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomerOrBuilder.java @@ -0,0 +1,427 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/customers.proto + +package com.google.cloud.channel.v1; + +public interface CustomerOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Customer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of the customer.
+   * Format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of the customer.
+   * Format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. Name of the organization that the customer entity represents.
+   * 
+ * + * string org_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The orgDisplayName. + */ + java.lang.String getOrgDisplayName(); + /** + * + * + *
+   * Required. Name of the organization that the customer entity represents.
+   * 
+ * + * string org_display_name = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for orgDisplayName. + */ + com.google.protobuf.ByteString getOrgDisplayNameBytes(); + + /** + * + * + *
+   * Required. Address of the organization of the customer entity.
+   * Region and zip codes are required to enforce US laws and embargoes.
+   * Language code is discarded. Use the Customer-level language code to set the
+   * customer's language.
+   * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the orgPostalAddress field is set. + */ + boolean hasOrgPostalAddress(); + /** + * + * + *
+   * Required. Address of the organization of the customer entity.
+   * Region and zip codes are required to enforce US laws and embargoes.
+   * Language code is discarded. Use the Customer-level language code to set the
+   * customer's language.
+   * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The orgPostalAddress. + */ + com.google.type.PostalAddress getOrgPostalAddress(); + /** + * + * + *
+   * Required. Address of the organization of the customer entity.
+   * Region and zip codes are required to enforce US laws and embargoes.
+   * Language code is discarded. Use the Customer-level language code to set the
+   * customer's language.
+   * 
+ * + * + * .google.type.PostalAddress org_postal_address = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.type.PostalAddressOrBuilder getOrgPostalAddressOrBuilder(); + + /** + * + * + *
+   * Primary contact info.
+   * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + * + * @return Whether the primaryContactInfo field is set. + */ + boolean hasPrimaryContactInfo(); + /** + * + * + *
+   * Primary contact info.
+   * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + * + * @return The primaryContactInfo. + */ + com.google.cloud.channel.v1.ContactInfo getPrimaryContactInfo(); + /** + * + * + *
+   * Primary contact info.
+   * 
+ * + * .google.cloud.channel.v1.ContactInfo primary_contact_info = 4; + */ + com.google.cloud.channel.v1.ContactInfoOrBuilder getPrimaryContactInfoOrBuilder(); + + /** + * + * + *
+   * Secondary contact email.
+   * Alternate email and primary contact email are required to have different
+   * domains if primary contact email is present.
+   * When creating admin.google.com accounts, users get notified credentials at
+   * this email. This email address is also used as a recovery email.
+   * 
+ * + * string alternate_email = 5; + * + * @return The alternateEmail. + */ + java.lang.String getAlternateEmail(); + /** + * + * + *
+   * Secondary contact email.
+   * Alternate email and primary contact email are required to have different
+   * domains if primary contact email is present.
+   * When creating admin.google.com accounts, users get notified credentials at
+   * this email. This email address is also used as a recovery email.
+   * 
+ * + * string alternate_email = 5; + * + * @return The bytes for alternateEmail. + */ + com.google.protobuf.ByteString getAlternateEmailBytes(); + + /** + * + * + *
+   * Required. Primary domain used by the customer.
+   * Domain of primary contact email is required to be same as the provided
+   * domain.
+   * 
+ * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The domain. + */ + java.lang.String getDomain(); + /** + * + * + *
+   * Required. Primary domain used by the customer.
+   * Domain of primary contact email is required to be same as the provided
+   * domain.
+   * 
+ * + * string domain = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for domain. + */ + com.google.protobuf.ByteString getDomainBytes(); + + /** + * + * + *
+   * Output only. The time at which the customer is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which the customer is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which the customer is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 7 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which the customer is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which the customer is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which the customer is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. Customer's cloud_identity_id.
+   * Populated only if a Cloud Identity resource exists for this customer.
+   * 
+ * + * string cloud_identity_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The cloudIdentityId. + */ + java.lang.String getCloudIdentityId(); + /** + * + * + *
+   * Output only. Customer's cloud_identity_id.
+   * Populated only if a Cloud Identity resource exists for this customer.
+   * 
+ * + * string cloud_identity_id = 9 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for cloudIdentityId. + */ + com.google.protobuf.ByteString getCloudIdentityIdBytes(); + + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
+   * information, see
+   * https://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
+   * 
+ * + * string language_code = 10 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + /** + * + * + *
+   * Output only. Cloud Identity information for the customer.
+   * Populated only if a Cloud Identity account exists for this customer.
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the cloudIdentityInfo field is set. + */ + boolean hasCloudIdentityInfo(); + /** + * + * + *
+   * Output only. Cloud Identity information for the customer.
+   * Populated only if a Cloud Identity account exists for this customer.
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The cloudIdentityInfo. + */ + com.google.cloud.channel.v1.CloudIdentityInfo getCloudIdentityInfo(); + /** + * + * + *
+   * Output only. Cloud Identity information for the customer.
+   * Populated only if a Cloud Identity account exists for this customer.
+   * 
+ * + * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 12 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder getCloudIdentityInfoOrBuilder(); + + /** + * + * + *
+   * Cloud Identity ID of the customer's channel partner.
+   * Populated only if a channel partner exists for this customer.
+   * 
+ * + * string channel_partner_id = 13; + * + * @return The channelPartnerId. + */ + java.lang.String getChannelPartnerId(); + /** + * + * + *
+   * Cloud Identity ID of the customer's channel partner.
+   * Populated only if a channel partner exists for this customer.
+   * 
+ * + * string channel_partner_id = 13; + * + * @return The bytes for channelPartnerId. + */ + com.google.protobuf.ByteString getChannelPartnerIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomersProto.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomersProto.java new file mode 100644 index 00000000..3d9ef293 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/CustomersProto.java @@ -0,0 +1,129 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/customers.proto + +package com.google.cloud.channel.v1; + +public final class CustomersProto { + private CustomersProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Customer_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Customer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ContactInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ContactInfo_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n\'google/cloud/channel/v1/customers.prot" + + "o\022\027google.cloud.channel.v1\032\037google/api/f" + + "ield_behavior.proto\032\031google/api/resource" + + ".proto\032$google/cloud/channel/v1/common.p" + + "roto\032\037google/protobuf/timestamp.proto\032 g" + + "oogle/type/postal_address.proto\032\034google/" + + "api/annotations.proto\"\321\004\n\010Customer\022\021\n\004na" + + "me\030\001 \001(\tB\003\340A\003\022\035\n\020org_display_name\030\002 \001(\tB" + + "\003\340A\002\022;\n\022org_postal_address\030\003 \001(\0132\032.googl" + + "e.type.PostalAddressB\003\340A\002\022B\n\024primary_con" + + "tact_info\030\004 \001(\0132$.google.cloud.channel.v" + + "1.ContactInfo\022\027\n\017alternate_email\030\005 \001(\t\022\023" + + "\n\006domain\030\006 \001(\tB\003\340A\002\0224\n\013create_time\030\007 \001(\013" + + "2\032.google.protobuf.TimestampB\003\340A\003\0224\n\013upd" + + "ate_time\030\010 \001(\0132\032.google.protobuf.Timesta" + + "mpB\003\340A\003\022\036\n\021cloud_identity_id\030\t \001(\tB\003\340A\003\022" + + "\032\n\rlanguage_code\030\n \001(\tB\003\340A\001\022L\n\023cloud_ide" + + "ntity_info\030\014 \001(\0132*.google.cloud.channel." + + "v1.CloudIdentityInfoB\003\340A\003\022\032\n\022channel_par" + + "tner_id\030\r \001(\t:R\352AO\n$cloudchannel.googlea" + + "pis.com/Customer\022\'accounts/{account}/cus" + + "tomers/{customer}\"\201\001\n\013ContactInfo\022\022\n\nfir" + + "st_name\030\001 \001(\t\022\021\n\tlast_name\030\002 \001(\t\022\031\n\014disp" + + "lay_name\030\004 \001(\tB\003\340A\003\022\r\n\005email\030\005 \001(\t\022\022\n\005ti" + + "tle\030\006 \001(\tB\003\340A\001\022\r\n\005phone\030\007 \001(\tBo\n\033com.goo" + + "gle.cloud.channel.v1B\016CustomersProtoP\001Z>" + + "google.golang.org/genproto/googleapis/cl" + + "oud/channel/v1;channelb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.channel.v1.CommonProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.PostalAddressProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_channel_v1_Customer_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_channel_v1_Customer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Customer_descriptor, + new java.lang.String[] { + "Name", + "OrgDisplayName", + "OrgPostalAddress", + "PrimaryContactInfo", + "AlternateEmail", + "Domain", + "CreateTime", + "UpdateTime", + "CloudIdentityId", + "LanguageCode", + "CloudIdentityInfo", + "ChannelPartnerId", + }); + internal_static_google_cloud_channel_v1_ContactInfo_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_channel_v1_ContactInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ContactInfo_descriptor, + new java.lang.String[] { + "FirstName", "LastName", "DisplayName", "Email", "Title", "Phone", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.channel.v1.CommonProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.PostalAddressProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/DeleteCustomerRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/DeleteCustomerRequest.java new file mode 100644 index 00000000..3fe53fa2 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/DeleteCustomerRequest.java @@ -0,0 +1,650 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.DeleteCustomer][google.cloud.channel.v1.CloudChannelService.DeleteCustomer].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.DeleteCustomerRequest} + */ +public final class DeleteCustomerRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.DeleteCustomerRequest) + DeleteCustomerRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use DeleteCustomerRequest.newBuilder() to construct. + private DeleteCustomerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private DeleteCustomerRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DeleteCustomerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private DeleteCustomerRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_DeleteCustomerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_DeleteCustomerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.DeleteCustomerRequest.class, + com.google.cloud.channel.v1.DeleteCustomerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the customer to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the customer to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.DeleteCustomerRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.DeleteCustomerRequest other = + (com.google.cloud.channel.v1.DeleteCustomerRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.DeleteCustomerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.DeleteCustomer][google.cloud.channel.v1.CloudChannelService.DeleteCustomer].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.DeleteCustomerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.DeleteCustomerRequest) + com.google.cloud.channel.v1.DeleteCustomerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_DeleteCustomerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_DeleteCustomerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.DeleteCustomerRequest.class, + com.google.cloud.channel.v1.DeleteCustomerRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.DeleteCustomerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_DeleteCustomerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.DeleteCustomerRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.DeleteCustomerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.DeleteCustomerRequest build() { + com.google.cloud.channel.v1.DeleteCustomerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.DeleteCustomerRequest buildPartial() { + com.google.cloud.channel.v1.DeleteCustomerRequest result = + new com.google.cloud.channel.v1.DeleteCustomerRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.DeleteCustomerRequest) { + return mergeFrom((com.google.cloud.channel.v1.DeleteCustomerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.DeleteCustomerRequest other) { + if (other == com.google.cloud.channel.v1.DeleteCustomerRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.DeleteCustomerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.DeleteCustomerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the customer to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the customer to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the customer to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the customer to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the customer to delete.
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.DeleteCustomerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.DeleteCustomerRequest) + private static final com.google.cloud.channel.v1.DeleteCustomerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.DeleteCustomerRequest(); + } + + public static com.google.cloud.channel.v1.DeleteCustomerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public DeleteCustomerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new DeleteCustomerRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.DeleteCustomerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/DeleteCustomerRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/DeleteCustomerRequestOrBuilder.java new file mode 100644 index 00000000..33c36302 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/DeleteCustomerRequestOrBuilder.java @@ -0,0 +1,54 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface DeleteCustomerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.DeleteCustomerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the customer to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the customer to delete.
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EduData.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EduData.java new file mode 100644 index 00000000..1ecba7e3 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EduData.java @@ -0,0 +1,1367 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/common.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Required Edu Attributes
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.EduData} + */ +public final class EduData extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.EduData) + EduDataOrBuilder { + private static final long serialVersionUID = 0L; + // Use EduData.newBuilder() to construct. + private EduData(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private EduData() { + instituteType_ = 0; + instituteSize_ = 0; + website_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new EduData(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private EduData( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + instituteType_ = rawValue; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + instituteSize_ = rawValue; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + website_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_EduData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_EduData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.EduData.class, + com.google.cloud.channel.v1.EduData.Builder.class); + } + + /** + * + * + *
+   * Enum to specify the institute type.
+   * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.EduData.InstituteType} + */ + public enum InstituteType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value.  This state doesn't show unless an error occurs.
+     * 
+ * + * INSTITUTE_TYPE_UNSPECIFIED = 0; + */ + INSTITUTE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Elementary/Secondary Schools & Districts
+     * 
+ * + * K12 = 1; + */ + K12(1), + /** + * + * + *
+     * Higher Education Universities & Colleges
+     * 
+ * + * UNIVERSITY = 2; + */ + UNIVERSITY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value.  This state doesn't show unless an error occurs.
+     * 
+ * + * INSTITUTE_TYPE_UNSPECIFIED = 0; + */ + public static final int INSTITUTE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Elementary/Secondary Schools & Districts
+     * 
+ * + * K12 = 1; + */ + public static final int K12_VALUE = 1; + /** + * + * + *
+     * Higher Education Universities & Colleges
+     * 
+ * + * UNIVERSITY = 2; + */ + public static final int UNIVERSITY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static InstituteType 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 InstituteType forNumber(int value) { + switch (value) { + case 0: + return INSTITUTE_TYPE_UNSPECIFIED; + case 1: + return K12; + case 2: + return UNIVERSITY; + 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 InstituteType findValueByNumber(int number) { + return InstituteType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.EduData.getDescriptor().getEnumTypes().get(0); + } + + private static final InstituteType[] VALUES = values(); + + public static InstituteType 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 InstituteType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.EduData.InstituteType) + } + + /** + * + * + *
+   * Number of students and staff the institute has.
+   * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.EduData.InstituteSize} + */ + public enum InstituteSize implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This state doesn't show unless an error occurs.
+     * 
+ * + * INSTITUTE_SIZE_UNSPECIFIED = 0; + */ + INSTITUTE_SIZE_UNSPECIFIED(0), + /** + * + * + *
+     * 1 - 100
+     * 
+ * + * SIZE_1_100 = 1; + */ + SIZE_1_100(1), + /** + * + * + *
+     * 101 - 500
+     * 
+ * + * SIZE_101_500 = 2; + */ + SIZE_101_500(2), + /** + * + * + *
+     * 501 - 1,000
+     * 
+ * + * SIZE_501_1000 = 3; + */ + SIZE_501_1000(3), + /** + * + * + *
+     * 1,001 - 2,000
+     * 
+ * + * SIZE_1001_2000 = 4; + */ + SIZE_1001_2000(4), + /** + * + * + *
+     * 2,001 - 5,000
+     * 
+ * + * SIZE_2001_5000 = 5; + */ + SIZE_2001_5000(5), + /** + * + * + *
+     * 5,001 - 10,000
+     * 
+ * + * SIZE_5001_10000 = 6; + */ + SIZE_5001_10000(6), + /** + * + * + *
+     * 10,001 +
+     * 
+ * + * SIZE_10001_OR_MORE = 7; + */ + SIZE_10001_OR_MORE(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This state doesn't show unless an error occurs.
+     * 
+ * + * INSTITUTE_SIZE_UNSPECIFIED = 0; + */ + public static final int INSTITUTE_SIZE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * 1 - 100
+     * 
+ * + * SIZE_1_100 = 1; + */ + public static final int SIZE_1_100_VALUE = 1; + /** + * + * + *
+     * 101 - 500
+     * 
+ * + * SIZE_101_500 = 2; + */ + public static final int SIZE_101_500_VALUE = 2; + /** + * + * + *
+     * 501 - 1,000
+     * 
+ * + * SIZE_501_1000 = 3; + */ + public static final int SIZE_501_1000_VALUE = 3; + /** + * + * + *
+     * 1,001 - 2,000
+     * 
+ * + * SIZE_1001_2000 = 4; + */ + public static final int SIZE_1001_2000_VALUE = 4; + /** + * + * + *
+     * 2,001 - 5,000
+     * 
+ * + * SIZE_2001_5000 = 5; + */ + public static final int SIZE_2001_5000_VALUE = 5; + /** + * + * + *
+     * 5,001 - 10,000
+     * 
+ * + * SIZE_5001_10000 = 6; + */ + public static final int SIZE_5001_10000_VALUE = 6; + /** + * + * + *
+     * 10,001 +
+     * 
+ * + * SIZE_10001_OR_MORE = 7; + */ + public static final int SIZE_10001_OR_MORE_VALUE = 7; + + 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 InstituteSize 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 InstituteSize forNumber(int value) { + switch (value) { + case 0: + return INSTITUTE_SIZE_UNSPECIFIED; + case 1: + return SIZE_1_100; + case 2: + return SIZE_101_500; + case 3: + return SIZE_501_1000; + case 4: + return SIZE_1001_2000; + case 5: + return SIZE_2001_5000; + case 6: + return SIZE_5001_10000; + case 7: + return SIZE_10001_OR_MORE; + 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 InstituteSize findValueByNumber(int number) { + return InstituteSize.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.EduData.getDescriptor().getEnumTypes().get(1); + } + + private static final InstituteSize[] VALUES = values(); + + public static InstituteSize 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 InstituteSize(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.EduData.InstituteSize) + } + + public static final int INSTITUTE_TYPE_FIELD_NUMBER = 1; + private int instituteType_; + /** + * + * + *
+   * Designated institute type of customer.
+   * 
+ * + * .google.cloud.channel.v1.EduData.InstituteType institute_type = 1; + * + * @return The enum numeric value on the wire for instituteType. + */ + @java.lang.Override + public int getInstituteTypeValue() { + return instituteType_; + } + /** + * + * + *
+   * Designated institute type of customer.
+   * 
+ * + * .google.cloud.channel.v1.EduData.InstituteType institute_type = 1; + * + * @return The instituteType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.EduData.InstituteType getInstituteType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.EduData.InstituteType result = + com.google.cloud.channel.v1.EduData.InstituteType.valueOf(instituteType_); + return result == null ? com.google.cloud.channel.v1.EduData.InstituteType.UNRECOGNIZED : result; + } + + public static final int INSTITUTE_SIZE_FIELD_NUMBER = 2; + private int instituteSize_; + /** + * + * + *
+   * Size of the institute.
+   * 
+ * + * .google.cloud.channel.v1.EduData.InstituteSize institute_size = 2; + * + * @return The enum numeric value on the wire for instituteSize. + */ + @java.lang.Override + public int getInstituteSizeValue() { + return instituteSize_; + } + /** + * + * + *
+   * Size of the institute.
+   * 
+ * + * .google.cloud.channel.v1.EduData.InstituteSize institute_size = 2; + * + * @return The instituteSize. + */ + @java.lang.Override + public com.google.cloud.channel.v1.EduData.InstituteSize getInstituteSize() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.EduData.InstituteSize result = + com.google.cloud.channel.v1.EduData.InstituteSize.valueOf(instituteSize_); + return result == null ? com.google.cloud.channel.v1.EduData.InstituteSize.UNRECOGNIZED : result; + } + + public static final int WEBSITE_FIELD_NUMBER = 3; + private volatile java.lang.Object website_; + /** + * + * + *
+   * Web address for the edu customer's institution.
+   * 
+ * + * string website = 3; + * + * @return The website. + */ + @java.lang.Override + public java.lang.String getWebsite() { + java.lang.Object ref = website_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + website_ = s; + return s; + } + } + /** + * + * + *
+   * Web address for the edu customer's institution.
+   * 
+ * + * string website = 3; + * + * @return The bytes for website. + */ + @java.lang.Override + public com.google.protobuf.ByteString getWebsiteBytes() { + java.lang.Object ref = website_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + website_ = 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 (instituteType_ + != com.google.cloud.channel.v1.EduData.InstituteType.INSTITUTE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, instituteType_); + } + if (instituteSize_ + != com.google.cloud.channel.v1.EduData.InstituteSize.INSTITUTE_SIZE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, instituteSize_); + } + if (!getWebsiteBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, website_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (instituteType_ + != com.google.cloud.channel.v1.EduData.InstituteType.INSTITUTE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, instituteType_); + } + if (instituteSize_ + != com.google.cloud.channel.v1.EduData.InstituteSize.INSTITUTE_SIZE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, instituteSize_); + } + if (!getWebsiteBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, website_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.EduData)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.EduData other = (com.google.cloud.channel.v1.EduData) obj; + + if (instituteType_ != other.instituteType_) return false; + if (instituteSize_ != other.instituteSize_) return false; + if (!getWebsite().equals(other.getWebsite())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + INSTITUTE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + instituteType_; + hash = (37 * hash) + INSTITUTE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + instituteSize_; + hash = (37 * hash) + WEBSITE_FIELD_NUMBER; + hash = (53 * hash) + getWebsite().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.EduData parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.EduData parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.EduData parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.EduData parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.EduData parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.EduData parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.EduData parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.EduData parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.EduData parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.EduData parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.EduData parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.EduData parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.EduData prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Required Edu Attributes
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.EduData} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.EduData) + com.google.cloud.channel.v1.EduDataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_EduData_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_EduData_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.EduData.class, + com.google.cloud.channel.v1.EduData.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.EduData.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + instituteType_ = 0; + + instituteSize_ = 0; + + website_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_EduData_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.EduData getDefaultInstanceForType() { + return com.google.cloud.channel.v1.EduData.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.EduData build() { + com.google.cloud.channel.v1.EduData result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.EduData buildPartial() { + com.google.cloud.channel.v1.EduData result = new com.google.cloud.channel.v1.EduData(this); + result.instituteType_ = instituteType_; + result.instituteSize_ = instituteSize_; + result.website_ = website_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.EduData) { + return mergeFrom((com.google.cloud.channel.v1.EduData) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.EduData other) { + if (other == com.google.cloud.channel.v1.EduData.getDefaultInstance()) return this; + if (other.instituteType_ != 0) { + setInstituteTypeValue(other.getInstituteTypeValue()); + } + if (other.instituteSize_ != 0) { + setInstituteSizeValue(other.getInstituteSizeValue()); + } + if (!other.getWebsite().isEmpty()) { + website_ = other.website_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.EduData parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.EduData) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int instituteType_ = 0; + /** + * + * + *
+     * Designated institute type of customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData.InstituteType institute_type = 1; + * + * @return The enum numeric value on the wire for instituteType. + */ + @java.lang.Override + public int getInstituteTypeValue() { + return instituteType_; + } + /** + * + * + *
+     * Designated institute type of customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData.InstituteType institute_type = 1; + * + * @param value The enum numeric value on the wire for instituteType to set. + * @return This builder for chaining. + */ + public Builder setInstituteTypeValue(int value) { + + instituteType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Designated institute type of customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData.InstituteType institute_type = 1; + * + * @return The instituteType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.EduData.InstituteType getInstituteType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.EduData.InstituteType result = + com.google.cloud.channel.v1.EduData.InstituteType.valueOf(instituteType_); + return result == null + ? com.google.cloud.channel.v1.EduData.InstituteType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Designated institute type of customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData.InstituteType institute_type = 1; + * + * @param value The instituteType to set. + * @return This builder for chaining. + */ + public Builder setInstituteType(com.google.cloud.channel.v1.EduData.InstituteType value) { + if (value == null) { + throw new NullPointerException(); + } + + instituteType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Designated institute type of customer.
+     * 
+ * + * .google.cloud.channel.v1.EduData.InstituteType institute_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearInstituteType() { + + instituteType_ = 0; + onChanged(); + return this; + } + + private int instituteSize_ = 0; + /** + * + * + *
+     * Size of the institute.
+     * 
+ * + * .google.cloud.channel.v1.EduData.InstituteSize institute_size = 2; + * + * @return The enum numeric value on the wire for instituteSize. + */ + @java.lang.Override + public int getInstituteSizeValue() { + return instituteSize_; + } + /** + * + * + *
+     * Size of the institute.
+     * 
+ * + * .google.cloud.channel.v1.EduData.InstituteSize institute_size = 2; + * + * @param value The enum numeric value on the wire for instituteSize to set. + * @return This builder for chaining. + */ + public Builder setInstituteSizeValue(int value) { + + instituteSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Size of the institute.
+     * 
+ * + * .google.cloud.channel.v1.EduData.InstituteSize institute_size = 2; + * + * @return The instituteSize. + */ + @java.lang.Override + public com.google.cloud.channel.v1.EduData.InstituteSize getInstituteSize() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.EduData.InstituteSize result = + com.google.cloud.channel.v1.EduData.InstituteSize.valueOf(instituteSize_); + return result == null + ? com.google.cloud.channel.v1.EduData.InstituteSize.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Size of the institute.
+     * 
+ * + * .google.cloud.channel.v1.EduData.InstituteSize institute_size = 2; + * + * @param value The instituteSize to set. + * @return This builder for chaining. + */ + public Builder setInstituteSize(com.google.cloud.channel.v1.EduData.InstituteSize value) { + if (value == null) { + throw new NullPointerException(); + } + + instituteSize_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Size of the institute.
+     * 
+ * + * .google.cloud.channel.v1.EduData.InstituteSize institute_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearInstituteSize() { + + instituteSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object website_ = ""; + /** + * + * + *
+     * Web address for the edu customer's institution.
+     * 
+ * + * string website = 3; + * + * @return The website. + */ + public java.lang.String getWebsite() { + java.lang.Object ref = website_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + website_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Web address for the edu customer's institution.
+     * 
+ * + * string website = 3; + * + * @return The bytes for website. + */ + public com.google.protobuf.ByteString getWebsiteBytes() { + java.lang.Object ref = website_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + website_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Web address for the edu customer's institution.
+     * 
+ * + * string website = 3; + * + * @param value The website to set. + * @return This builder for chaining. + */ + public Builder setWebsite(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + website_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Web address for the edu customer's institution.
+     * 
+ * + * string website = 3; + * + * @return This builder for chaining. + */ + public Builder clearWebsite() { + + website_ = getDefaultInstance().getWebsite(); + onChanged(); + return this; + } + /** + * + * + *
+     * Web address for the edu customer's institution.
+     * 
+ * + * string website = 3; + * + * @param value The bytes for website to set. + * @return This builder for chaining. + */ + public Builder setWebsiteBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + website_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.EduData) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.EduData) + private static final com.google.cloud.channel.v1.EduData DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.EduData(); + } + + public static com.google.cloud.channel.v1.EduData getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public EduData parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new EduData(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.EduData getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EduDataOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EduDataOrBuilder.java new file mode 100644 index 00000000..03d095dc --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EduDataOrBuilder.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/cloud/channel/v1/common.proto + +package com.google.cloud.channel.v1; + +public interface EduDataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.EduData) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Designated institute type of customer.
+   * 
+ * + * .google.cloud.channel.v1.EduData.InstituteType institute_type = 1; + * + * @return The enum numeric value on the wire for instituteType. + */ + int getInstituteTypeValue(); + /** + * + * + *
+   * Designated institute type of customer.
+   * 
+ * + * .google.cloud.channel.v1.EduData.InstituteType institute_type = 1; + * + * @return The instituteType. + */ + com.google.cloud.channel.v1.EduData.InstituteType getInstituteType(); + + /** + * + * + *
+   * Size of the institute.
+   * 
+ * + * .google.cloud.channel.v1.EduData.InstituteSize institute_size = 2; + * + * @return The enum numeric value on the wire for instituteSize. + */ + int getInstituteSizeValue(); + /** + * + * + *
+   * Size of the institute.
+   * 
+ * + * .google.cloud.channel.v1.EduData.InstituteSize institute_size = 2; + * + * @return The instituteSize. + */ + com.google.cloud.channel.v1.EduData.InstituteSize getInstituteSize(); + + /** + * + * + *
+   * Web address for the edu customer's institution.
+   * 
+ * + * string website = 3; + * + * @return The website. + */ + java.lang.String getWebsite(); + /** + * + * + *
+   * Web address for the edu customer's institution.
+   * 
+ * + * string website = 3; + * + * @return The bytes for website. + */ + com.google.protobuf.ByteString getWebsiteBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Entitlement.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Entitlement.java new file mode 100644 index 00000000..bbd0d958 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Entitlement.java @@ -0,0 +1,4331 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * An entitlement is a representation of a customer's ability to use a service.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Entitlement} + */ +public final class Entitlement extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Entitlement) + EntitlementOrBuilder { + private static final long serialVersionUID = 0L; + // Use Entitlement.newBuilder() to construct. + private Entitlement(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Entitlement() { + name_ = ""; + offer_ = ""; + provisioningState_ = 0; + suspensionReasons_ = java.util.Collections.emptyList(); + purchaseOrderId_ = ""; + parameters_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Entitlement(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Entitlement( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 42: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (createTime_ != null) { + subBuilder = createTime_.toBuilder(); + } + createTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(createTime_); + createTime_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (updateTime_ != null) { + subBuilder = updateTime_.toBuilder(); + } + updateTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateTime_); + updateTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + java.lang.String s = input.readStringRequireUtf8(); + + offer_ = s; + break; + } + case 98: + { + com.google.cloud.channel.v1.CommitmentSettings.Builder subBuilder = null; + if (commitmentSettings_ != null) { + subBuilder = commitmentSettings_.toBuilder(); + } + commitmentSettings_ = + input.readMessage( + com.google.cloud.channel.v1.CommitmentSettings.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(commitmentSettings_); + commitmentSettings_ = subBuilder.buildPartial(); + } + + break; + } + case 104: + { + int rawValue = input.readEnum(); + + provisioningState_ = rawValue; + break; + } + case 130: + { + com.google.cloud.channel.v1.ProvisionedService.Builder subBuilder = null; + if (provisionedService_ != null) { + subBuilder = provisionedService_.toBuilder(); + } + provisionedService_ = + input.readMessage( + com.google.cloud.channel.v1.ProvisionedService.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(provisionedService_); + provisionedService_ = subBuilder.buildPartial(); + } + + break; + } + case 144: + { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + suspensionReasons_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + suspensionReasons_.add(rawValue); + break; + } + case 146: + { + int length = input.readRawVarint32(); + int oldLimit = input.pushLimit(length); + while (input.getBytesUntilLimit() > 0) { + int rawValue = input.readEnum(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + suspensionReasons_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + suspensionReasons_.add(rawValue); + } + input.popLimit(oldLimit); + break; + } + case 154: + { + java.lang.String s = input.readStringRequireUtf8(); + + purchaseOrderId_ = s; + break; + } + case 170: + { + com.google.cloud.channel.v1.TrialSettings.Builder subBuilder = null; + if (trialSettings_ != null) { + subBuilder = trialSettings_.toBuilder(); + } + trialSettings_ = + input.readMessage( + com.google.cloud.channel.v1.TrialSettings.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(trialSettings_); + trialSettings_ = subBuilder.buildPartial(); + } + + break; + } + case 186: + { + com.google.cloud.channel.v1.AssociationInfo.Builder subBuilder = null; + if (associationInfo_ != null) { + subBuilder = associationInfo_.toBuilder(); + } + associationInfo_ = + input.readMessage( + com.google.cloud.channel.v1.AssociationInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(associationInfo_); + associationInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 210: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + parameters_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + parameters_.add( + input.readMessage( + com.google.cloud.channel.v1.Parameter.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)) { + suspensionReasons_ = java.util.Collections.unmodifiableList(suspensionReasons_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_Entitlement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_Entitlement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Entitlement.class, + com.google.cloud.channel.v1.Entitlement.Builder.class); + } + + /** + * + * + *
+   * Indicates the current provisioning state of the entitlement.
+   * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.Entitlement.ProvisioningState} + */ + public enum ProvisioningState implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This state doesn't show unless an error occurs.
+     * 
+ * + * PROVISIONING_STATE_UNSPECIFIED = 0; + */ + PROVISIONING_STATE_UNSPECIFIED(0), + /** + * + * + *
+     * The entitlement is currently active.
+     * 
+ * + * ACTIVE = 1; + */ + ACTIVE(1), + /** + * + * + *
+     * The entitlement is currently suspended.
+     * 
+ * + * SUSPENDED = 5; + */ + SUSPENDED(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This state doesn't show unless an error occurs.
+     * 
+ * + * PROVISIONING_STATE_UNSPECIFIED = 0; + */ + public static final int PROVISIONING_STATE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * The entitlement is currently active.
+     * 
+ * + * ACTIVE = 1; + */ + public static final int ACTIVE_VALUE = 1; + /** + * + * + *
+     * The entitlement is currently suspended.
+     * 
+ * + * SUSPENDED = 5; + */ + public static final int SUSPENDED_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 ProvisioningState 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 ProvisioningState forNumber(int value) { + switch (value) { + case 0: + return PROVISIONING_STATE_UNSPECIFIED; + case 1: + return ACTIVE; + case 5: + return SUSPENDED; + 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 ProvisioningState findValueByNumber(int number) { + return ProvisioningState.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.Entitlement.getDescriptor().getEnumTypes().get(0); + } + + private static final ProvisioningState[] VALUES = values(); + + public static ProvisioningState 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 ProvisioningState(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.Entitlement.ProvisioningState) + } + + /** + * + * + *
+   * Suspension reason for an entitlement if [provisioning_state][google.cloud.channel.v1.Entitlement.provisioning_state] = SUSPENDED.
+   * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.Entitlement.SuspensionReason} + */ + public enum SuspensionReason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This state doesn't show unless an error occurs.
+     * 
+ * + * SUSPENSION_REASON_UNSPECIFIED = 0; + */ + SUSPENSION_REASON_UNSPECIFIED(0), + /** + * + * + *
+     * Entitlement was manually suspended by the Reseller.
+     * 
+ * + * RESELLER_INITIATED = 1; + */ + RESELLER_INITIATED(1), + /** + * + * + *
+     * Trial ended.
+     * 
+ * + * TRIAL_ENDED = 2; + */ + TRIAL_ENDED(2), + /** + * + * + *
+     * Entitlement renewal was canceled.
+     * 
+ * + * RENEWAL_WITH_TYPE_CANCEL = 3; + */ + RENEWAL_WITH_TYPE_CANCEL(3), + /** + * + * + *
+     * Entitlement was automatically suspended on creation for pending ToS
+     * acceptance on customer.
+     * 
+ * + * PENDING_TOS_ACCEPTANCE = 4; + */ + PENDING_TOS_ACCEPTANCE(4), + /** + * + * + *
+     * Other reasons (internal reasons, abuse, etc.).
+     * 
+ * + * OTHER = 100; + */ + OTHER(100), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This state doesn't show unless an error occurs.
+     * 
+ * + * SUSPENSION_REASON_UNSPECIFIED = 0; + */ + public static final int SUSPENSION_REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Entitlement was manually suspended by the Reseller.
+     * 
+ * + * RESELLER_INITIATED = 1; + */ + public static final int RESELLER_INITIATED_VALUE = 1; + /** + * + * + *
+     * Trial ended.
+     * 
+ * + * TRIAL_ENDED = 2; + */ + public static final int TRIAL_ENDED_VALUE = 2; + /** + * + * + *
+     * Entitlement renewal was canceled.
+     * 
+ * + * RENEWAL_WITH_TYPE_CANCEL = 3; + */ + public static final int RENEWAL_WITH_TYPE_CANCEL_VALUE = 3; + /** + * + * + *
+     * Entitlement was automatically suspended on creation for pending ToS
+     * acceptance on customer.
+     * 
+ * + * PENDING_TOS_ACCEPTANCE = 4; + */ + public static final int PENDING_TOS_ACCEPTANCE_VALUE = 4; + /** + * + * + *
+     * Other reasons (internal reasons, abuse, etc.).
+     * 
+ * + * OTHER = 100; + */ + public static final int OTHER_VALUE = 100; + + 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 SuspensionReason 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 SuspensionReason forNumber(int value) { + switch (value) { + case 0: + return SUSPENSION_REASON_UNSPECIFIED; + case 1: + return RESELLER_INITIATED; + case 2: + return TRIAL_ENDED; + case 3: + return RENEWAL_WITH_TYPE_CANCEL; + case 4: + return PENDING_TOS_ACCEPTANCE; + case 100: + return OTHER; + 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 SuspensionReason findValueByNumber(int number) { + return SuspensionReason.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.Entitlement.getDescriptor().getEnumTypes().get(1); + } + + private static final SuspensionReason[] VALUES = values(); + + public static SuspensionReason 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 SuspensionReason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.Entitlement.SuspensionReason) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Output only. Resource name of an entitlement in the form:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Resource name of an entitlement in the form:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CREATE_TIME_FIELD_NUMBER = 5; + private com.google.protobuf.Timestamp createTime_; + /** + * + * + *
+   * Output only. The time at which the entitlement is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + @java.lang.Override + public boolean hasCreateTime() { + return createTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which the entitlement is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCreateTime() { + return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; + } + /** + * + * + *
+   * Output only. The time at which the entitlement is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + return getCreateTime(); + } + + public static final int UPDATE_TIME_FIELD_NUMBER = 6; + private com.google.protobuf.Timestamp updateTime_; + /** + * + * + *
+   * Output only. The time at which the entitlement is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + @java.lang.Override + public boolean hasUpdateTime() { + return updateTime_ != null; + } + /** + * + * + *
+   * Output only. The time at which the entitlement is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getUpdateTime() { + return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; + } + /** + * + * + *
+   * Output only. The time at which the entitlement is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + return getUpdateTime(); + } + + public static final int OFFER_FIELD_NUMBER = 8; + private volatile java.lang.Object offer_; + /** + * + * + *
+   * Required. The offer resource name for which the entitlement is to be
+   * created. Takes the form: accounts/{account_id}/offers/{offer_id}.
+   * 
+ * + * + * string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The offer. + */ + @java.lang.Override + public java.lang.String getOffer() { + java.lang.Object ref = offer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + offer_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The offer resource name for which the entitlement is to be
+   * created. Takes the form: accounts/{account_id}/offers/{offer_id}.
+   * 
+ * + * + * string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for offer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getOfferBytes() { + java.lang.Object ref = offer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + offer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int COMMITMENT_SETTINGS_FIELD_NUMBER = 12; + private com.google.cloud.channel.v1.CommitmentSettings commitmentSettings_; + /** + * + * + *
+   * Commitment settings for a commitment-based Offer.
+   * Required for commitment based offers.
+   * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + * + * @return Whether the commitmentSettings field is set. + */ + @java.lang.Override + public boolean hasCommitmentSettings() { + return commitmentSettings_ != null; + } + /** + * + * + *
+   * Commitment settings for a commitment-based Offer.
+   * Required for commitment based offers.
+   * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + * + * @return The commitmentSettings. + */ + @java.lang.Override + public com.google.cloud.channel.v1.CommitmentSettings getCommitmentSettings() { + return commitmentSettings_ == null + ? com.google.cloud.channel.v1.CommitmentSettings.getDefaultInstance() + : commitmentSettings_; + } + /** + * + * + *
+   * Commitment settings for a commitment-based Offer.
+   * Required for commitment based offers.
+   * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + */ + @java.lang.Override + public com.google.cloud.channel.v1.CommitmentSettingsOrBuilder getCommitmentSettingsOrBuilder() { + return getCommitmentSettings(); + } + + public static final int PROVISIONING_STATE_FIELD_NUMBER = 13; + private int provisioningState_; + /** + * + * + *
+   * Output only. Current provisioning state of the entitlement.
+   * 
+ * + * + * .google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for provisioningState. + */ + @java.lang.Override + public int getProvisioningStateValue() { + return provisioningState_; + } + /** + * + * + *
+   * Output only. Current provisioning state of the entitlement.
+   * 
+ * + * + * .google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The provisioningState. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement.ProvisioningState getProvisioningState() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.Entitlement.ProvisioningState result = + com.google.cloud.channel.v1.Entitlement.ProvisioningState.valueOf(provisioningState_); + return result == null + ? com.google.cloud.channel.v1.Entitlement.ProvisioningState.UNRECOGNIZED + : result; + } + + public static final int PROVISIONED_SERVICE_FIELD_NUMBER = 16; + private com.google.cloud.channel.v1.ProvisionedService provisionedService_; + /** + * + * + *
+   * Output only. Service provisioning details for the entitlement.
+   * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the provisionedService field is set. + */ + @java.lang.Override + public boolean hasProvisionedService() { + return provisionedService_ != null; + } + /** + * + * + *
+   * Output only. Service provisioning details for the entitlement.
+   * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The provisionedService. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ProvisionedService getProvisionedService() { + return provisionedService_ == null + ? com.google.cloud.channel.v1.ProvisionedService.getDefaultInstance() + : provisionedService_; + } + /** + * + * + *
+   * Output only. Service provisioning details for the entitlement.
+   * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ProvisionedServiceOrBuilder getProvisionedServiceOrBuilder() { + return getProvisionedService(); + } + + public static final int SUSPENSION_REASONS_FIELD_NUMBER = 18; + private java.util.List suspensionReasons_; + private static final com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.channel.v1.Entitlement.SuspensionReason> + suspensionReasons_converter_ = + new com.google.protobuf.Internal.ListAdapter.Converter< + java.lang.Integer, com.google.cloud.channel.v1.Entitlement.SuspensionReason>() { + public com.google.cloud.channel.v1.Entitlement.SuspensionReason convert( + java.lang.Integer from) { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.Entitlement.SuspensionReason result = + com.google.cloud.channel.v1.Entitlement.SuspensionReason.valueOf(from); + return result == null + ? com.google.cloud.channel.v1.Entitlement.SuspensionReason.UNRECOGNIZED + : result; + } + }; + /** + * + * + *
+   * Output only. Enumerable of all current suspension reasons for an entitlement.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the suspensionReasons. + */ + @java.lang.Override + public java.util.List + getSuspensionReasonsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.channel.v1.Entitlement.SuspensionReason>( + suspensionReasons_, suspensionReasons_converter_); + } + /** + * + * + *
+   * Output only. Enumerable of all current suspension reasons for an entitlement.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of suspensionReasons. + */ + @java.lang.Override + public int getSuspensionReasonsCount() { + return suspensionReasons_.size(); + } + /** + * + * + *
+   * Output only. Enumerable of all current suspension reasons for an entitlement.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The suspensionReasons at the given index. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement.SuspensionReason getSuspensionReasons(int index) { + return suspensionReasons_converter_.convert(suspensionReasons_.get(index)); + } + /** + * + * + *
+   * Output only. Enumerable of all current suspension reasons for an entitlement.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for suspensionReasons. + */ + @java.lang.Override + public java.util.List getSuspensionReasonsValueList() { + return suspensionReasons_; + } + /** + * + * + *
+   * Output only. Enumerable of all current suspension reasons for an entitlement.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of suspensionReasons at the given index. + */ + @java.lang.Override + public int getSuspensionReasonsValue(int index) { + return suspensionReasons_.get(index); + } + + private int suspensionReasonsMemoizedSerializedSize; + + public static final int PURCHASE_ORDER_ID_FIELD_NUMBER = 19; + private volatile java.lang.Object purchaseOrderId_; + /** + * + * + *
+   * Optional. This purchase order (PO) information is for resellers to use for their
+   * company tracking usage. If a purchaseOrderId value is given, it appears in
+   * the API responses and shows up in the invoice. The property accepts up to
+   * 80 plain text characters.
+   * 
+ * + * string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The purchaseOrderId. + */ + @java.lang.Override + public java.lang.String getPurchaseOrderId() { + java.lang.Object ref = purchaseOrderId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + purchaseOrderId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. This purchase order (PO) information is for resellers to use for their
+   * company tracking usage. If a purchaseOrderId value is given, it appears in
+   * the API responses and shows up in the invoice. The property accepts up to
+   * 80 plain text characters.
+   * 
+ * + * string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for purchaseOrderId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPurchaseOrderIdBytes() { + java.lang.Object ref = purchaseOrderId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + purchaseOrderId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TRIAL_SETTINGS_FIELD_NUMBER = 21; + private com.google.cloud.channel.v1.TrialSettings trialSettings_; + /** + * + * + *
+   * Output only. Settings for trial offers.
+   * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the trialSettings field is set. + */ + @java.lang.Override + public boolean hasTrialSettings() { + return trialSettings_ != null; + } + /** + * + * + *
+   * Output only. Settings for trial offers.
+   * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The trialSettings. + */ + @java.lang.Override + public com.google.cloud.channel.v1.TrialSettings getTrialSettings() { + return trialSettings_ == null + ? com.google.cloud.channel.v1.TrialSettings.getDefaultInstance() + : trialSettings_; + } + /** + * + * + *
+   * Output only. Settings for trial offers.
+   * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.TrialSettingsOrBuilder getTrialSettingsOrBuilder() { + return getTrialSettings(); + } + + public static final int ASSOCIATION_INFO_FIELD_NUMBER = 23; + private com.google.cloud.channel.v1.AssociationInfo associationInfo_; + /** + * + * + *
+   * Association information to other entitlements.
+   * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + * + * @return Whether the associationInfo field is set. + */ + @java.lang.Override + public boolean hasAssociationInfo() { + return associationInfo_ != null; + } + /** + * + * + *
+   * Association information to other entitlements.
+   * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + * + * @return The associationInfo. + */ + @java.lang.Override + public com.google.cloud.channel.v1.AssociationInfo getAssociationInfo() { + return associationInfo_ == null + ? com.google.cloud.channel.v1.AssociationInfo.getDefaultInstance() + : associationInfo_; + } + /** + * + * + *
+   * Association information to other entitlements.
+   * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + */ + @java.lang.Override + public com.google.cloud.channel.v1.AssociationInfoOrBuilder getAssociationInfoOrBuilder() { + return getAssociationInfo(); + } + + public static final int PARAMETERS_FIELD_NUMBER = 26; + private java.util.List parameters_; + /** + * + * + *
+   * Extended entitlement parameters. When creating an entitlement, valid
+   * parameters' names and values are defined in the offer's parameter
+   * definitions.
+   * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + @java.lang.Override + public java.util.List getParametersList() { + return parameters_; + } + /** + * + * + *
+   * Extended entitlement parameters. When creating an entitlement, valid
+   * parameters' names and values are defined in the offer's parameter
+   * definitions.
+   * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + @java.lang.Override + public java.util.List + getParametersOrBuilderList() { + return parameters_; + } + /** + * + * + *
+   * Extended entitlement parameters. When creating an entitlement, valid
+   * parameters' names and values are defined in the offer's parameter
+   * definitions.
+   * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + @java.lang.Override + public int getParametersCount() { + return parameters_.size(); + } + /** + * + * + *
+   * Extended entitlement parameters. When creating an entitlement, valid
+   * parameters' names and values are defined in the offer's parameter
+   * definitions.
+   * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + @java.lang.Override + public com.google.cloud.channel.v1.Parameter getParameters(int index) { + return parameters_.get(index); + } + /** + * + * + *
+   * Extended entitlement parameters. When creating an entitlement, valid
+   * parameters' names and values are defined in the offer's parameter
+   * definitions.
+   * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ParameterOrBuilder getParametersOrBuilder(int index) { + return parameters_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + getSerializedSize(); + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (createTime_ != null) { + output.writeMessage(5, getCreateTime()); + } + if (updateTime_ != null) { + output.writeMessage(6, getUpdateTime()); + } + if (!getOfferBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 8, offer_); + } + if (commitmentSettings_ != null) { + output.writeMessage(12, getCommitmentSettings()); + } + if (provisioningState_ + != com.google.cloud.channel.v1.Entitlement.ProvisioningState.PROVISIONING_STATE_UNSPECIFIED + .getNumber()) { + output.writeEnum(13, provisioningState_); + } + if (provisionedService_ != null) { + output.writeMessage(16, getProvisionedService()); + } + if (getSuspensionReasonsList().size() > 0) { + output.writeUInt32NoTag(146); + output.writeUInt32NoTag(suspensionReasonsMemoizedSerializedSize); + } + for (int i = 0; i < suspensionReasons_.size(); i++) { + output.writeEnumNoTag(suspensionReasons_.get(i)); + } + if (!getPurchaseOrderIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 19, purchaseOrderId_); + } + if (trialSettings_ != null) { + output.writeMessage(21, getTrialSettings()); + } + if (associationInfo_ != null) { + output.writeMessage(23, getAssociationInfo()); + } + for (int i = 0; i < parameters_.size(); i++) { + output.writeMessage(26, parameters_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (createTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getCreateTime()); + } + if (updateTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getUpdateTime()); + } + if (!getOfferBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, offer_); + } + if (commitmentSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(12, getCommitmentSettings()); + } + if (provisioningState_ + != com.google.cloud.channel.v1.Entitlement.ProvisioningState.PROVISIONING_STATE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(13, provisioningState_); + } + if (provisionedService_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, getProvisionedService()); + } + { + int dataSize = 0; + for (int i = 0; i < suspensionReasons_.size(); i++) { + dataSize += + com.google.protobuf.CodedOutputStream.computeEnumSizeNoTag(suspensionReasons_.get(i)); + } + size += dataSize; + if (!getSuspensionReasonsList().isEmpty()) { + size += 2; + size += com.google.protobuf.CodedOutputStream.computeUInt32SizeNoTag(dataSize); + } + suspensionReasonsMemoizedSerializedSize = dataSize; + } + if (!getPurchaseOrderIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, purchaseOrderId_); + } + if (trialSettings_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(21, getTrialSettings()); + } + if (associationInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(23, getAssociationInfo()); + } + for (int i = 0; i < parameters_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(26, parameters_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Entitlement)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Entitlement other = (com.google.cloud.channel.v1.Entitlement) obj; + + if (!getName().equals(other.getName())) return false; + if (hasCreateTime() != other.hasCreateTime()) return false; + if (hasCreateTime()) { + if (!getCreateTime().equals(other.getCreateTime())) return false; + } + if (hasUpdateTime() != other.hasUpdateTime()) return false; + if (hasUpdateTime()) { + if (!getUpdateTime().equals(other.getUpdateTime())) return false; + } + if (!getOffer().equals(other.getOffer())) return false; + if (hasCommitmentSettings() != other.hasCommitmentSettings()) return false; + if (hasCommitmentSettings()) { + if (!getCommitmentSettings().equals(other.getCommitmentSettings())) return false; + } + if (provisioningState_ != other.provisioningState_) return false; + if (hasProvisionedService() != other.hasProvisionedService()) return false; + if (hasProvisionedService()) { + if (!getProvisionedService().equals(other.getProvisionedService())) return false; + } + if (!suspensionReasons_.equals(other.suspensionReasons_)) return false; + if (!getPurchaseOrderId().equals(other.getPurchaseOrderId())) return false; + if (hasTrialSettings() != other.hasTrialSettings()) return false; + if (hasTrialSettings()) { + if (!getTrialSettings().equals(other.getTrialSettings())) return false; + } + if (hasAssociationInfo() != other.hasAssociationInfo()) return false; + if (hasAssociationInfo()) { + if (!getAssociationInfo().equals(other.getAssociationInfo())) return false; + } + if (!getParametersList().equals(other.getParametersList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasCreateTime()) { + hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getCreateTime().hashCode(); + } + if (hasUpdateTime()) { + hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER; + hash = (53 * hash) + getUpdateTime().hashCode(); + } + hash = (37 * hash) + OFFER_FIELD_NUMBER; + hash = (53 * hash) + getOffer().hashCode(); + if (hasCommitmentSettings()) { + hash = (37 * hash) + COMMITMENT_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getCommitmentSettings().hashCode(); + } + hash = (37 * hash) + PROVISIONING_STATE_FIELD_NUMBER; + hash = (53 * hash) + provisioningState_; + if (hasProvisionedService()) { + hash = (37 * hash) + PROVISIONED_SERVICE_FIELD_NUMBER; + hash = (53 * hash) + getProvisionedService().hashCode(); + } + if (getSuspensionReasonsCount() > 0) { + hash = (37 * hash) + SUSPENSION_REASONS_FIELD_NUMBER; + hash = (53 * hash) + suspensionReasons_.hashCode(); + } + hash = (37 * hash) + PURCHASE_ORDER_ID_FIELD_NUMBER; + hash = (53 * hash) + getPurchaseOrderId().hashCode(); + if (hasTrialSettings()) { + hash = (37 * hash) + TRIAL_SETTINGS_FIELD_NUMBER; + hash = (53 * hash) + getTrialSettings().hashCode(); + } + if (hasAssociationInfo()) { + hash = (37 * hash) + ASSOCIATION_INFO_FIELD_NUMBER; + hash = (53 * hash) + getAssociationInfo().hashCode(); + } + if (getParametersCount() > 0) { + hash = (37 * hash) + PARAMETERS_FIELD_NUMBER; + hash = (53 * hash) + getParametersList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Entitlement parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Entitlement parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Entitlement parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Entitlement parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Entitlement parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Entitlement parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Entitlement parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Entitlement parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Entitlement parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Entitlement parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Entitlement parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Entitlement parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Entitlement prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * An entitlement is a representation of a customer's ability to use a service.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Entitlement} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Entitlement) + com.google.cloud.channel.v1.EntitlementOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_Entitlement_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_Entitlement_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Entitlement.class, + com.google.cloud.channel.v1.Entitlement.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Entitlement.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getParametersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (createTimeBuilder_ == null) { + createTime_ = null; + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + if (updateTimeBuilder_ == null) { + updateTime_ = null; + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + offer_ = ""; + + if (commitmentSettingsBuilder_ == null) { + commitmentSettings_ = null; + } else { + commitmentSettings_ = null; + commitmentSettingsBuilder_ = null; + } + provisioningState_ = 0; + + if (provisionedServiceBuilder_ == null) { + provisionedService_ = null; + } else { + provisionedService_ = null; + provisionedServiceBuilder_ = null; + } + suspensionReasons_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + purchaseOrderId_ = ""; + + if (trialSettingsBuilder_ == null) { + trialSettings_ = null; + } else { + trialSettings_ = null; + trialSettingsBuilder_ = null; + } + if (associationInfoBuilder_ == null) { + associationInfo_ = null; + } else { + associationInfo_ = null; + associationInfoBuilder_ = null; + } + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + parametersBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_Entitlement_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Entitlement.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement build() { + com.google.cloud.channel.v1.Entitlement result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement buildPartial() { + com.google.cloud.channel.v1.Entitlement result = + new com.google.cloud.channel.v1.Entitlement(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (createTimeBuilder_ == null) { + result.createTime_ = createTime_; + } else { + result.createTime_ = createTimeBuilder_.build(); + } + if (updateTimeBuilder_ == null) { + result.updateTime_ = updateTime_; + } else { + result.updateTime_ = updateTimeBuilder_.build(); + } + result.offer_ = offer_; + if (commitmentSettingsBuilder_ == null) { + result.commitmentSettings_ = commitmentSettings_; + } else { + result.commitmentSettings_ = commitmentSettingsBuilder_.build(); + } + result.provisioningState_ = provisioningState_; + if (provisionedServiceBuilder_ == null) { + result.provisionedService_ = provisionedService_; + } else { + result.provisionedService_ = provisionedServiceBuilder_.build(); + } + if (((bitField0_ & 0x00000001) != 0)) { + suspensionReasons_ = java.util.Collections.unmodifiableList(suspensionReasons_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.suspensionReasons_ = suspensionReasons_; + result.purchaseOrderId_ = purchaseOrderId_; + if (trialSettingsBuilder_ == null) { + result.trialSettings_ = trialSettings_; + } else { + result.trialSettings_ = trialSettingsBuilder_.build(); + } + if (associationInfoBuilder_ == null) { + result.associationInfo_ = associationInfo_; + } else { + result.associationInfo_ = associationInfoBuilder_.build(); + } + if (parametersBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + parameters_ = java.util.Collections.unmodifiableList(parameters_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.parameters_ = parameters_; + } else { + result.parameters_ = parametersBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Entitlement) { + return mergeFrom((com.google.cloud.channel.v1.Entitlement) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Entitlement other) { + if (other == com.google.cloud.channel.v1.Entitlement.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasCreateTime()) { + mergeCreateTime(other.getCreateTime()); + } + if (other.hasUpdateTime()) { + mergeUpdateTime(other.getUpdateTime()); + } + if (!other.getOffer().isEmpty()) { + offer_ = other.offer_; + onChanged(); + } + if (other.hasCommitmentSettings()) { + mergeCommitmentSettings(other.getCommitmentSettings()); + } + if (other.provisioningState_ != 0) { + setProvisioningStateValue(other.getProvisioningStateValue()); + } + if (other.hasProvisionedService()) { + mergeProvisionedService(other.getProvisionedService()); + } + if (!other.suspensionReasons_.isEmpty()) { + if (suspensionReasons_.isEmpty()) { + suspensionReasons_ = other.suspensionReasons_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.addAll(other.suspensionReasons_); + } + onChanged(); + } + if (!other.getPurchaseOrderId().isEmpty()) { + purchaseOrderId_ = other.purchaseOrderId_; + onChanged(); + } + if (other.hasTrialSettings()) { + mergeTrialSettings(other.getTrialSettings()); + } + if (other.hasAssociationInfo()) { + mergeAssociationInfo(other.getAssociationInfo()); + } + if (parametersBuilder_ == null) { + if (!other.parameters_.isEmpty()) { + if (parameters_.isEmpty()) { + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureParametersIsMutable(); + parameters_.addAll(other.parameters_); + } + onChanged(); + } + } else { + if (!other.parameters_.isEmpty()) { + if (parametersBuilder_.isEmpty()) { + parametersBuilder_.dispose(); + parametersBuilder_ = null; + parameters_ = other.parameters_; + bitField0_ = (bitField0_ & ~0x00000002); + parametersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParametersFieldBuilder() + : null; + } else { + parametersBuilder_.addAllMessages(other.parameters_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Entitlement parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Entitlement) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Output only. Resource name of an entitlement in the form:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of an entitlement in the form:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Resource name of an entitlement in the form:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of an entitlement in the form:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Resource name of an entitlement in the form:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp createTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + createTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which the entitlement is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + public boolean hasCreateTime() { + return createTimeBuilder_ != null || createTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which the entitlement is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + public com.google.protobuf.Timestamp getCreateTime() { + if (createTimeBuilder_ == null) { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } else { + return createTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which the entitlement is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + createTime_ = value; + onChanged(); + } else { + createTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the entitlement is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (createTimeBuilder_ == null) { + createTime_ = builderForValue.build(); + onChanged(); + } else { + createTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the entitlement is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { + if (createTimeBuilder_ == null) { + if (createTime_ != null) { + createTime_ = + com.google.protobuf.Timestamp.newBuilder(createTime_).mergeFrom(value).buildPartial(); + } else { + createTime_ = value; + } + onChanged(); + } else { + createTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the entitlement is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearCreateTime() { + if (createTimeBuilder_ == null) { + createTime_ = null; + onChanged(); + } else { + createTime_ = null; + createTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the entitlement is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { + + onChanged(); + return getCreateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which the entitlement is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { + if (createTimeBuilder_ != null) { + return createTimeBuilder_.getMessageOrBuilder(); + } else { + return createTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : createTime_; + } + } + /** + * + * + *
+     * Output only. The time at which the entitlement is created.
+     * 
+ * + * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCreateTimeFieldBuilder() { + if (createTimeBuilder_ == null) { + createTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCreateTime(), getParentForChildren(), isClean()); + createTime_ = null; + } + return createTimeBuilder_; + } + + private com.google.protobuf.Timestamp updateTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + updateTimeBuilder_; + /** + * + * + *
+     * Output only. The time at which the entitlement is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + public boolean hasUpdateTime() { + return updateTimeBuilder_ != null || updateTime_ != null; + } + /** + * + * + *
+     * Output only. The time at which the entitlement is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + public com.google.protobuf.Timestamp getUpdateTime() { + if (updateTimeBuilder_ == null) { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } else { + return updateTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. The time at which the entitlement is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateTime_ = value; + onChanged(); + } else { + updateTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the entitlement is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (updateTimeBuilder_ == null) { + updateTime_ = builderForValue.build(); + onChanged(); + } else { + updateTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the entitlement is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { + if (updateTimeBuilder_ == null) { + if (updateTime_ != null) { + updateTime_ = + com.google.protobuf.Timestamp.newBuilder(updateTime_).mergeFrom(value).buildPartial(); + } else { + updateTime_ = value; + } + onChanged(); + } else { + updateTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the entitlement is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearUpdateTime() { + if (updateTimeBuilder_ == null) { + updateTime_ = null; + onChanged(); + } else { + updateTime_ = null; + updateTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. The time at which the entitlement is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { + + onChanged(); + return getUpdateTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. The time at which the entitlement is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { + if (updateTimeBuilder_ != null) { + return updateTimeBuilder_.getMessageOrBuilder(); + } else { + return updateTime_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : updateTime_; + } + } + /** + * + * + *
+     * Output only. The time at which the entitlement is updated.
+     * 
+ * + * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getUpdateTimeFieldBuilder() { + if (updateTimeBuilder_ == null) { + updateTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getUpdateTime(), getParentForChildren(), isClean()); + updateTime_ = null; + } + return updateTimeBuilder_; + } + + private java.lang.Object offer_ = ""; + /** + * + * + *
+     * Required. The offer resource name for which the entitlement is to be
+     * created. Takes the form: accounts/{account_id}/offers/{offer_id}.
+     * 
+ * + * + * string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The offer. + */ + public java.lang.String getOffer() { + java.lang.Object ref = offer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + offer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The offer resource name for which the entitlement is to be
+     * created. Takes the form: accounts/{account_id}/offers/{offer_id}.
+     * 
+ * + * + * string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for offer. + */ + public com.google.protobuf.ByteString getOfferBytes() { + java.lang.Object ref = offer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + offer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The offer resource name for which the entitlement is to be
+     * created. Takes the form: accounts/{account_id}/offers/{offer_id}.
+     * 
+ * + * + * string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The offer to set. + * @return This builder for chaining. + */ + public Builder setOffer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + offer_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The offer resource name for which the entitlement is to be
+     * created. Takes the form: accounts/{account_id}/offers/{offer_id}.
+     * 
+ * + * + * string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearOffer() { + + offer_ = getDefaultInstance().getOffer(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The offer resource name for which the entitlement is to be
+     * created. Takes the form: accounts/{account_id}/offers/{offer_id}.
+     * 
+ * + * + * string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for offer to set. + * @return This builder for chaining. + */ + public Builder setOfferBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + offer_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.CommitmentSettings commitmentSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CommitmentSettings, + com.google.cloud.channel.v1.CommitmentSettings.Builder, + com.google.cloud.channel.v1.CommitmentSettingsOrBuilder> + commitmentSettingsBuilder_; + /** + * + * + *
+     * Commitment settings for a commitment-based Offer.
+     * Required for commitment based offers.
+     * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + * + * @return Whether the commitmentSettings field is set. + */ + public boolean hasCommitmentSettings() { + return commitmentSettingsBuilder_ != null || commitmentSettings_ != null; + } + /** + * + * + *
+     * Commitment settings for a commitment-based Offer.
+     * Required for commitment based offers.
+     * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + * + * @return The commitmentSettings. + */ + public com.google.cloud.channel.v1.CommitmentSettings getCommitmentSettings() { + if (commitmentSettingsBuilder_ == null) { + return commitmentSettings_ == null + ? com.google.cloud.channel.v1.CommitmentSettings.getDefaultInstance() + : commitmentSettings_; + } else { + return commitmentSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Commitment settings for a commitment-based Offer.
+     * Required for commitment based offers.
+     * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + */ + public Builder setCommitmentSettings(com.google.cloud.channel.v1.CommitmentSettings value) { + if (commitmentSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commitmentSettings_ = value; + onChanged(); + } else { + commitmentSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Commitment settings for a commitment-based Offer.
+     * Required for commitment based offers.
+     * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + */ + public Builder setCommitmentSettings( + com.google.cloud.channel.v1.CommitmentSettings.Builder builderForValue) { + if (commitmentSettingsBuilder_ == null) { + commitmentSettings_ = builderForValue.build(); + onChanged(); + } else { + commitmentSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Commitment settings for a commitment-based Offer.
+     * Required for commitment based offers.
+     * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + */ + public Builder mergeCommitmentSettings(com.google.cloud.channel.v1.CommitmentSettings value) { + if (commitmentSettingsBuilder_ == null) { + if (commitmentSettings_ != null) { + commitmentSettings_ = + com.google.cloud.channel.v1.CommitmentSettings.newBuilder(commitmentSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + commitmentSettings_ = value; + } + onChanged(); + } else { + commitmentSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Commitment settings for a commitment-based Offer.
+     * Required for commitment based offers.
+     * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + */ + public Builder clearCommitmentSettings() { + if (commitmentSettingsBuilder_ == null) { + commitmentSettings_ = null; + onChanged(); + } else { + commitmentSettings_ = null; + commitmentSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Commitment settings for a commitment-based Offer.
+     * Required for commitment based offers.
+     * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + */ + public com.google.cloud.channel.v1.CommitmentSettings.Builder getCommitmentSettingsBuilder() { + + onChanged(); + return getCommitmentSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Commitment settings for a commitment-based Offer.
+     * Required for commitment based offers.
+     * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + */ + public com.google.cloud.channel.v1.CommitmentSettingsOrBuilder + getCommitmentSettingsOrBuilder() { + if (commitmentSettingsBuilder_ != null) { + return commitmentSettingsBuilder_.getMessageOrBuilder(); + } else { + return commitmentSettings_ == null + ? com.google.cloud.channel.v1.CommitmentSettings.getDefaultInstance() + : commitmentSettings_; + } + } + /** + * + * + *
+     * Commitment settings for a commitment-based Offer.
+     * Required for commitment based offers.
+     * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CommitmentSettings, + com.google.cloud.channel.v1.CommitmentSettings.Builder, + com.google.cloud.channel.v1.CommitmentSettingsOrBuilder> + getCommitmentSettingsFieldBuilder() { + if (commitmentSettingsBuilder_ == null) { + commitmentSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CommitmentSettings, + com.google.cloud.channel.v1.CommitmentSettings.Builder, + com.google.cloud.channel.v1.CommitmentSettingsOrBuilder>( + getCommitmentSettings(), getParentForChildren(), isClean()); + commitmentSettings_ = null; + } + return commitmentSettingsBuilder_; + } + + private int provisioningState_ = 0; + /** + * + * + *
+     * Output only. Current provisioning state of the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for provisioningState. + */ + @java.lang.Override + public int getProvisioningStateValue() { + return provisioningState_; + } + /** + * + * + *
+     * Output only. Current provisioning state of the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for provisioningState to set. + * @return This builder for chaining. + */ + public Builder setProvisioningStateValue(int value) { + + provisioningState_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current provisioning state of the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The provisioningState. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement.ProvisioningState getProvisioningState() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.Entitlement.ProvisioningState result = + com.google.cloud.channel.v1.Entitlement.ProvisioningState.valueOf(provisioningState_); + return result == null + ? com.google.cloud.channel.v1.Entitlement.ProvisioningState.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Output only. Current provisioning state of the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The provisioningState to set. + * @return This builder for chaining. + */ + public Builder setProvisioningState( + com.google.cloud.channel.v1.Entitlement.ProvisioningState value) { + if (value == null) { + throw new NullPointerException(); + } + + provisioningState_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Current provisioning state of the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearProvisioningState() { + + provisioningState_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.ProvisionedService provisionedService_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ProvisionedService, + com.google.cloud.channel.v1.ProvisionedService.Builder, + com.google.cloud.channel.v1.ProvisionedServiceOrBuilder> + provisionedServiceBuilder_; + /** + * + * + *
+     * Output only. Service provisioning details for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the provisionedService field is set. + */ + public boolean hasProvisionedService() { + return provisionedServiceBuilder_ != null || provisionedService_ != null; + } + /** + * + * + *
+     * Output only. Service provisioning details for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The provisionedService. + */ + public com.google.cloud.channel.v1.ProvisionedService getProvisionedService() { + if (provisionedServiceBuilder_ == null) { + return provisionedService_ == null + ? com.google.cloud.channel.v1.ProvisionedService.getDefaultInstance() + : provisionedService_; + } else { + return provisionedServiceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Service provisioning details for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProvisionedService(com.google.cloud.channel.v1.ProvisionedService value) { + if (provisionedServiceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + provisionedService_ = value; + onChanged(); + } else { + provisionedServiceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Service provisioning details for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setProvisionedService( + com.google.cloud.channel.v1.ProvisionedService.Builder builderForValue) { + if (provisionedServiceBuilder_ == null) { + provisionedService_ = builderForValue.build(); + onChanged(); + } else { + provisionedServiceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Service provisioning details for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeProvisionedService(com.google.cloud.channel.v1.ProvisionedService value) { + if (provisionedServiceBuilder_ == null) { + if (provisionedService_ != null) { + provisionedService_ = + com.google.cloud.channel.v1.ProvisionedService.newBuilder(provisionedService_) + .mergeFrom(value) + .buildPartial(); + } else { + provisionedService_ = value; + } + onChanged(); + } else { + provisionedServiceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Service provisioning details for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearProvisionedService() { + if (provisionedServiceBuilder_ == null) { + provisionedService_ = null; + onChanged(); + } else { + provisionedService_ = null; + provisionedServiceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Service provisioning details for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.channel.v1.ProvisionedService.Builder getProvisionedServiceBuilder() { + + onChanged(); + return getProvisionedServiceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Service provisioning details for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.channel.v1.ProvisionedServiceOrBuilder + getProvisionedServiceOrBuilder() { + if (provisionedServiceBuilder_ != null) { + return provisionedServiceBuilder_.getMessageOrBuilder(); + } else { + return provisionedService_ == null + ? com.google.cloud.channel.v1.ProvisionedService.getDefaultInstance() + : provisionedService_; + } + } + /** + * + * + *
+     * Output only. Service provisioning details for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ProvisionedService, + com.google.cloud.channel.v1.ProvisionedService.Builder, + com.google.cloud.channel.v1.ProvisionedServiceOrBuilder> + getProvisionedServiceFieldBuilder() { + if (provisionedServiceBuilder_ == null) { + provisionedServiceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ProvisionedService, + com.google.cloud.channel.v1.ProvisionedService.Builder, + com.google.cloud.channel.v1.ProvisionedServiceOrBuilder>( + getProvisionedService(), getParentForChildren(), isClean()); + provisionedService_ = null; + } + return provisionedServiceBuilder_; + } + + private java.util.List suspensionReasons_ = + java.util.Collections.emptyList(); + + private void ensureSuspensionReasonsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + suspensionReasons_ = new java.util.ArrayList(suspensionReasons_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the suspensionReasons. + */ + public java.util.List + getSuspensionReasonsList() { + return new com.google.protobuf.Internal.ListAdapter< + java.lang.Integer, com.google.cloud.channel.v1.Entitlement.SuspensionReason>( + suspensionReasons_, suspensionReasons_converter_); + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of suspensionReasons. + */ + public int getSuspensionReasonsCount() { + return suspensionReasons_.size(); + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The suspensionReasons at the given index. + */ + public com.google.cloud.channel.v1.Entitlement.SuspensionReason getSuspensionReasons( + int index) { + return suspensionReasons_converter_.convert(suspensionReasons_.get(index)); + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index to set the value at. + * @param value The suspensionReasons to set. + * @return This builder for chaining. + */ + public Builder setSuspensionReasons( + int index, com.google.cloud.channel.v1.Entitlement.SuspensionReason value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.set(index, value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The suspensionReasons to add. + * @return This builder for chaining. + */ + public Builder addSuspensionReasons( + com.google.cloud.channel.v1.Entitlement.SuspensionReason value) { + if (value == null) { + throw new NullPointerException(); + } + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.add(value.getNumber()); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The suspensionReasons to add. + * @return This builder for chaining. + */ + public Builder addAllSuspensionReasons( + java.lang.Iterable + values) { + ensureSuspensionReasonsIsMutable(); + for (com.google.cloud.channel.v1.Entitlement.SuspensionReason value : values) { + suspensionReasons_.add(value.getNumber()); + } + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return This builder for chaining. + */ + public Builder clearSuspensionReasons() { + suspensionReasons_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for suspensionReasons. + */ + public java.util.List getSuspensionReasonsValueList() { + return java.util.Collections.unmodifiableList(suspensionReasons_); + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of suspensionReasons at the given index. + */ + public int getSuspensionReasonsValue(int index) { + return suspensionReasons_.get(index); + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of suspensionReasons at the given index. + * @return This builder for chaining. + */ + public Builder setSuspensionReasonsValue(int index, int value) { + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param value The enum numeric value on the wire for suspensionReasons to add. + * @return This builder for chaining. + */ + public Builder addSuspensionReasonsValue(int value) { + ensureSuspensionReasonsIsMutable(); + suspensionReasons_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Enumerable of all current suspension reasons for an entitlement.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param values The enum numeric values on the wire for suspensionReasons to add. + * @return This builder for chaining. + */ + public Builder addAllSuspensionReasonsValue(java.lang.Iterable values) { + ensureSuspensionReasonsIsMutable(); + for (int value : values) { + suspensionReasons_.add(value); + } + onChanged(); + return this; + } + + private java.lang.Object purchaseOrderId_ = ""; + /** + * + * + *
+     * Optional. This purchase order (PO) information is for resellers to use for their
+     * company tracking usage. If a purchaseOrderId value is given, it appears in
+     * the API responses and shows up in the invoice. The property accepts up to
+     * 80 plain text characters.
+     * 
+ * + * string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The purchaseOrderId. + */ + public java.lang.String getPurchaseOrderId() { + java.lang.Object ref = purchaseOrderId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + purchaseOrderId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. This purchase order (PO) information is for resellers to use for their
+     * company tracking usage. If a purchaseOrderId value is given, it appears in
+     * the API responses and shows up in the invoice. The property accepts up to
+     * 80 plain text characters.
+     * 
+ * + * string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for purchaseOrderId. + */ + public com.google.protobuf.ByteString getPurchaseOrderIdBytes() { + java.lang.Object ref = purchaseOrderId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + purchaseOrderId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. This purchase order (PO) information is for resellers to use for their
+     * company tracking usage. If a purchaseOrderId value is given, it appears in
+     * the API responses and shows up in the invoice. The property accepts up to
+     * 80 plain text characters.
+     * 
+ * + * string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The purchaseOrderId to set. + * @return This builder for chaining. + */ + public Builder setPurchaseOrderId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + purchaseOrderId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This purchase order (PO) information is for resellers to use for their
+     * company tracking usage. If a purchaseOrderId value is given, it appears in
+     * the API responses and shows up in the invoice. The property accepts up to
+     * 80 plain text characters.
+     * 
+ * + * string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPurchaseOrderId() { + + purchaseOrderId_ = getDefaultInstance().getPurchaseOrderId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. This purchase order (PO) information is for resellers to use for their
+     * company tracking usage. If a purchaseOrderId value is given, it appears in
+     * the API responses and shows up in the invoice. The property accepts up to
+     * 80 plain text characters.
+     * 
+ * + * string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for purchaseOrderId to set. + * @return This builder for chaining. + */ + public Builder setPurchaseOrderIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + purchaseOrderId_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.TrialSettings trialSettings_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.TrialSettings, + com.google.cloud.channel.v1.TrialSettings.Builder, + com.google.cloud.channel.v1.TrialSettingsOrBuilder> + trialSettingsBuilder_; + /** + * + * + *
+     * Output only. Settings for trial offers.
+     * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the trialSettings field is set. + */ + public boolean hasTrialSettings() { + return trialSettingsBuilder_ != null || trialSettings_ != null; + } + /** + * + * + *
+     * Output only. Settings for trial offers.
+     * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The trialSettings. + */ + public com.google.cloud.channel.v1.TrialSettings getTrialSettings() { + if (trialSettingsBuilder_ == null) { + return trialSettings_ == null + ? com.google.cloud.channel.v1.TrialSettings.getDefaultInstance() + : trialSettings_; + } else { + return trialSettingsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. Settings for trial offers.
+     * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTrialSettings(com.google.cloud.channel.v1.TrialSettings value) { + if (trialSettingsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trialSettings_ = value; + onChanged(); + } else { + trialSettingsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Settings for trial offers.
+     * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setTrialSettings( + com.google.cloud.channel.v1.TrialSettings.Builder builderForValue) { + if (trialSettingsBuilder_ == null) { + trialSettings_ = builderForValue.build(); + onChanged(); + } else { + trialSettingsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. Settings for trial offers.
+     * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeTrialSettings(com.google.cloud.channel.v1.TrialSettings value) { + if (trialSettingsBuilder_ == null) { + if (trialSettings_ != null) { + trialSettings_ = + com.google.cloud.channel.v1.TrialSettings.newBuilder(trialSettings_) + .mergeFrom(value) + .buildPartial(); + } else { + trialSettings_ = value; + } + onChanged(); + } else { + trialSettingsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. Settings for trial offers.
+     * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearTrialSettings() { + if (trialSettingsBuilder_ == null) { + trialSettings_ = null; + onChanged(); + } else { + trialSettings_ = null; + trialSettingsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. Settings for trial offers.
+     * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.channel.v1.TrialSettings.Builder getTrialSettingsBuilder() { + + onChanged(); + return getTrialSettingsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. Settings for trial offers.
+     * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.cloud.channel.v1.TrialSettingsOrBuilder getTrialSettingsOrBuilder() { + if (trialSettingsBuilder_ != null) { + return trialSettingsBuilder_.getMessageOrBuilder(); + } else { + return trialSettings_ == null + ? com.google.cloud.channel.v1.TrialSettings.getDefaultInstance() + : trialSettings_; + } + } + /** + * + * + *
+     * Output only. Settings for trial offers.
+     * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.TrialSettings, + com.google.cloud.channel.v1.TrialSettings.Builder, + com.google.cloud.channel.v1.TrialSettingsOrBuilder> + getTrialSettingsFieldBuilder() { + if (trialSettingsBuilder_ == null) { + trialSettingsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.TrialSettings, + com.google.cloud.channel.v1.TrialSettings.Builder, + com.google.cloud.channel.v1.TrialSettingsOrBuilder>( + getTrialSettings(), getParentForChildren(), isClean()); + trialSettings_ = null; + } + return trialSettingsBuilder_; + } + + private com.google.cloud.channel.v1.AssociationInfo associationInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.AssociationInfo, + com.google.cloud.channel.v1.AssociationInfo.Builder, + com.google.cloud.channel.v1.AssociationInfoOrBuilder> + associationInfoBuilder_; + /** + * + * + *
+     * Association information to other entitlements.
+     * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + * + * @return Whether the associationInfo field is set. + */ + public boolean hasAssociationInfo() { + return associationInfoBuilder_ != null || associationInfo_ != null; + } + /** + * + * + *
+     * Association information to other entitlements.
+     * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + * + * @return The associationInfo. + */ + public com.google.cloud.channel.v1.AssociationInfo getAssociationInfo() { + if (associationInfoBuilder_ == null) { + return associationInfo_ == null + ? com.google.cloud.channel.v1.AssociationInfo.getDefaultInstance() + : associationInfo_; + } else { + return associationInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Association information to other entitlements.
+     * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + */ + public Builder setAssociationInfo(com.google.cloud.channel.v1.AssociationInfo value) { + if (associationInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + associationInfo_ = value; + onChanged(); + } else { + associationInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Association information to other entitlements.
+     * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + */ + public Builder setAssociationInfo( + com.google.cloud.channel.v1.AssociationInfo.Builder builderForValue) { + if (associationInfoBuilder_ == null) { + associationInfo_ = builderForValue.build(); + onChanged(); + } else { + associationInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Association information to other entitlements.
+     * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + */ + public Builder mergeAssociationInfo(com.google.cloud.channel.v1.AssociationInfo value) { + if (associationInfoBuilder_ == null) { + if (associationInfo_ != null) { + associationInfo_ = + com.google.cloud.channel.v1.AssociationInfo.newBuilder(associationInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + associationInfo_ = value; + } + onChanged(); + } else { + associationInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Association information to other entitlements.
+     * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + */ + public Builder clearAssociationInfo() { + if (associationInfoBuilder_ == null) { + associationInfo_ = null; + onChanged(); + } else { + associationInfo_ = null; + associationInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Association information to other entitlements.
+     * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + */ + public com.google.cloud.channel.v1.AssociationInfo.Builder getAssociationInfoBuilder() { + + onChanged(); + return getAssociationInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Association information to other entitlements.
+     * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + */ + public com.google.cloud.channel.v1.AssociationInfoOrBuilder getAssociationInfoOrBuilder() { + if (associationInfoBuilder_ != null) { + return associationInfoBuilder_.getMessageOrBuilder(); + } else { + return associationInfo_ == null + ? com.google.cloud.channel.v1.AssociationInfo.getDefaultInstance() + : associationInfo_; + } + } + /** + * + * + *
+     * Association information to other entitlements.
+     * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.AssociationInfo, + com.google.cloud.channel.v1.AssociationInfo.Builder, + com.google.cloud.channel.v1.AssociationInfoOrBuilder> + getAssociationInfoFieldBuilder() { + if (associationInfoBuilder_ == null) { + associationInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.AssociationInfo, + com.google.cloud.channel.v1.AssociationInfo.Builder, + com.google.cloud.channel.v1.AssociationInfoOrBuilder>( + getAssociationInfo(), getParentForChildren(), isClean()); + associationInfo_ = null; + } + return associationInfoBuilder_; + } + + private java.util.List parameters_ = + java.util.Collections.emptyList(); + + private void ensureParametersIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + parameters_ = new java.util.ArrayList(parameters_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Parameter, + com.google.cloud.channel.v1.Parameter.Builder, + com.google.cloud.channel.v1.ParameterOrBuilder> + parametersBuilder_; + + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public java.util.List getParametersList() { + if (parametersBuilder_ == null) { + return java.util.Collections.unmodifiableList(parameters_); + } else { + return parametersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public int getParametersCount() { + if (parametersBuilder_ == null) { + return parameters_.size(); + } else { + return parametersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public com.google.cloud.channel.v1.Parameter getParameters(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public Builder setParameters(int index, com.google.cloud.channel.v1.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.set(index, value); + onChanged(); + } else { + parametersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public Builder setParameters( + int index, com.google.cloud.channel.v1.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.set(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public Builder addParameters(com.google.cloud.channel.v1.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(value); + onChanged(); + } else { + parametersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public Builder addParameters(int index, com.google.cloud.channel.v1.Parameter value) { + if (parametersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParametersIsMutable(); + parameters_.add(index, value); + onChanged(); + } else { + parametersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public Builder addParameters(com.google.cloud.channel.v1.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public Builder addParameters( + int index, com.google.cloud.channel.v1.Parameter.Builder builderForValue) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.add(index, builderForValue.build()); + onChanged(); + } else { + parametersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public Builder addAllParameters( + java.lang.Iterable values) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameters_); + onChanged(); + } else { + parametersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public Builder clearParameters() { + if (parametersBuilder_ == null) { + parameters_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + parametersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public Builder removeParameters(int index) { + if (parametersBuilder_ == null) { + ensureParametersIsMutable(); + parameters_.remove(index); + onChanged(); + } else { + parametersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public com.google.cloud.channel.v1.Parameter.Builder getParametersBuilder(int index) { + return getParametersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public com.google.cloud.channel.v1.ParameterOrBuilder getParametersOrBuilder(int index) { + if (parametersBuilder_ == null) { + return parameters_.get(index); + } else { + return parametersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public java.util.List + getParametersOrBuilderList() { + if (parametersBuilder_ != null) { + return parametersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parameters_); + } + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public com.google.cloud.channel.v1.Parameter.Builder addParametersBuilder() { + return getParametersFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.Parameter.getDefaultInstance()); + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public com.google.cloud.channel.v1.Parameter.Builder addParametersBuilder(int index) { + return getParametersFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Parameter.getDefaultInstance()); + } + /** + * + * + *
+     * Extended entitlement parameters. When creating an entitlement, valid
+     * parameters' names and values are defined in the offer's parameter
+     * definitions.
+     * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + public java.util.List + getParametersBuilderList() { + return getParametersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Parameter, + com.google.cloud.channel.v1.Parameter.Builder, + com.google.cloud.channel.v1.ParameterOrBuilder> + getParametersFieldBuilder() { + if (parametersBuilder_ == null) { + parametersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Parameter, + com.google.cloud.channel.v1.Parameter.Builder, + com.google.cloud.channel.v1.ParameterOrBuilder>( + parameters_, ((bitField0_ & 0x00000002) != 0), getParentForChildren(), isClean()); + parameters_ = null; + } + return parametersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Entitlement) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Entitlement) + private static final com.google.cloud.channel.v1.Entitlement DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Entitlement(); + } + + public static com.google.cloud.channel.v1.Entitlement getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Entitlement parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Entitlement(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EntitlementName.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EntitlementName.java new file mode 100644 index 00000000..4d4f09a4 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EntitlementName.java @@ -0,0 +1,227 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class EntitlementName implements ResourceName { + private static final PathTemplate ACCOUNT_CUSTOMER_ENTITLEMENT = + PathTemplate.createWithoutUrlEncoding( + "accounts/{account}/customers/{customer}/entitlements/{entitlement}"); + private volatile Map fieldValuesMap; + private final String account; + private final String customer; + private final String entitlement; + + @Deprecated + protected EntitlementName() { + account = null; + customer = null; + entitlement = null; + } + + private EntitlementName(Builder builder) { + account = Preconditions.checkNotNull(builder.getAccount()); + customer = Preconditions.checkNotNull(builder.getCustomer()); + entitlement = Preconditions.checkNotNull(builder.getEntitlement()); + } + + public String getAccount() { + return account; + } + + public String getCustomer() { + return customer; + } + + public String getEntitlement() { + return entitlement; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static EntitlementName of(String account, String customer, String entitlement) { + return newBuilder() + .setAccount(account) + .setCustomer(customer) + .setEntitlement(entitlement) + .build(); + } + + public static String format(String account, String customer, String entitlement) { + return newBuilder() + .setAccount(account) + .setCustomer(customer) + .setEntitlement(entitlement) + .build() + .toString(); + } + + public static EntitlementName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ACCOUNT_CUSTOMER_ENTITLEMENT.validatedMatch( + formattedString, "EntitlementName.parse: formattedString not in valid format"); + return of(matchMap.get("account"), matchMap.get("customer"), matchMap.get("entitlement")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (EntitlementName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ACCOUNT_CUSTOMER_ENTITLEMENT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (account != null) { + fieldMapBuilder.put("account", account); + } + if (customer != null) { + fieldMapBuilder.put("customer", customer); + } + if (entitlement != null) { + fieldMapBuilder.put("entitlement", entitlement); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ACCOUNT_CUSTOMER_ENTITLEMENT.instantiate( + "account", account, "customer", customer, "entitlement", entitlement); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + EntitlementName that = ((EntitlementName) o); + return Objects.equals(this.account, that.account) + && Objects.equals(this.customer, that.customer) + && Objects.equals(this.entitlement, that.entitlement); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(account); + h *= 1000003; + h ^= Objects.hashCode(customer); + h *= 1000003; + h ^= Objects.hashCode(entitlement); + return h; + } + + /** Builder for accounts/{account}/customers/{customer}/entitlements/{entitlement}. */ + public static class Builder { + private String account; + private String customer; + private String entitlement; + + protected Builder() {} + + public String getAccount() { + return account; + } + + public String getCustomer() { + return customer; + } + + public String getEntitlement() { + return entitlement; + } + + public Builder setAccount(String account) { + this.account = account; + return this; + } + + public Builder setCustomer(String customer) { + this.customer = customer; + return this; + } + + public Builder setEntitlement(String entitlement) { + this.entitlement = entitlement; + return this; + } + + private Builder(EntitlementName entitlementName) { + account = entitlementName.account; + customer = entitlementName.customer; + entitlement = entitlementName.entitlement; + } + + public EntitlementName build() { + return new EntitlementName(this); + } + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EntitlementOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EntitlementOrBuilder.java new file mode 100644 index 00000000..52a91e55 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EntitlementOrBuilder.java @@ -0,0 +1,510 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +public interface EntitlementOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Entitlement) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Resource name of an entitlement in the form:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Output only. Resource name of an entitlement in the form:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Output only. The time at which the entitlement is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the createTime field is set. + */ + boolean hasCreateTime(); + /** + * + * + *
+   * Output only. The time at which the entitlement is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The createTime. + */ + com.google.protobuf.Timestamp getCreateTime(); + /** + * + * + *
+   * Output only. The time at which the entitlement is created.
+   * 
+ * + * .google.protobuf.Timestamp create_time = 5 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder(); + + /** + * + * + *
+   * Output only. The time at which the entitlement is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the updateTime field is set. + */ + boolean hasUpdateTime(); + /** + * + * + *
+   * Output only. The time at which the entitlement is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The updateTime. + */ + com.google.protobuf.Timestamp getUpdateTime(); + /** + * + * + *
+   * Output only. The time at which the entitlement is updated.
+   * 
+ * + * .google.protobuf.Timestamp update_time = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder(); + + /** + * + * + *
+   * Required. The offer resource name for which the entitlement is to be
+   * created. Takes the form: accounts/{account_id}/offers/{offer_id}.
+   * 
+ * + * + * string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The offer. + */ + java.lang.String getOffer(); + /** + * + * + *
+   * Required. The offer resource name for which the entitlement is to be
+   * created. Takes the form: accounts/{account_id}/offers/{offer_id}.
+   * 
+ * + * + * string offer = 8 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for offer. + */ + com.google.protobuf.ByteString getOfferBytes(); + + /** + * + * + *
+   * Commitment settings for a commitment-based Offer.
+   * Required for commitment based offers.
+   * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + * + * @return Whether the commitmentSettings field is set. + */ + boolean hasCommitmentSettings(); + /** + * + * + *
+   * Commitment settings for a commitment-based Offer.
+   * Required for commitment based offers.
+   * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + * + * @return The commitmentSettings. + */ + com.google.cloud.channel.v1.CommitmentSettings getCommitmentSettings(); + /** + * + * + *
+   * Commitment settings for a commitment-based Offer.
+   * Required for commitment based offers.
+   * 
+ * + * .google.cloud.channel.v1.CommitmentSettings commitment_settings = 12; + */ + com.google.cloud.channel.v1.CommitmentSettingsOrBuilder getCommitmentSettingsOrBuilder(); + + /** + * + * + *
+   * Output only. Current provisioning state of the entitlement.
+   * 
+ * + * + * .google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The enum numeric value on the wire for provisioningState. + */ + int getProvisioningStateValue(); + /** + * + * + *
+   * Output only. Current provisioning state of the entitlement.
+   * 
+ * + * + * .google.cloud.channel.v1.Entitlement.ProvisioningState provisioning_state = 13 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The provisioningState. + */ + com.google.cloud.channel.v1.Entitlement.ProvisioningState getProvisioningState(); + + /** + * + * + *
+   * Output only. Service provisioning details for the entitlement.
+   * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the provisionedService field is set. + */ + boolean hasProvisionedService(); + /** + * + * + *
+   * Output only. Service provisioning details for the entitlement.
+   * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The provisionedService. + */ + com.google.cloud.channel.v1.ProvisionedService getProvisionedService(); + /** + * + * + *
+   * Output only. Service provisioning details for the entitlement.
+   * 
+ * + * + * .google.cloud.channel.v1.ProvisionedService provisioned_service = 16 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.channel.v1.ProvisionedServiceOrBuilder getProvisionedServiceOrBuilder(); + + /** + * + * + *
+   * Output only. Enumerable of all current suspension reasons for an entitlement.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the suspensionReasons. + */ + java.util.List + getSuspensionReasonsList(); + /** + * + * + *
+   * Output only. Enumerable of all current suspension reasons for an entitlement.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The count of suspensionReasons. + */ + int getSuspensionReasonsCount(); + /** + * + * + *
+   * Output only. Enumerable of all current suspension reasons for an entitlement.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the element to return. + * @return The suspensionReasons at the given index. + */ + com.google.cloud.channel.v1.Entitlement.SuspensionReason getSuspensionReasons(int index); + /** + * + * + *
+   * Output only. Enumerable of all current suspension reasons for an entitlement.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return A list containing the enum numeric values on the wire for suspensionReasons. + */ + java.util.List getSuspensionReasonsValueList(); + /** + * + * + *
+   * Output only. Enumerable of all current suspension reasons for an entitlement.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement.SuspensionReason suspension_reasons = 18 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @param index The index of the value to return. + * @return The enum numeric value on the wire of suspensionReasons at the given index. + */ + int getSuspensionReasonsValue(int index); + + /** + * + * + *
+   * Optional. This purchase order (PO) information is for resellers to use for their
+   * company tracking usage. If a purchaseOrderId value is given, it appears in
+   * the API responses and shows up in the invoice. The property accepts up to
+   * 80 plain text characters.
+   * 
+ * + * string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The purchaseOrderId. + */ + java.lang.String getPurchaseOrderId(); + /** + * + * + *
+   * Optional. This purchase order (PO) information is for resellers to use for their
+   * company tracking usage. If a purchaseOrderId value is given, it appears in
+   * the API responses and shows up in the invoice. The property accepts up to
+   * 80 plain text characters.
+   * 
+ * + * string purchase_order_id = 19 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for purchaseOrderId. + */ + com.google.protobuf.ByteString getPurchaseOrderIdBytes(); + + /** + * + * + *
+   * Output only. Settings for trial offers.
+   * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the trialSettings field is set. + */ + boolean hasTrialSettings(); + /** + * + * + *
+   * Output only. Settings for trial offers.
+   * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The trialSettings. + */ + com.google.cloud.channel.v1.TrialSettings getTrialSettings(); + /** + * + * + *
+   * Output only. Settings for trial offers.
+   * 
+ * + * + * .google.cloud.channel.v1.TrialSettings trial_settings = 21 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.cloud.channel.v1.TrialSettingsOrBuilder getTrialSettingsOrBuilder(); + + /** + * + * + *
+   * Association information to other entitlements.
+   * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + * + * @return Whether the associationInfo field is set. + */ + boolean hasAssociationInfo(); + /** + * + * + *
+   * Association information to other entitlements.
+   * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + * + * @return The associationInfo. + */ + com.google.cloud.channel.v1.AssociationInfo getAssociationInfo(); + /** + * + * + *
+   * Association information to other entitlements.
+   * 
+ * + * .google.cloud.channel.v1.AssociationInfo association_info = 23; + */ + com.google.cloud.channel.v1.AssociationInfoOrBuilder getAssociationInfoOrBuilder(); + + /** + * + * + *
+   * Extended entitlement parameters. When creating an entitlement, valid
+   * parameters' names and values are defined in the offer's parameter
+   * definitions.
+   * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + java.util.List getParametersList(); + /** + * + * + *
+   * Extended entitlement parameters. When creating an entitlement, valid
+   * parameters' names and values are defined in the offer's parameter
+   * definitions.
+   * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + com.google.cloud.channel.v1.Parameter getParameters(int index); + /** + * + * + *
+   * Extended entitlement parameters. When creating an entitlement, valid
+   * parameters' names and values are defined in the offer's parameter
+   * definitions.
+   * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + int getParametersCount(); + /** + * + * + *
+   * Extended entitlement parameters. When creating an entitlement, valid
+   * parameters' names and values are defined in the offer's parameter
+   * definitions.
+   * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + java.util.List + getParametersOrBuilderList(); + /** + * + * + *
+   * Extended entitlement parameters. When creating an entitlement, valid
+   * parameters' names and values are defined in the offer's parameter
+   * definitions.
+   * 
+ * + * repeated .google.cloud.channel.v1.Parameter parameters = 26; + */ + com.google.cloud.channel.v1.ParameterOrBuilder getParametersOrBuilder(int index); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EntitlementsProto.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EntitlementsProto.java new file mode 100644 index 00000000..c1ce8ea7 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/EntitlementsProto.java @@ -0,0 +1,261 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +public final class EntitlementsProto { + private EntitlementsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Entitlement_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Entitlement_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Parameter_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Parameter_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_AssociationInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_AssociationInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ProvisionedService_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ProvisionedService_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_CommitmentSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_CommitmentSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_RenewalSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_RenewalSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_TrialSettings_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_TrialSettings_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_TransferableSku_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_TransferableSku_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_TransferEligibility_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_TransferEligibility_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n*google/cloud/channel/v1/entitlements.p" + + "roto\022\027google.cloud.channel.v1\032\037google/ap" + + "i/field_behavior.proto\032\031google/api/resou" + + "rce.proto\032$google/cloud/channel/v1/commo" + + "n.proto\032$google/cloud/channel/v1/offers." + + "proto\032&google/cloud/channel/v1/products." + + "proto\032\037google/protobuf/timestamp.proto\032\036" + + "google/protobuf/wrappers.proto\032\034google/a" + + "pi/annotations.proto\"\335\010\n\013Entitlement\022\021\n\004" + + "name\030\001 \001(\tB\003\340A\003\0224\n\013create_time\030\005 \001(\0132\032.g" + + "oogle.protobuf.TimestampB\003\340A\003\0224\n\013update_" + + "time\030\006 \001(\0132\032.google.protobuf.TimestampB\003" + + "\340A\003\0228\n\005offer\030\010 \001(\tB)\340A\002\372A#\n!cloudchannel" + + ".googleapis.com/Offer\022H\n\023commitment_sett" + + "ings\030\014 \001(\0132+.google.cloud.channel.v1.Com" + + "mitmentSettings\022W\n\022provisioning_state\030\r " + + "\001(\01626.google.cloud.channel.v1.Entitlemen" + + "t.ProvisioningStateB\003\340A\003\022M\n\023provisioned_" + + "service\030\020 \001(\0132+.google.cloud.channel.v1." + + "ProvisionedServiceB\003\340A\003\022V\n\022suspension_re" + + "asons\030\022 \003(\01625.google.cloud.channel.v1.En" + + "titlement.SuspensionReasonB\003\340A\003\022\036\n\021purch" + + "ase_order_id\030\023 \001(\tB\003\340A\001\022C\n\016trial_setting" + + "s\030\025 \001(\0132&.google.cloud.channel.v1.TrialS" + + "ettingsB\003\340A\003\022B\n\020association_info\030\027 \001(\0132(" + + ".google.cloud.channel.v1.AssociationInfo" + + "\0226\n\nparameters\030\032 \003(\0132\".google.cloud.chan" + + "nel.v1.Parameter\"R\n\021ProvisioningState\022\"\n" + + "\036PROVISIONING_STATE_UNSPECIFIED\020\000\022\n\n\006ACT" + + "IVE\020\001\022\r\n\tSUSPENDED\020\005\"\243\001\n\020SuspensionReaso" + + "n\022!\n\035SUSPENSION_REASON_UNSPECIFIED\020\000\022\026\n\022" + + "RESELLER_INITIATED\020\001\022\017\n\013TRIAL_ENDED\020\002\022\034\n" + + "\030RENEWAL_WITH_TYPE_CANCEL\020\003\022\032\n\026PENDING_T" + + "OS_ACCEPTANCE\020\004\022\t\n\005OTHER\020d:p\352Am\n\'cloudch" + + "annel.googleapis.com/Entitlement\022Baccoun" + + "ts/{account}/customers/{customer}/entitl" + + "ements/{entitlement}\"_\n\tParameter\022\014\n\004nam" + + "e\030\001 \001(\t\022-\n\005value\030\002 \001(\0132\036.google.cloud.ch" + + "annel.v1.Value\022\025\n\010editable\030\003 \001(\010B\003\340A\003\"Y\n" + + "\017AssociationInfo\022F\n\020base_entitlement\030\001 \001" + + "(\tB,\372A)\n\'cloudchannel.googleapis.com/Ent" + + "itlement\"`\n\022ProvisionedService\022\034\n\017provis" + + "ioning_id\030\001 \001(\tB\003\340A\003\022\027\n\nproduct_id\030\002 \001(\t" + + "B\003\340A\003\022\023\n\006sku_id\030\003 \001(\tB\003\340A\003\"\305\001\n\022Commitmen" + + "tSettings\0223\n\nstart_time\030\001 \001(\0132\032.google.p" + + "rotobuf.TimestampB\003\340A\003\0221\n\010end_time\030\002 \001(\013" + + "2\032.google.protobuf.TimestampB\003\340A\003\022G\n\020ren" + + "ewal_settings\030\004 \001(\0132(.google.cloud.chann" + + "el.v1.RenewalSettingsB\003\340A\001\"\270\001\n\017RenewalSe" + + "ttings\022\026\n\016enable_renewal\030\001 \001(\010\022\031\n\021resize" + + "_unit_count\030\002 \001(\010\022:\n\014payment_plan\030\005 \001(\0162" + + "$.google.cloud.channel.v1.PaymentPlan\0226\n" + + "\rpayment_cycle\030\006 \001(\0132\037.google.cloud.chan" + + "nel.v1.Period\"L\n\rTrialSettings\022\r\n\005trial\030" + + "\001 \001(\010\022,\n\010end_time\030\002 \001(\0132\032.google.protobu" + + "f.Timestamp\"\371\001\n\017TransferableSku\0221\n\ris_co" + + "mmitment\030\006 \001(\0132\032.google.protobuf.BoolVal" + + "ue\022<\n\030commitment_end_timestamp\030\007 \001(\0132\032.g" + + "oogle.protobuf.Timestamp\022J\n\024transfer_eli" + + "gibility\030\t \001(\0132,.google.cloud.channel.v1" + + ".TransferEligibility\022)\n\003sku\030\013 \001(\0132\034.goog" + + "le.cloud.channel.v1.Sku\"\371\001\n\023TransferElig" + + "ibility\022\023\n\013is_eligible\030\001 \001(\010\022\023\n\013descript" + + "ion\030\002 \001(\t\022Q\n\024ineligibility_reason\030\003 \001(\0162" + + "3.google.cloud.channel.v1.TransferEligib" + + "ility.Reason\"e\n\006Reason\022\026\n\022REASON_UNSPECI" + + "FIED\020\000\022\032\n\026PENDING_TOS_ACCEPTANCE\020\001\022\024\n\020SK" + + "U_NOT_ELIGIBLE\020\002\022\021\n\rSKU_SUSPENDED\020\003Br\n\033c" + + "om.google.cloud.channel.v1B\021Entitlements" + + "ProtoP\001Z>google.golang.org/genproto/goog" + + "leapis/cloud/channel/v1;channelb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.channel.v1.CommonProto.getDescriptor(), + com.google.cloud.channel.v1.OffersProto.getDescriptor(), + com.google.cloud.channel.v1.ProductsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.protobuf.WrappersProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_channel_v1_Entitlement_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_channel_v1_Entitlement_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Entitlement_descriptor, + new java.lang.String[] { + "Name", + "CreateTime", + "UpdateTime", + "Offer", + "CommitmentSettings", + "ProvisioningState", + "ProvisionedService", + "SuspensionReasons", + "PurchaseOrderId", + "TrialSettings", + "AssociationInfo", + "Parameters", + }); + internal_static_google_cloud_channel_v1_Parameter_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_channel_v1_Parameter_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Parameter_descriptor, + new java.lang.String[] { + "Name", "Value", "Editable", + }); + internal_static_google_cloud_channel_v1_AssociationInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_channel_v1_AssociationInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_AssociationInfo_descriptor, + new java.lang.String[] { + "BaseEntitlement", + }); + internal_static_google_cloud_channel_v1_ProvisionedService_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_channel_v1_ProvisionedService_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ProvisionedService_descriptor, + new java.lang.String[] { + "ProvisioningId", "ProductId", "SkuId", + }); + internal_static_google_cloud_channel_v1_CommitmentSettings_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_channel_v1_CommitmentSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_CommitmentSettings_descriptor, + new java.lang.String[] { + "StartTime", "EndTime", "RenewalSettings", + }); + internal_static_google_cloud_channel_v1_RenewalSettings_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_channel_v1_RenewalSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_RenewalSettings_descriptor, + new java.lang.String[] { + "EnableRenewal", "ResizeUnitCount", "PaymentPlan", "PaymentCycle", + }); + internal_static_google_cloud_channel_v1_TrialSettings_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_channel_v1_TrialSettings_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_TrialSettings_descriptor, + new java.lang.String[] { + "Trial", "EndTime", + }); + internal_static_google_cloud_channel_v1_TransferableSku_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_channel_v1_TransferableSku_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_TransferableSku_descriptor, + new java.lang.String[] { + "IsCommitment", "CommitmentEndTimestamp", "TransferEligibility", "Sku", + }); + internal_static_google_cloud_channel_v1_TransferEligibility_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_channel_v1_TransferEligibility_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_TransferEligibility_descriptor, + new java.lang.String[] { + "IsEligible", "Description", "IneligibilityReason", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + registry.add(com.google.api.ResourceProto.resourceReference); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.channel.v1.CommonProto.getDescriptor(); + com.google.cloud.channel.v1.OffersProto.getDescriptor(); + com.google.cloud.channel.v1.ProductsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.protobuf.WrappersProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetChannelPartnerLinkRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetChannelPartnerLinkRequest.java new file mode 100644 index 00000000..b51b9ee9 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetChannelPartnerLinkRequest.java @@ -0,0 +1,819 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.GetChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.GetChannelPartnerLinkRequest} + */ +public final class GetChannelPartnerLinkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.GetChannelPartnerLinkRequest) + GetChannelPartnerLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetChannelPartnerLinkRequest.newBuilder() to construct. + private GetChannelPartnerLinkRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetChannelPartnerLinkRequest() { + name_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetChannelPartnerLinkRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetChannelPartnerLinkRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + 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.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetChannelPartnerLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetChannelPartnerLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest.class, + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the channel partner link to retrieve.
+   * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+   * where {id} is the Cloud Identity ID of the partner.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the channel partner link to retrieve.
+   * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+   * where {id} is the Cloud Identity ID of the partner.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 2; + private int view_; + /** + * + * + *
+   * Optional. The level of granularity the ChannelPartnerLink will display.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Optional. The level of granularity the ChannelPartnerLink will display.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLinkView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ChannelPartnerLinkView result = + com.google.cloud.channel.v1.ChannelPartnerLinkView.valueOf(view_); + return result == null + ? com.google.cloud.channel.v1.ChannelPartnerLinkView.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 (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (view_ != com.google.cloud.channel.v1.ChannelPartnerLinkView.UNSPECIFIED.getNumber()) { + output.writeEnum(2, view_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (view_ != com.google.cloud.channel.v1.ChannelPartnerLinkView.UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, 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.cloud.channel.v1.GetChannelPartnerLinkRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest other = + (com.google.cloud.channel.v1.GetChannelPartnerLinkRequest) obj; + + if (!getName().equals(other.getName())) 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) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.GetChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.GetChannelPartnerLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.GetChannelPartnerLinkRequest) + com.google.cloud.channel.v1.GetChannelPartnerLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetChannelPartnerLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetChannelPartnerLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest.class, + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.GetChannelPartnerLinkRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + view_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetChannelPartnerLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetChannelPartnerLinkRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.GetChannelPartnerLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetChannelPartnerLinkRequest build() { + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetChannelPartnerLinkRequest buildPartial() { + com.google.cloud.channel.v1.GetChannelPartnerLinkRequest result = + new com.google.cloud.channel.v1.GetChannelPartnerLinkRequest(this); + result.name_ = name_; + 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.cloud.channel.v1.GetChannelPartnerLinkRequest) { + return mergeFrom((com.google.cloud.channel.v1.GetChannelPartnerLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.GetChannelPartnerLinkRequest other) { + if (other == com.google.cloud.channel.v1.GetChannelPartnerLinkRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + 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.cloud.channel.v1.GetChannelPartnerLinkRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.GetChannelPartnerLinkRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the channel partner link to retrieve.
+     * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+     * where {id} is the Cloud Identity ID of the partner.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the channel partner link to retrieve.
+     * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+     * where {id} is the Cloud Identity ID of the partner.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the channel partner link to retrieve.
+     * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+     * where {id} is the Cloud Identity ID of the partner.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the channel partner link to retrieve.
+     * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+     * where {id} is the Cloud Identity ID of the partner.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the channel partner link to retrieve.
+     * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+     * where {id} is the Cloud Identity ID of the partner.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Optional. The level of granularity the ChannelPartnerLink will display.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Optional. The level of granularity the ChannelPartnerLink will display.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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; + } + /** + * + * + *
+     * Optional. The level of granularity the ChannelPartnerLink will display.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLinkView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ChannelPartnerLinkView result = + com.google.cloud.channel.v1.ChannelPartnerLinkView.valueOf(view_); + return result == null + ? com.google.cloud.channel.v1.ChannelPartnerLinkView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The level of granularity the ChannelPartnerLink will display.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.channel.v1.ChannelPartnerLinkView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The level of granularity the ChannelPartnerLink will display.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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.cloud.channel.v1.GetChannelPartnerLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.GetChannelPartnerLinkRequest) + private static final com.google.cloud.channel.v1.GetChannelPartnerLinkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.GetChannelPartnerLinkRequest(); + } + + public static com.google.cloud.channel.v1.GetChannelPartnerLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetChannelPartnerLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetChannelPartnerLinkRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetChannelPartnerLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetChannelPartnerLinkRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetChannelPartnerLinkRequestOrBuilder.java new file mode 100644 index 00000000..36330912 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetChannelPartnerLinkRequestOrBuilder.java @@ -0,0 +1,83 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface GetChannelPartnerLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.GetChannelPartnerLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the channel partner link to retrieve.
+   * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+   * where {id} is the Cloud Identity ID of the partner.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the channel partner link to retrieve.
+   * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+   * where {id} is the Cloud Identity ID of the partner.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. The level of granularity the ChannelPartnerLink will display.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Optional. The level of granularity the ChannelPartnerLink will display.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.channel.v1.ChannelPartnerLinkView getView(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetCustomerRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetCustomerRequest.java new file mode 100644 index 00000000..e0afabb3 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetCustomerRequest.java @@ -0,0 +1,655 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.GetCustomer][google.cloud.channel.v1.CloudChannelService.GetCustomer].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.GetCustomerRequest} + */ +public final class GetCustomerRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.GetCustomerRequest) + GetCustomerRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetCustomerRequest.newBuilder() to construct. + private GetCustomerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetCustomerRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetCustomerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetCustomerRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetCustomerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetCustomerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.GetCustomerRequest.class, + com.google.cloud.channel.v1.GetCustomerRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the customer to retrieve.
+   * The name takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the customer to retrieve.
+   * The name takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.GetCustomerRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.GetCustomerRequest other = + (com.google.cloud.channel.v1.GetCustomerRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.GetCustomerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.GetCustomer][google.cloud.channel.v1.CloudChannelService.GetCustomer].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.GetCustomerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.GetCustomerRequest) + com.google.cloud.channel.v1.GetCustomerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetCustomerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetCustomerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.GetCustomerRequest.class, + com.google.cloud.channel.v1.GetCustomerRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.GetCustomerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetCustomerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetCustomerRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.GetCustomerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetCustomerRequest build() { + com.google.cloud.channel.v1.GetCustomerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetCustomerRequest buildPartial() { + com.google.cloud.channel.v1.GetCustomerRequest result = + new com.google.cloud.channel.v1.GetCustomerRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.GetCustomerRequest) { + return mergeFrom((com.google.cloud.channel.v1.GetCustomerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.GetCustomerRequest other) { + if (other == com.google.cloud.channel.v1.GetCustomerRequest.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.GetCustomerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.GetCustomerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the customer to retrieve.
+     * The name takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the customer to retrieve.
+     * The name takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the customer to retrieve.
+     * The name takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the customer to retrieve.
+     * The name takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the customer to retrieve.
+     * The name takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.GetCustomerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.GetCustomerRequest) + private static final com.google.cloud.channel.v1.GetCustomerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.GetCustomerRequest(); + } + + public static com.google.cloud.channel.v1.GetCustomerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetCustomerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetCustomerRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetCustomerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetCustomerRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetCustomerRequestOrBuilder.java new file mode 100644 index 00000000..d3ffba98 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetCustomerRequestOrBuilder.java @@ -0,0 +1,56 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface GetCustomerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.GetCustomerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the customer to retrieve.
+   * The name takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the customer to retrieve.
+   * The name takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetEntitlementRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetEntitlementRequest.java new file mode 100644 index 00000000..c80f5f36 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetEntitlementRequest.java @@ -0,0 +1,664 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.GetEntitlement][google.cloud.channel.v1.CloudChannelService.GetEntitlement].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.GetEntitlementRequest} + */ +public final class GetEntitlementRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.GetEntitlementRequest) + GetEntitlementRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use GetEntitlementRequest.newBuilder() to construct. + private GetEntitlementRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private GetEntitlementRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new GetEntitlementRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private GetEntitlementRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetEntitlementRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetEntitlementRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.GetEntitlementRequest.class, + com.google.cloud.channel.v1.GetEntitlementRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the entitlement to retrieve.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the entitlement to retrieve.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.GetEntitlementRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.GetEntitlementRequest other = + (com.google.cloud.channel.v1.GetEntitlementRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.GetEntitlementRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.GetEntitlement][google.cloud.channel.v1.CloudChannelService.GetEntitlement].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.GetEntitlementRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.GetEntitlementRequest) + com.google.cloud.channel.v1.GetEntitlementRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetEntitlementRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetEntitlementRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.GetEntitlementRequest.class, + com.google.cloud.channel.v1.GetEntitlementRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.GetEntitlementRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_GetEntitlementRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetEntitlementRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.GetEntitlementRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetEntitlementRequest build() { + com.google.cloud.channel.v1.GetEntitlementRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetEntitlementRequest buildPartial() { + com.google.cloud.channel.v1.GetEntitlementRequest result = + new com.google.cloud.channel.v1.GetEntitlementRequest(this); + result.name_ = name_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.GetEntitlementRequest) { + return mergeFrom((com.google.cloud.channel.v1.GetEntitlementRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.GetEntitlementRequest other) { + if (other == com.google.cloud.channel.v1.GetEntitlementRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.GetEntitlementRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.GetEntitlementRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the entitlement to retrieve.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the entitlement to retrieve.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the entitlement to retrieve.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the entitlement to retrieve.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the entitlement to retrieve.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{id}
+     * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.GetEntitlementRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.GetEntitlementRequest) + private static final com.google.cloud.channel.v1.GetEntitlementRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.GetEntitlementRequest(); + } + + public static com.google.cloud.channel.v1.GetEntitlementRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public GetEntitlementRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new GetEntitlementRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.GetEntitlementRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetEntitlementRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetEntitlementRequestOrBuilder.java new file mode 100644 index 00000000..b9398a20 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/GetEntitlementRequestOrBuilder.java @@ -0,0 +1,58 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface GetEntitlementRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.GetEntitlementRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the entitlement to retrieve.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the entitlement to retrieve.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{id}
+   * 
+ * + * + * string name = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksRequest.java new file mode 100644 index 00000000..3fb021cc --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksRequest.java @@ -0,0 +1,1118 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks]
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListChannelPartnerLinksRequest} + */ +public final class ListChannelPartnerLinksRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListChannelPartnerLinksRequest) + ListChannelPartnerLinksRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListChannelPartnerLinksRequest.newBuilder() to construct. + private ListChannelPartnerLinksRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListChannelPartnerLinksRequest() { + parent_ = ""; + pageToken_ = ""; + view_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListChannelPartnerLinksRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListChannelPartnerLinksRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 32: + { + 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.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListChannelPartnerLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListChannelPartnerLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest.class, + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the reseller account for listing channel partner
+   * links.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the reseller account for listing channel partner
+   * links.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, server will pick a default size (25).
+   * The maximum value is 200, values above 200 will be coerced to 200.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous
+   * [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous
+   * [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VIEW_FIELD_NUMBER = 4; + private int view_; + /** + * + * + *
+   * Optional. The level of granularity the ChannelPartnerLink will display.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+   * Optional. The level of granularity the ChannelPartnerLink will display.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLinkView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ChannelPartnerLinkView result = + com.google.cloud.channel.v1.ChannelPartnerLinkView.valueOf(view_); + return result == null + ? com.google.cloud.channel.v1.ChannelPartnerLinkView.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 (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (view_ != com.google.cloud.channel.v1.ChannelPartnerLinkView.UNSPECIFIED.getNumber()) { + output.writeEnum(4, view_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (view_ != com.google.cloud.channel.v1.ChannelPartnerLinkView.UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, 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.cloud.channel.v1.ListChannelPartnerLinksRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest other = + (com.google.cloud.channel.v1.ListChannelPartnerLinksRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + VIEW_FIELD_NUMBER; + hash = (53 * hash) + view_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks]
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListChannelPartnerLinksRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListChannelPartnerLinksRequest) + com.google.cloud.channel.v1.ListChannelPartnerLinksRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListChannelPartnerLinksRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListChannelPartnerLinksRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest.class, + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListChannelPartnerLinksRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + view_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListChannelPartnerLinksRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListChannelPartnerLinksRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListChannelPartnerLinksRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListChannelPartnerLinksRequest build() { + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListChannelPartnerLinksRequest buildPartial() { + com.google.cloud.channel.v1.ListChannelPartnerLinksRequest result = + new com.google.cloud.channel.v1.ListChannelPartnerLinksRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + 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.cloud.channel.v1.ListChannelPartnerLinksRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListChannelPartnerLinksRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListChannelPartnerLinksRequest other) { + if (other == com.google.cloud.channel.v1.ListChannelPartnerLinksRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (other.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.cloud.channel.v1.ListChannelPartnerLinksRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListChannelPartnerLinksRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the reseller account for listing channel partner
+     * links.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller account for listing channel partner
+     * links.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller account for listing channel partner
+     * links.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller account for listing channel partner
+     * links.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller account for listing channel partner
+     * links.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, server will pick a default size (25).
+     * The maximum value is 200, values above 200 will be coerced to 200.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, server will pick a default size (25).
+     * The maximum value is 200, values above 200 will be coerced to 200.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, server will pick a default size (25).
+     * The maximum value is 200, values above 200 will be coerced to 200.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous
+     * [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous
+     * [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous
+     * [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous
+     * [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous
+     * [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private int view_ = 0; + /** + * + * + *
+     * Optional. The level of granularity the ChannelPartnerLink will display.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + @java.lang.Override + public int getViewValue() { + return view_; + } + /** + * + * + *
+     * Optional. The level of granularity the ChannelPartnerLink will display.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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; + } + /** + * + * + *
+     * Optional. The level of granularity the ChannelPartnerLink will display.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLinkView getView() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ChannelPartnerLinkView result = + com.google.cloud.channel.v1.ChannelPartnerLinkView.valueOf(view_); + return result == null + ? com.google.cloud.channel.v1.ChannelPartnerLinkView.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Optional. The level of granularity the ChannelPartnerLink will display.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @param value The view to set. + * @return This builder for chaining. + */ + public Builder setView(com.google.cloud.channel.v1.ChannelPartnerLinkView value) { + if (value == null) { + throw new NullPointerException(); + } + + view_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The level of granularity the ChannelPartnerLink will display.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @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.cloud.channel.v1.ListChannelPartnerLinksRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListChannelPartnerLinksRequest) + private static final com.google.cloud.channel.v1.ListChannelPartnerLinksRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListChannelPartnerLinksRequest(); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListChannelPartnerLinksRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListChannelPartnerLinksRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListChannelPartnerLinksRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksRequestOrBuilder.java new file mode 100644 index 00000000..3f4eed99 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksRequestOrBuilder.java @@ -0,0 +1,129 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListChannelPartnerLinksRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListChannelPartnerLinksRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the reseller account for listing channel partner
+   * links.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the reseller account for listing channel partner
+   * links.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, server will pick a default size (25).
+   * The maximum value is 200, values above 200 will be coerced to 200.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous
+   * [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous
+   * [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The level of granularity the ChannelPartnerLink will display.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The enum numeric value on the wire for view. + */ + int getViewValue(); + /** + * + * + *
+   * Optional. The level of granularity the ChannelPartnerLink will display.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLinkView view = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * + * @return The view. + */ + com.google.cloud.channel.v1.ChannelPartnerLinkView getView(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksResponse.java new file mode 100644 index 00000000..89fd9cb5 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksResponse.java @@ -0,0 +1,1153 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListChannelPartnerLinksResponse} + */ +public final class ListChannelPartnerLinksResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListChannelPartnerLinksResponse) + ListChannelPartnerLinksResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListChannelPartnerLinksResponse.newBuilder() to construct. + private ListChannelPartnerLinksResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListChannelPartnerLinksResponse() { + channelPartnerLinks_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListChannelPartnerLinksResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListChannelPartnerLinksResponse( + 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)) { + channelPartnerLinks_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + channelPartnerLinks_.add( + input.readMessage( + com.google.cloud.channel.v1.ChannelPartnerLink.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)) { + channelPartnerLinks_ = java.util.Collections.unmodifiableList(channelPartnerLinks_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListChannelPartnerLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListChannelPartnerLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse.class, + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse.Builder.class); + } + + public static final int CHANNEL_PARTNER_LINKS_FIELD_NUMBER = 1; + private java.util.List channelPartnerLinks_; + /** + * + * + *
+   * The Channel partner links for a reseller.
+   * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + @java.lang.Override + public java.util.List + getChannelPartnerLinksList() { + return channelPartnerLinks_; + } + /** + * + * + *
+   * The Channel partner links for a reseller.
+   * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + @java.lang.Override + public java.util.List + getChannelPartnerLinksOrBuilderList() { + return channelPartnerLinks_; + } + /** + * + * + *
+   * The Channel partner links for a reseller.
+   * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + @java.lang.Override + public int getChannelPartnerLinksCount() { + return channelPartnerLinks_.size(); + } + /** + * + * + *
+   * The Channel partner links for a reseller.
+   * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLink getChannelPartnerLinks(int index) { + return channelPartnerLinks_.get(index); + } + /** + * + * + *
+   * The Channel partner links for a reseller.
+   * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder getChannelPartnerLinksOrBuilder( + int index) { + return channelPartnerLinks_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page.
+   * 
+ * + * 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 < channelPartnerLinks_.size(); i++) { + output.writeMessage(1, channelPartnerLinks_.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 < channelPartnerLinks_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, channelPartnerLinks_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListChannelPartnerLinksResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse other = + (com.google.cloud.channel.v1.ListChannelPartnerLinksResponse) obj; + + if (!getChannelPartnerLinksList().equals(other.getChannelPartnerLinksList())) 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 (getChannelPartnerLinksCount() > 0) { + hash = (37 * hash) + CHANNEL_PARTNER_LINKS_FIELD_NUMBER; + hash = (53 * hash) + getChannelPartnerLinksList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListChannelPartnerLinksResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListChannelPartnerLinksResponse) + com.google.cloud.channel.v1.ListChannelPartnerLinksResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListChannelPartnerLinksResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListChannelPartnerLinksResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse.class, + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListChannelPartnerLinksResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getChannelPartnerLinksFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (channelPartnerLinksBuilder_ == null) { + channelPartnerLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + channelPartnerLinksBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListChannelPartnerLinksResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListChannelPartnerLinksResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListChannelPartnerLinksResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListChannelPartnerLinksResponse build() { + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListChannelPartnerLinksResponse buildPartial() { + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse result = + new com.google.cloud.channel.v1.ListChannelPartnerLinksResponse(this); + int from_bitField0_ = bitField0_; + if (channelPartnerLinksBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + channelPartnerLinks_ = java.util.Collections.unmodifiableList(channelPartnerLinks_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.channelPartnerLinks_ = channelPartnerLinks_; + } else { + result.channelPartnerLinks_ = channelPartnerLinksBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListChannelPartnerLinksResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListChannelPartnerLinksResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListChannelPartnerLinksResponse other) { + if (other == com.google.cloud.channel.v1.ListChannelPartnerLinksResponse.getDefaultInstance()) + return this; + if (channelPartnerLinksBuilder_ == null) { + if (!other.channelPartnerLinks_.isEmpty()) { + if (channelPartnerLinks_.isEmpty()) { + channelPartnerLinks_ = other.channelPartnerLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureChannelPartnerLinksIsMutable(); + channelPartnerLinks_.addAll(other.channelPartnerLinks_); + } + onChanged(); + } + } else { + if (!other.channelPartnerLinks_.isEmpty()) { + if (channelPartnerLinksBuilder_.isEmpty()) { + channelPartnerLinksBuilder_.dispose(); + channelPartnerLinksBuilder_ = null; + channelPartnerLinks_ = other.channelPartnerLinks_; + bitField0_ = (bitField0_ & ~0x00000001); + channelPartnerLinksBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getChannelPartnerLinksFieldBuilder() + : null; + } else { + channelPartnerLinksBuilder_.addAllMessages(other.channelPartnerLinks_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListChannelPartnerLinksResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListChannelPartnerLinksResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List channelPartnerLinks_ = + java.util.Collections.emptyList(); + + private void ensureChannelPartnerLinksIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + channelPartnerLinks_ = + new java.util.ArrayList( + channelPartnerLinks_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.ChannelPartnerLink, + com.google.cloud.channel.v1.ChannelPartnerLink.Builder, + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder> + channelPartnerLinksBuilder_; + + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public java.util.List + getChannelPartnerLinksList() { + if (channelPartnerLinksBuilder_ == null) { + return java.util.Collections.unmodifiableList(channelPartnerLinks_); + } else { + return channelPartnerLinksBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public int getChannelPartnerLinksCount() { + if (channelPartnerLinksBuilder_ == null) { + return channelPartnerLinks_.size(); + } else { + return channelPartnerLinksBuilder_.getCount(); + } + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public com.google.cloud.channel.v1.ChannelPartnerLink getChannelPartnerLinks(int index) { + if (channelPartnerLinksBuilder_ == null) { + return channelPartnerLinks_.get(index); + } else { + return channelPartnerLinksBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public Builder setChannelPartnerLinks( + int index, com.google.cloud.channel.v1.ChannelPartnerLink value) { + if (channelPartnerLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChannelPartnerLinksIsMutable(); + channelPartnerLinks_.set(index, value); + onChanged(); + } else { + channelPartnerLinksBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public Builder setChannelPartnerLinks( + int index, com.google.cloud.channel.v1.ChannelPartnerLink.Builder builderForValue) { + if (channelPartnerLinksBuilder_ == null) { + ensureChannelPartnerLinksIsMutable(); + channelPartnerLinks_.set(index, builderForValue.build()); + onChanged(); + } else { + channelPartnerLinksBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public Builder addChannelPartnerLinks(com.google.cloud.channel.v1.ChannelPartnerLink value) { + if (channelPartnerLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChannelPartnerLinksIsMutable(); + channelPartnerLinks_.add(value); + onChanged(); + } else { + channelPartnerLinksBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public Builder addChannelPartnerLinks( + int index, com.google.cloud.channel.v1.ChannelPartnerLink value) { + if (channelPartnerLinksBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureChannelPartnerLinksIsMutable(); + channelPartnerLinks_.add(index, value); + onChanged(); + } else { + channelPartnerLinksBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public Builder addChannelPartnerLinks( + com.google.cloud.channel.v1.ChannelPartnerLink.Builder builderForValue) { + if (channelPartnerLinksBuilder_ == null) { + ensureChannelPartnerLinksIsMutable(); + channelPartnerLinks_.add(builderForValue.build()); + onChanged(); + } else { + channelPartnerLinksBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public Builder addChannelPartnerLinks( + int index, com.google.cloud.channel.v1.ChannelPartnerLink.Builder builderForValue) { + if (channelPartnerLinksBuilder_ == null) { + ensureChannelPartnerLinksIsMutable(); + channelPartnerLinks_.add(index, builderForValue.build()); + onChanged(); + } else { + channelPartnerLinksBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public Builder addAllChannelPartnerLinks( + java.lang.Iterable values) { + if (channelPartnerLinksBuilder_ == null) { + ensureChannelPartnerLinksIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, channelPartnerLinks_); + onChanged(); + } else { + channelPartnerLinksBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public Builder clearChannelPartnerLinks() { + if (channelPartnerLinksBuilder_ == null) { + channelPartnerLinks_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + channelPartnerLinksBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public Builder removeChannelPartnerLinks(int index) { + if (channelPartnerLinksBuilder_ == null) { + ensureChannelPartnerLinksIsMutable(); + channelPartnerLinks_.remove(index); + onChanged(); + } else { + channelPartnerLinksBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public com.google.cloud.channel.v1.ChannelPartnerLink.Builder getChannelPartnerLinksBuilder( + int index) { + return getChannelPartnerLinksFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder getChannelPartnerLinksOrBuilder( + int index) { + if (channelPartnerLinksBuilder_ == null) { + return channelPartnerLinks_.get(index); + } else { + return channelPartnerLinksBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public java.util.List + getChannelPartnerLinksOrBuilderList() { + if (channelPartnerLinksBuilder_ != null) { + return channelPartnerLinksBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(channelPartnerLinks_); + } + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public com.google.cloud.channel.v1.ChannelPartnerLink.Builder addChannelPartnerLinksBuilder() { + return getChannelPartnerLinksFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance()); + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public com.google.cloud.channel.v1.ChannelPartnerLink.Builder addChannelPartnerLinksBuilder( + int index) { + return getChannelPartnerLinksFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance()); + } + /** + * + * + *
+     * The Channel partner links for a reseller.
+     * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + public java.util.List + getChannelPartnerLinksBuilderList() { + return getChannelPartnerLinksFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.ChannelPartnerLink, + com.google.cloud.channel.v1.ChannelPartnerLink.Builder, + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder> + getChannelPartnerLinksFieldBuilder() { + if (channelPartnerLinksBuilder_ == null) { + channelPartnerLinksBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.ChannelPartnerLink, + com.google.cloud.channel.v1.ChannelPartnerLink.Builder, + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder>( + channelPartnerLinks_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + channelPartnerLinks_ = null; + } + return channelPartnerLinksBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListChannelPartnerLinksResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListChannelPartnerLinksResponse) + private static final com.google.cloud.channel.v1.ListChannelPartnerLinksResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListChannelPartnerLinksResponse(); + } + + public static com.google.cloud.channel.v1.ListChannelPartnerLinksResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListChannelPartnerLinksResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListChannelPartnerLinksResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListChannelPartnerLinksResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksResponseOrBuilder.java new file mode 100644 index 00000000..f17e913d --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListChannelPartnerLinksResponseOrBuilder.java @@ -0,0 +1,105 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListChannelPartnerLinksResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListChannelPartnerLinksResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The Channel partner links for a reseller.
+   * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + java.util.List getChannelPartnerLinksList(); + /** + * + * + *
+   * The Channel partner links for a reseller.
+   * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + com.google.cloud.channel.v1.ChannelPartnerLink getChannelPartnerLinks(int index); + /** + * + * + *
+   * The Channel partner links for a reseller.
+   * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + int getChannelPartnerLinksCount(); + /** + * + * + *
+   * The Channel partner links for a reseller.
+   * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + java.util.List + getChannelPartnerLinksOrBuilderList(); + /** + * + * + *
+   * The Channel partner links for a reseller.
+   * 
+ * + * repeated .google.cloud.channel.v1.ChannelPartnerLink channel_partner_links = 1; + */ + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder getChannelPartnerLinksOrBuilder( + int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersRequest.java new file mode 100644 index 00000000..7c257fde --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersRequest.java @@ -0,0 +1,940 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers]
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListCustomersRequest} + */ +public final class ListCustomersRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListCustomersRequest) + ListCustomersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCustomersRequest.newBuilder() to construct. + private ListCustomersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCustomersRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCustomersRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCustomersRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListCustomersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListCustomersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListCustomersRequest.class, + com.google.cloud.channel.v1.ListCustomersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the reseller account from which to list customers.
+   * The parent takes the format: accounts/{account_id}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the reseller account from which to list customers.
+   * The parent takes the format: accounts/{account_id}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. The maximum number of customers to return. The service may return fewer
+   * than this value. If unspecified, at most 10 customers will be returned. The
+   * maximum value is 50; values about 50 will be coerced to 50.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous
+   * [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous
+   * [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListCustomersRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListCustomersRequest other = + (com.google.cloud.channel.v1.ListCustomersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListCustomersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers]
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListCustomersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListCustomersRequest) + com.google.cloud.channel.v1.ListCustomersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListCustomersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListCustomersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListCustomersRequest.class, + com.google.cloud.channel.v1.ListCustomersRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListCustomersRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListCustomersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListCustomersRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListCustomersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListCustomersRequest build() { + com.google.cloud.channel.v1.ListCustomersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListCustomersRequest buildPartial() { + com.google.cloud.channel.v1.ListCustomersRequest result = + new com.google.cloud.channel.v1.ListCustomersRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListCustomersRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListCustomersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListCustomersRequest other) { + if (other == com.google.cloud.channel.v1.ListCustomersRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListCustomersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ListCustomersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the reseller account from which to list customers.
+     * The parent takes the format: accounts/{account_id}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller account from which to list customers.
+     * The parent takes the format: accounts/{account_id}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller account from which to list customers.
+     * The parent takes the format: accounts/{account_id}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller account from which to list customers.
+     * The parent takes the format: accounts/{account_id}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller account from which to list customers.
+     * The parent takes the format: accounts/{account_id}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. The maximum number of customers to return. The service may return fewer
+     * than this value. If unspecified, at most 10 customers will be returned. The
+     * maximum value is 50; values about 50 will be coerced to 50.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. The maximum number of customers to return. The service may return fewer
+     * than this value. If unspecified, at most 10 customers will be returned. The
+     * maximum value is 50; values about 50 will be coerced to 50.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The maximum number of customers to return. The service may return fewer
+     * than this value. If unspecified, at most 10 customers will be returned. The
+     * maximum value is 50; values about 50 will be coerced to 50.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous
+     * [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous
+     * [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous
+     * [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous
+     * [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous
+     * [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListCustomersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListCustomersRequest) + private static final com.google.cloud.channel.v1.ListCustomersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListCustomersRequest(); + } + + public static com.google.cloud.channel.v1.ListCustomersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCustomersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCustomersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListCustomersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersRequestOrBuilder.java new file mode 100644 index 00000000..0abdbc91 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersRequestOrBuilder.java @@ -0,0 +1,98 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListCustomersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListCustomersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the reseller account from which to list customers.
+   * The parent takes the format: accounts/{account_id}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the reseller account from which to list customers.
+   * The parent takes the format: accounts/{account_id}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. The maximum number of customers to return. The service may return fewer
+   * than this value. If unspecified, at most 10 customers will be returned. The
+   * maximum value is 50; values about 50 will be coerced to 50.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous
+   * [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous
+   * [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersResponse.java new file mode 100644 index 00000000..088ab36d --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersResponse.java @@ -0,0 +1,1134 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListCustomersResponse} + */ +public final class ListCustomersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListCustomersResponse) + ListCustomersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListCustomersResponse.newBuilder() to construct. + private ListCustomersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListCustomersResponse() { + customers_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListCustomersResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListCustomersResponse( + 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)) { + customers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + customers_.add( + input.readMessage( + com.google.cloud.channel.v1.Customer.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)) { + customers_ = java.util.Collections.unmodifiableList(customers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListCustomersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListCustomersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListCustomersResponse.class, + com.google.cloud.channel.v1.ListCustomersResponse.Builder.class); + } + + public static final int CUSTOMERS_FIELD_NUMBER = 1; + private java.util.List customers_; + /** + * + * + *
+   * The customers belonging to the reseller or distributor.
+   * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + @java.lang.Override + public java.util.List getCustomersList() { + return customers_; + } + /** + * + * + *
+   * The customers belonging to the reseller or distributor.
+   * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + @java.lang.Override + public java.util.List + getCustomersOrBuilderList() { + return customers_; + } + /** + * + * + *
+   * The customers belonging to the reseller or distributor.
+   * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + @java.lang.Override + public int getCustomersCount() { + return customers_.size(); + } + /** + * + * + *
+   * The customers belonging to the reseller or distributor.
+   * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.Customer getCustomers(int index) { + return customers_.get(index); + } + /** + * + * + *
+   * The customers belonging to the reseller or distributor.
+   * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.CustomerOrBuilder getCustomersOrBuilder(int index) { + return customers_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page.
+   * 
+ * + * 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 < customers_.size(); i++) { + output.writeMessage(1, customers_.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 < customers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, customers_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListCustomersResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListCustomersResponse other = + (com.google.cloud.channel.v1.ListCustomersResponse) obj; + + if (!getCustomersList().equals(other.getCustomersList())) 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 (getCustomersCount() > 0) { + hash = (37 * hash) + CUSTOMERS_FIELD_NUMBER; + hash = (53 * hash) + getCustomersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListCustomersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListCustomersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListCustomersResponse) + com.google.cloud.channel.v1.ListCustomersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListCustomersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListCustomersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListCustomersResponse.class, + com.google.cloud.channel.v1.ListCustomersResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListCustomersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getCustomersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (customersBuilder_ == null) { + customers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + customersBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListCustomersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListCustomersResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListCustomersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListCustomersResponse build() { + com.google.cloud.channel.v1.ListCustomersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListCustomersResponse buildPartial() { + com.google.cloud.channel.v1.ListCustomersResponse result = + new com.google.cloud.channel.v1.ListCustomersResponse(this); + int from_bitField0_ = bitField0_; + if (customersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + customers_ = java.util.Collections.unmodifiableList(customers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.customers_ = customers_; + } else { + result.customers_ = customersBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListCustomersResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListCustomersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListCustomersResponse other) { + if (other == com.google.cloud.channel.v1.ListCustomersResponse.getDefaultInstance()) + return this; + if (customersBuilder_ == null) { + if (!other.customers_.isEmpty()) { + if (customers_.isEmpty()) { + customers_ = other.customers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureCustomersIsMutable(); + customers_.addAll(other.customers_); + } + onChanged(); + } + } else { + if (!other.customers_.isEmpty()) { + if (customersBuilder_.isEmpty()) { + customersBuilder_.dispose(); + customersBuilder_ = null; + customers_ = other.customers_; + bitField0_ = (bitField0_ & ~0x00000001); + customersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getCustomersFieldBuilder() + : null; + } else { + customersBuilder_.addAllMessages(other.customers_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListCustomersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListCustomersResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List customers_ = + java.util.Collections.emptyList(); + + private void ensureCustomersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + customers_ = new java.util.ArrayList(customers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Customer, + com.google.cloud.channel.v1.Customer.Builder, + com.google.cloud.channel.v1.CustomerOrBuilder> + customersBuilder_; + + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public java.util.List getCustomersList() { + if (customersBuilder_ == null) { + return java.util.Collections.unmodifiableList(customers_); + } else { + return customersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public int getCustomersCount() { + if (customersBuilder_ == null) { + return customers_.size(); + } else { + return customersBuilder_.getCount(); + } + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public com.google.cloud.channel.v1.Customer getCustomers(int index) { + if (customersBuilder_ == null) { + return customers_.get(index); + } else { + return customersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public Builder setCustomers(int index, com.google.cloud.channel.v1.Customer value) { + if (customersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomersIsMutable(); + customers_.set(index, value); + onChanged(); + } else { + customersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public Builder setCustomers( + int index, com.google.cloud.channel.v1.Customer.Builder builderForValue) { + if (customersBuilder_ == null) { + ensureCustomersIsMutable(); + customers_.set(index, builderForValue.build()); + onChanged(); + } else { + customersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public Builder addCustomers(com.google.cloud.channel.v1.Customer value) { + if (customersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomersIsMutable(); + customers_.add(value); + onChanged(); + } else { + customersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public Builder addCustomers(int index, com.google.cloud.channel.v1.Customer value) { + if (customersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureCustomersIsMutable(); + customers_.add(index, value); + onChanged(); + } else { + customersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public Builder addCustomers(com.google.cloud.channel.v1.Customer.Builder builderForValue) { + if (customersBuilder_ == null) { + ensureCustomersIsMutable(); + customers_.add(builderForValue.build()); + onChanged(); + } else { + customersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public Builder addCustomers( + int index, com.google.cloud.channel.v1.Customer.Builder builderForValue) { + if (customersBuilder_ == null) { + ensureCustomersIsMutable(); + customers_.add(index, builderForValue.build()); + onChanged(); + } else { + customersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public Builder addAllCustomers( + java.lang.Iterable values) { + if (customersBuilder_ == null) { + ensureCustomersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, customers_); + onChanged(); + } else { + customersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public Builder clearCustomers() { + if (customersBuilder_ == null) { + customers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + customersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public Builder removeCustomers(int index) { + if (customersBuilder_ == null) { + ensureCustomersIsMutable(); + customers_.remove(index); + onChanged(); + } else { + customersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public com.google.cloud.channel.v1.Customer.Builder getCustomersBuilder(int index) { + return getCustomersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public com.google.cloud.channel.v1.CustomerOrBuilder getCustomersOrBuilder(int index) { + if (customersBuilder_ == null) { + return customers_.get(index); + } else { + return customersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public java.util.List + getCustomersOrBuilderList() { + if (customersBuilder_ != null) { + return customersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(customers_); + } + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public com.google.cloud.channel.v1.Customer.Builder addCustomersBuilder() { + return getCustomersFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.Customer.getDefaultInstance()); + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public com.google.cloud.channel.v1.Customer.Builder addCustomersBuilder(int index) { + return getCustomersFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Customer.getDefaultInstance()); + } + /** + * + * + *
+     * The customers belonging to the reseller or distributor.
+     * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + public java.util.List getCustomersBuilderList() { + return getCustomersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Customer, + com.google.cloud.channel.v1.Customer.Builder, + com.google.cloud.channel.v1.CustomerOrBuilder> + getCustomersFieldBuilder() { + if (customersBuilder_ == null) { + customersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Customer, + com.google.cloud.channel.v1.Customer.Builder, + com.google.cloud.channel.v1.CustomerOrBuilder>( + customers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + customers_ = null; + } + return customersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListCustomersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListCustomersResponse) + private static final com.google.cloud.channel.v1.ListCustomersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListCustomersResponse(); + } + + public static com.google.cloud.channel.v1.ListCustomersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListCustomersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListCustomersResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListCustomersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersResponseOrBuilder.java new file mode 100644 index 00000000..722a96cc --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListCustomersResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListCustomersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListCustomersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The customers belonging to the reseller or distributor.
+   * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + java.util.List getCustomersList(); + /** + * + * + *
+   * The customers belonging to the reseller or distributor.
+   * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + com.google.cloud.channel.v1.Customer getCustomers(int index); + /** + * + * + *
+   * The customers belonging to the reseller or distributor.
+   * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + int getCustomersCount(); + /** + * + * + *
+   * The customers belonging to the reseller or distributor.
+   * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + java.util.List + getCustomersOrBuilderList(); + /** + * + * + *
+   * The customers belonging to the reseller or distributor.
+   * 
+ * + * repeated .google.cloud.channel.v1.Customer customers = 1; + */ + com.google.cloud.channel.v1.CustomerOrBuilder getCustomersOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsRequest.java new file mode 100644 index 00000000..aea20db4 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsRequest.java @@ -0,0 +1,962 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements]
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListEntitlementsRequest} + */ +public final class ListEntitlementsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListEntitlementsRequest) + ListEntitlementsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEntitlementsRequest.newBuilder() to construct. + private ListEntitlementsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEntitlementsRequest() { + parent_ = ""; + pageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEntitlementsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEntitlementsRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListEntitlementsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListEntitlementsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListEntitlementsRequest.class, + com.google.cloud.channel.v1.ListEntitlementsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the reseller's customer account for which to list
+   * entitlements.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the reseller's customer account for which to list
+   * entitlements.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 50 entitlements will be returned.
+   * The maximum value is 100; values above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous
+   * [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous
+   * [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListEntitlementsRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListEntitlementsRequest other = + (com.google.cloud.channel.v1.ListEntitlementsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListEntitlementsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements]
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListEntitlementsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListEntitlementsRequest) + com.google.cloud.channel.v1.ListEntitlementsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListEntitlementsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListEntitlementsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListEntitlementsRequest.class, + com.google.cloud.channel.v1.ListEntitlementsRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListEntitlementsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListEntitlementsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListEntitlementsRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListEntitlementsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListEntitlementsRequest build() { + com.google.cloud.channel.v1.ListEntitlementsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListEntitlementsRequest buildPartial() { + com.google.cloud.channel.v1.ListEntitlementsRequest result = + new com.google.cloud.channel.v1.ListEntitlementsRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListEntitlementsRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListEntitlementsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListEntitlementsRequest other) { + if (other == com.google.cloud.channel.v1.ListEntitlementsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListEntitlementsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListEntitlementsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the reseller's customer account for which to list
+     * entitlements.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller's customer account for which to list
+     * entitlements.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller's customer account for which to list
+     * entitlements.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller's customer account for which to list
+     * entitlements.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller's customer account for which to list
+     * entitlements.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 50 entitlements will be returned.
+     * The maximum value is 100; values above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 50 entitlements will be returned.
+     * The maximum value is 100; values above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 50 entitlements will be returned.
+     * The maximum value is 100; values above 100 will be coerced to 100.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous
+     * [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous
+     * [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous
+     * [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous
+     * [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous
+     * [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListEntitlementsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListEntitlementsRequest) + private static final com.google.cloud.channel.v1.ListEntitlementsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListEntitlementsRequest(); + } + + public static com.google.cloud.channel.v1.ListEntitlementsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEntitlementsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEntitlementsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListEntitlementsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsRequestOrBuilder.java new file mode 100644 index 00000000..f830c043 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsRequestOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListEntitlementsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListEntitlementsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the reseller's customer account for which to list
+   * entitlements.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the reseller's customer account for which to list
+   * entitlements.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 50 entitlements will be returned.
+   * The maximum value is 100; values above 100 will be coerced to 100.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous
+   * [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous
+   * [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsResponse.java new file mode 100644 index 00000000..2c91c946 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsResponse.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/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListEntitlementsResponse} + */ +public final class ListEntitlementsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListEntitlementsResponse) + ListEntitlementsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListEntitlementsResponse.newBuilder() to construct. + private ListEntitlementsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListEntitlementsResponse() { + entitlements_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListEntitlementsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListEntitlementsResponse( + 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)) { + entitlements_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + entitlements_.add( + input.readMessage( + com.google.cloud.channel.v1.Entitlement.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)) { + entitlements_ = java.util.Collections.unmodifiableList(entitlements_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListEntitlementsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListEntitlementsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListEntitlementsResponse.class, + com.google.cloud.channel.v1.ListEntitlementsResponse.Builder.class); + } + + public static final int ENTITLEMENTS_FIELD_NUMBER = 1; + private java.util.List entitlements_; + /** + * + * + *
+   * The entitlements belonging to the reseller's customer.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + @java.lang.Override + public java.util.List getEntitlementsList() { + return entitlements_; + } + /** + * + * + *
+   * The entitlements belonging to the reseller's customer.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + @java.lang.Override + public java.util.List + getEntitlementsOrBuilderList() { + return entitlements_; + } + /** + * + * + *
+   * The entitlements belonging to the reseller's customer.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + @java.lang.Override + public int getEntitlementsCount() { + return entitlements_.size(); + } + /** + * + * + *
+   * The entitlements belonging to the reseller's customer.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement getEntitlements(int index) { + return entitlements_.get(index); + } + /** + * + * + *
+   * The entitlements belonging to the reseller's customer.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index) { + return entitlements_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to List next page of results.
+   * Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to List next page of results.
+   * Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page.
+   * 
+ * + * 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 < entitlements_.size(); i++) { + output.writeMessage(1, entitlements_.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 < entitlements_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entitlements_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListEntitlementsResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListEntitlementsResponse other = + (com.google.cloud.channel.v1.ListEntitlementsResponse) obj; + + if (!getEntitlementsList().equals(other.getEntitlementsList())) 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 (getEntitlementsCount() > 0) { + hash = (37 * hash) + ENTITLEMENTS_FIELD_NUMBER; + hash = (53 * hash) + getEntitlementsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListEntitlementsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListEntitlementsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListEntitlementsResponse) + com.google.cloud.channel.v1.ListEntitlementsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListEntitlementsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListEntitlementsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListEntitlementsResponse.class, + com.google.cloud.channel.v1.ListEntitlementsResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListEntitlementsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEntitlementsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (entitlementsBuilder_ == null) { + entitlements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + entitlementsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListEntitlementsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListEntitlementsResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListEntitlementsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListEntitlementsResponse build() { + com.google.cloud.channel.v1.ListEntitlementsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListEntitlementsResponse buildPartial() { + com.google.cloud.channel.v1.ListEntitlementsResponse result = + new com.google.cloud.channel.v1.ListEntitlementsResponse(this); + int from_bitField0_ = bitField0_; + if (entitlementsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entitlements_ = java.util.Collections.unmodifiableList(entitlements_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entitlements_ = entitlements_; + } else { + result.entitlements_ = entitlementsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListEntitlementsResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListEntitlementsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListEntitlementsResponse other) { + if (other == com.google.cloud.channel.v1.ListEntitlementsResponse.getDefaultInstance()) + return this; + if (entitlementsBuilder_ == null) { + if (!other.entitlements_.isEmpty()) { + if (entitlements_.isEmpty()) { + entitlements_ = other.entitlements_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntitlementsIsMutable(); + entitlements_.addAll(other.entitlements_); + } + onChanged(); + } + } else { + if (!other.entitlements_.isEmpty()) { + if (entitlementsBuilder_.isEmpty()) { + entitlementsBuilder_.dispose(); + entitlementsBuilder_ = null; + entitlements_ = other.entitlements_; + bitField0_ = (bitField0_ & ~0x00000001); + entitlementsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntitlementsFieldBuilder() + : null; + } else { + entitlementsBuilder_.addAllMessages(other.entitlements_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListEntitlementsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListEntitlementsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List entitlements_ = + java.util.Collections.emptyList(); + + private void ensureEntitlementsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entitlements_ = + new java.util.ArrayList(entitlements_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder> + entitlementsBuilder_; + + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public java.util.List getEntitlementsList() { + if (entitlementsBuilder_ == null) { + return java.util.Collections.unmodifiableList(entitlements_); + } else { + return entitlementsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public int getEntitlementsCount() { + if (entitlementsBuilder_ == null) { + return entitlements_.size(); + } else { + return entitlementsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public com.google.cloud.channel.v1.Entitlement getEntitlements(int index) { + if (entitlementsBuilder_ == null) { + return entitlements_.get(index); + } else { + return entitlementsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder setEntitlements(int index, com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.set(index, value); + onChanged(); + } else { + entitlementsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder setEntitlements( + int index, com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.set(index, builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder addEntitlements(com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.add(value); + onChanged(); + } else { + entitlementsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder addEntitlements(int index, com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.add(index, value); + onChanged(); + } else { + entitlementsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder addEntitlements( + com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.add(builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder addEntitlements( + int index, com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.add(index, builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder addAllEntitlements( + java.lang.Iterable values) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entitlements_); + onChanged(); + } else { + entitlementsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder clearEntitlements() { + if (entitlementsBuilder_ == null) { + entitlements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entitlementsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder removeEntitlements(int index) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.remove(index); + onChanged(); + } else { + entitlementsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public com.google.cloud.channel.v1.Entitlement.Builder getEntitlementsBuilder(int index) { + return getEntitlementsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index) { + if (entitlementsBuilder_ == null) { + return entitlements_.get(index); + } else { + return entitlementsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public java.util.List + getEntitlementsOrBuilderList() { + if (entitlementsBuilder_ != null) { + return entitlementsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entitlements_); + } + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public com.google.cloud.channel.v1.Entitlement.Builder addEntitlementsBuilder() { + return getEntitlementsFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.Entitlement.getDefaultInstance()); + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public com.google.cloud.channel.v1.Entitlement.Builder addEntitlementsBuilder(int index) { + return getEntitlementsFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Entitlement.getDefaultInstance()); + } + /** + * + * + *
+     * The entitlements belonging to the reseller's customer.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public java.util.List + getEntitlementsBuilderList() { + return getEntitlementsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder> + getEntitlementsFieldBuilder() { + if (entitlementsBuilder_ == null) { + entitlementsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder>( + entitlements_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entitlements_ = null; + } + return entitlementsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to List next page of results.
+     * Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to List next page of results.
+     * Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to List next page of results.
+     * Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to List next page of results.
+     * Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to List next page of results.
+     * Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListEntitlementsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListEntitlementsResponse) + private static final com.google.cloud.channel.v1.ListEntitlementsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListEntitlementsResponse(); + } + + public static com.google.cloud.channel.v1.ListEntitlementsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListEntitlementsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListEntitlementsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListEntitlementsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsResponseOrBuilder.java new file mode 100644 index 00000000..10b4ebda --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListEntitlementsResponseOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListEntitlementsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListEntitlementsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The entitlements belonging to the reseller's customer.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + java.util.List getEntitlementsList(); + /** + * + * + *
+   * The entitlements belonging to the reseller's customer.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + com.google.cloud.channel.v1.Entitlement getEntitlements(int index); + /** + * + * + *
+   * The entitlements belonging to the reseller's customer.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + int getEntitlementsCount(); + /** + * + * + *
+   * The entitlements belonging to the reseller's customer.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + java.util.List + getEntitlementsOrBuilderList(); + /** + * + * + *
+   * The entitlements belonging to the reseller's customer.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index); + + /** + * + * + *
+   * A token to List next page of results.
+   * Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to List next page of results.
+   * Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersRequest.java new file mode 100644 index 00000000..ac0e753d --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersRequest.java @@ -0,0 +1,1318 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for ListOffers.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListOffersRequest} + */ +public final class ListOffersRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListOffersRequest) + ListOffersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOffersRequest.newBuilder() to construct. + private ListOffersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOffersRequest() { + parent_ = ""; + pageToken_ = ""; + filter_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListOffersRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListOffersRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + filter_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListOffersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListOffersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListOffersRequest.class, + com.google.cloud.channel.v1.ListOffersRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the reseller account from which to list Offers.
+   * The parent takes the format: accounts/{account_id}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the reseller account from which to list Offers.
+   * The parent takes the format: accounts/{account_id}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 500 Offers will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int FILTER_FIELD_NUMBER = 4; + private volatile java.lang.Object filter_; + /** + * + * + *
+   * Optional. The expression to filter results by name (name of
+   * the Offer), sku.name (name of the SKU) or sku.product.name (name of the
+   * Product).
+   * Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
+   * Example 2: name=accounts/a1/offers/o1
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + @java.lang.Override + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The expression to filter results by name (name of
+   * the Offer), sku.name (name of the SKU) or sku.product.name (name of the
+   * Product).
+   * Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
+   * Example 2: name=accounts/a1/offers/o1
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + @java.lang.Override + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 5; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getFilterBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListOffersRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListOffersRequest other = + (com.google.cloud.channel.v1.ListOffersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getFilter().equals(other.getFilter())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + FILTER_FIELD_NUMBER; + hash = (53 * hash) + getFilter().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListOffersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListOffersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ListOffers.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListOffersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListOffersRequest) + com.google.cloud.channel.v1.ListOffersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListOffersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListOffersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListOffersRequest.class, + com.google.cloud.channel.v1.ListOffersRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListOffersRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + filter_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListOffersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListOffersRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListOffersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListOffersRequest build() { + com.google.cloud.channel.v1.ListOffersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListOffersRequest buildPartial() { + com.google.cloud.channel.v1.ListOffersRequest result = + new com.google.cloud.channel.v1.ListOffersRequest(this); + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.filter_ = filter_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListOffersRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListOffersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListOffersRequest other) { + if (other == com.google.cloud.channel.v1.ListOffersRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getFilter().isEmpty()) { + filter_ = other.filter_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListOffersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ListOffersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the reseller account from which to list Offers.
+     * The parent takes the format: accounts/{account_id}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller account from which to list Offers.
+     * The parent takes the format: accounts/{account_id}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller account from which to list Offers.
+     * The parent takes the format: accounts/{account_id}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller account from which to list Offers.
+     * The parent takes the format: accounts/{account_id}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller account from which to list Offers.
+     * The parent takes the format: accounts/{account_id}.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 500 Offers will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 500 Offers will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 500 Offers will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object filter_ = ""; + /** + * + * + *
+     * Optional. The expression to filter results by name (name of
+     * the Offer), sku.name (name of the SKU) or sku.product.name (name of the
+     * Product).
+     * Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
+     * Example 2: name=accounts/a1/offers/o1
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + public java.lang.String getFilter() { + java.lang.Object ref = filter_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + filter_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The expression to filter results by name (name of
+     * the Offer), sku.name (name of the SKU) or sku.product.name (name of the
+     * Product).
+     * Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
+     * Example 2: name=accounts/a1/offers/o1
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + public com.google.protobuf.ByteString getFilterBytes() { + java.lang.Object ref = filter_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + filter_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The expression to filter results by name (name of
+     * the Offer), sku.name (name of the SKU) or sku.product.name (name of the
+     * Product).
+     * Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
+     * Example 2: name=accounts/a1/offers/o1
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The filter to set. + * @return This builder for chaining. + */ + public Builder setFilter(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + filter_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The expression to filter results by name (name of
+     * the Offer), sku.name (name of the SKU) or sku.product.name (name of the
+     * Product).
+     * Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
+     * Example 2: name=accounts/a1/offers/o1
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearFilter() { + + filter_ = getDefaultInstance().getFilter(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The expression to filter results by name (name of
+     * the Offer), sku.name (name of the SKU) or sku.product.name (name of the
+     * Product).
+     * Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
+     * Example 2: name=accounts/a1/offers/o1
+     * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for filter to set. + * @return This builder for chaining. + */ + public Builder setFilterBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + filter_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListOffersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListOffersRequest) + private static final com.google.cloud.channel.v1.ListOffersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListOffersRequest(); + } + + public static com.google.cloud.channel.v1.ListOffersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOffersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListOffersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListOffersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersRequestOrBuilder.java new file mode 100644 index 00000000..37232cd0 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersRequestOrBuilder.java @@ -0,0 +1,154 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListOffersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListOffersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the reseller account from which to list Offers.
+   * The parent takes the format: accounts/{account_id}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the reseller account from which to list Offers.
+   * The parent takes the format: accounts/{account_id}.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 500 Offers will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The expression to filter results by name (name of
+   * the Offer), sku.name (name of the SKU) or sku.product.name (name of the
+   * Product).
+   * Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
+   * Example 2: name=accounts/a1/offers/o1
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The filter. + */ + java.lang.String getFilter(); + /** + * + * + *
+   * Optional. The expression to filter results by name (name of
+   * the Offer), sku.name (name of the SKU) or sku.product.name (name of the
+   * Product).
+   * Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1
+   * Example 2: name=accounts/a1/offers/o1
+   * 
+ * + * string filter = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for filter. + */ + com.google.protobuf.ByteString getFilterBytes(); + + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersResponse.java new file mode 100644 index 00000000..6e69e27b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersResponse.java @@ -0,0 +1,1122 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for ListOffers.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListOffersResponse} + */ +public final class ListOffersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListOffersResponse) + ListOffersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListOffersResponse.newBuilder() to construct. + private ListOffersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListOffersResponse() { + offers_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListOffersResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListOffersResponse( + 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)) { + offers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + offers_.add( + input.readMessage(com.google.cloud.channel.v1.Offer.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)) { + offers_ = java.util.Collections.unmodifiableList(offers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListOffersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListOffersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListOffersResponse.class, + com.google.cloud.channel.v1.ListOffersResponse.Builder.class); + } + + public static final int OFFERS_FIELD_NUMBER = 1; + private java.util.List offers_; + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + @java.lang.Override + public java.util.List getOffersList() { + return offers_; + } + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + @java.lang.Override + public java.util.List + getOffersOrBuilderList() { + return offers_; + } + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + @java.lang.Override + public int getOffersCount() { + return offers_.size(); + } + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.Offer getOffers(int index) { + return offers_.get(index); + } + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.OfferOrBuilder getOffersOrBuilder(int index) { + return offers_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve 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; + } + } + /** + * + * + *
+   * A token to retrieve 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 < offers_.size(); i++) { + output.writeMessage(1, offers_.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 < offers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, offers_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListOffersResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListOffersResponse other = + (com.google.cloud.channel.v1.ListOffersResponse) obj; + + if (!getOffersList().equals(other.getOffersList())) 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 (getOffersCount() > 0) { + hash = (37 * hash) + OFFERS_FIELD_NUMBER; + hash = (53 * hash) + getOffersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListOffersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListOffersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ListOffers.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListOffersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListOffersResponse) + com.google.cloud.channel.v1.ListOffersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListOffersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListOffersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListOffersResponse.class, + com.google.cloud.channel.v1.ListOffersResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListOffersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getOffersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (offersBuilder_ == null) { + offers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + offersBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListOffersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListOffersResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListOffersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListOffersResponse build() { + com.google.cloud.channel.v1.ListOffersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListOffersResponse buildPartial() { + com.google.cloud.channel.v1.ListOffersResponse result = + new com.google.cloud.channel.v1.ListOffersResponse(this); + int from_bitField0_ = bitField0_; + if (offersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + offers_ = java.util.Collections.unmodifiableList(offers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.offers_ = offers_; + } else { + result.offers_ = offersBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListOffersResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListOffersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListOffersResponse other) { + if (other == com.google.cloud.channel.v1.ListOffersResponse.getDefaultInstance()) return this; + if (offersBuilder_ == null) { + if (!other.offers_.isEmpty()) { + if (offers_.isEmpty()) { + offers_ = other.offers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureOffersIsMutable(); + offers_.addAll(other.offers_); + } + onChanged(); + } + } else { + if (!other.offers_.isEmpty()) { + if (offersBuilder_.isEmpty()) { + offersBuilder_.dispose(); + offersBuilder_ = null; + offers_ = other.offers_; + bitField0_ = (bitField0_ & ~0x00000001); + offersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getOffersFieldBuilder() + : null; + } else { + offersBuilder_.addAllMessages(other.offers_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListOffersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ListOffersResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List offers_ = + java.util.Collections.emptyList(); + + private void ensureOffersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + offers_ = new java.util.ArrayList(offers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Offer, + com.google.cloud.channel.v1.Offer.Builder, + com.google.cloud.channel.v1.OfferOrBuilder> + offersBuilder_; + + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public java.util.List getOffersList() { + if (offersBuilder_ == null) { + return java.util.Collections.unmodifiableList(offers_); + } else { + return offersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public int getOffersCount() { + if (offersBuilder_ == null) { + return offers_.size(); + } else { + return offersBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public com.google.cloud.channel.v1.Offer getOffers(int index) { + if (offersBuilder_ == null) { + return offers_.get(index); + } else { + return offersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public Builder setOffers(int index, com.google.cloud.channel.v1.Offer value) { + if (offersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOffersIsMutable(); + offers_.set(index, value); + onChanged(); + } else { + offersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public Builder setOffers(int index, com.google.cloud.channel.v1.Offer.Builder builderForValue) { + if (offersBuilder_ == null) { + ensureOffersIsMutable(); + offers_.set(index, builderForValue.build()); + onChanged(); + } else { + offersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public Builder addOffers(com.google.cloud.channel.v1.Offer value) { + if (offersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOffersIsMutable(); + offers_.add(value); + onChanged(); + } else { + offersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public Builder addOffers(int index, com.google.cloud.channel.v1.Offer value) { + if (offersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureOffersIsMutable(); + offers_.add(index, value); + onChanged(); + } else { + offersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public Builder addOffers(com.google.cloud.channel.v1.Offer.Builder builderForValue) { + if (offersBuilder_ == null) { + ensureOffersIsMutable(); + offers_.add(builderForValue.build()); + onChanged(); + } else { + offersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public Builder addOffers(int index, com.google.cloud.channel.v1.Offer.Builder builderForValue) { + if (offersBuilder_ == null) { + ensureOffersIsMutable(); + offers_.add(index, builderForValue.build()); + onChanged(); + } else { + offersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public Builder addAllOffers( + java.lang.Iterable values) { + if (offersBuilder_ == null) { + ensureOffersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, offers_); + onChanged(); + } else { + offersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public Builder clearOffers() { + if (offersBuilder_ == null) { + offers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + offersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public Builder removeOffers(int index) { + if (offersBuilder_ == null) { + ensureOffersIsMutable(); + offers_.remove(index); + onChanged(); + } else { + offersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public com.google.cloud.channel.v1.Offer.Builder getOffersBuilder(int index) { + return getOffersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public com.google.cloud.channel.v1.OfferOrBuilder getOffersOrBuilder(int index) { + if (offersBuilder_ == null) { + return offers_.get(index); + } else { + return offersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public java.util.List + getOffersOrBuilderList() { + if (offersBuilder_ != null) { + return offersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(offers_); + } + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public com.google.cloud.channel.v1.Offer.Builder addOffersBuilder() { + return getOffersFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.Offer.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public com.google.cloud.channel.v1.Offer.Builder addOffersBuilder(int index) { + return getOffersFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Offer.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + public java.util.List getOffersBuilderList() { + return getOffersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Offer, + com.google.cloud.channel.v1.Offer.Builder, + com.google.cloud.channel.v1.OfferOrBuilder> + getOffersFieldBuilder() { + if (offersBuilder_ == null) { + offersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Offer, + com.google.cloud.channel.v1.Offer.Builder, + com.google.cloud.channel.v1.OfferOrBuilder>( + offers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + offers_ = null; + } + return offersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve 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; + } + } + /** + * + * + *
+     * A token to retrieve 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; + } + } + /** + * + * + *
+     * A token to retrieve 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; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve 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.cloud.channel.v1.ListOffersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListOffersResponse) + private static final com.google.cloud.channel.v1.ListOffersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListOffersResponse(); + } + + public static com.google.cloud.channel.v1.ListOffersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListOffersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListOffersResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListOffersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersResponseOrBuilder.java new file mode 100644 index 00000000..47c050a4 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListOffersResponseOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListOffersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListOffersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + java.util.List getOffersList(); + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + com.google.cloud.channel.v1.Offer getOffers(int index); + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + int getOffersCount(); + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + java.util.List getOffersOrBuilderList(); + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Offer offers = 1; + */ + com.google.cloud.channel.v1.OfferOrBuilder getOffersOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve 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-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsRequest.java new file mode 100644 index 00000000..f445f825 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsRequest.java @@ -0,0 +1,1112 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for ListProducts.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListProductsRequest} + */ +public final class ListProductsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListProductsRequest) + ListProductsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProductsRequest.newBuilder() to construct. + private ListProductsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListProductsRequest() { + account_ = ""; + pageToken_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListProductsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListProductsRequest( + 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(); + + account_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListProductsRequest.class, + com.google.cloud.channel.v1.ListProductsRequest.Builder.class); + } + + public static final int ACCOUNT_FIELD_NUMBER = 1; + private volatile java.lang.Object account_; + /** + * + * + *
+   * Required. The resource name of the reseller account.
+   * Format: accounts/{account_id}.
+   * 
+ * + * string account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The account. + */ + @java.lang.Override + public java.lang.String getAccount() { + java.lang.Object ref = account_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + account_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the reseller account.
+   * Format: accounts/{account_id}.
+   * 
+ * + * string account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for account. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 Products will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 4; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = 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 (!getAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, account_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, account_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListProductsRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListProductsRequest other = + (com.google.cloud.channel.v1.ListProductsRequest) obj; + + if (!getAccount().equals(other.getAccount())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().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) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListProductsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListProductsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ListProducts.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListProductsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListProductsRequest) + com.google.cloud.channel.v1.ListProductsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListProductsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListProductsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListProductsRequest.class, + com.google.cloud.channel.v1.ListProductsRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListProductsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + account_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListProductsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListProductsRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListProductsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListProductsRequest build() { + com.google.cloud.channel.v1.ListProductsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListProductsRequest buildPartial() { + com.google.cloud.channel.v1.ListProductsRequest result = + new com.google.cloud.channel.v1.ListProductsRequest(this); + result.account_ = account_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListProductsRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListProductsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListProductsRequest other) { + if (other == com.google.cloud.channel.v1.ListProductsRequest.getDefaultInstance()) + return this; + if (!other.getAccount().isEmpty()) { + account_ = other.account_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListProductsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ListProductsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object account_ = ""; + /** + * + * + *
+     * Required. The resource name of the reseller account.
+     * Format: accounts/{account_id}.
+     * 
+ * + * string account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The account. + */ + public java.lang.String getAccount() { + java.lang.Object ref = account_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + account_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller account.
+     * Format: accounts/{account_id}.
+     * 
+ * + * string account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for account. + */ + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller account.
+     * Format: accounts/{account_id}.
+     * 
+ * + * string account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The account to set. + * @return This builder for chaining. + */ + public Builder setAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + account_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller account.
+     * Format: accounts/{account_id}.
+     * 
+ * + * string account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAccount() { + + account_ = getDefaultInstance().getAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller account.
+     * Format: accounts/{account_id}.
+     * 
+ * + * string account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for account to set. + * @return This builder for chaining. + */ + public Builder setAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + account_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 Products will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 Products will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 Products will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListProductsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListProductsRequest) + private static final com.google.cloud.channel.v1.ListProductsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListProductsRequest(); + } + + public static com.google.cloud.channel.v1.ListProductsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListProductsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsRequestOrBuilder.java new file mode 100644 index 00000000..7095b209 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsRequestOrBuilder.java @@ -0,0 +1,121 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListProductsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListProductsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the reseller account.
+   * Format: accounts/{account_id}.
+   * 
+ * + * string account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The account. + */ + java.lang.String getAccount(); + /** + * + * + *
+   * Required. The resource name of the reseller account.
+   * Format: accounts/{account_id}.
+   * 
+ * + * string account = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for account. + */ + com.google.protobuf.ByteString getAccountBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 Products will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsResponse.java new file mode 100644 index 00000000..461ef6ff --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsResponse.java @@ -0,0 +1,1126 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for ListProducts.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListProductsResponse} + */ +public final class ListProductsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListProductsResponse) + ListProductsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListProductsResponse.newBuilder() to construct. + private ListProductsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListProductsResponse() { + products_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListProductsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListProductsResponse( + 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)) { + products_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + products_.add( + input.readMessage( + com.google.cloud.channel.v1.Product.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)) { + products_ = java.util.Collections.unmodifiableList(products_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListProductsResponse.class, + com.google.cloud.channel.v1.ListProductsResponse.Builder.class); + } + + public static final int PRODUCTS_FIELD_NUMBER = 1; + private java.util.List products_; + /** + * + * + *
+   * List of Products requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + @java.lang.Override + public java.util.List getProductsList() { + return products_; + } + /** + * + * + *
+   * List of Products requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + @java.lang.Override + public java.util.List + getProductsOrBuilderList() { + return products_; + } + /** + * + * + *
+   * List of Products requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + @java.lang.Override + public int getProductsCount() { + return products_.size(); + } + /** + * + * + *
+   * List of Products requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.Product getProducts(int index) { + return products_.get(index); + } + /** + * + * + *
+   * List of Products requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ProductOrBuilder getProductsOrBuilder(int index) { + return products_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve 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; + } + } + /** + * + * + *
+   * A token to retrieve 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 < products_.size(); i++) { + output.writeMessage(1, products_.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 < products_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, products_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListProductsResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListProductsResponse other = + (com.google.cloud.channel.v1.ListProductsResponse) obj; + + if (!getProductsList().equals(other.getProductsList())) 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 (getProductsCount() > 0) { + hash = (37 * hash) + PRODUCTS_FIELD_NUMBER; + hash = (53 * hash) + getProductsList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListProductsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListProductsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ListProducts.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListProductsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListProductsResponse) + com.google.cloud.channel.v1.ListProductsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListProductsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListProductsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListProductsResponse.class, + com.google.cloud.channel.v1.ListProductsResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListProductsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getProductsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + productsBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListProductsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListProductsResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListProductsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListProductsResponse build() { + com.google.cloud.channel.v1.ListProductsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListProductsResponse buildPartial() { + com.google.cloud.channel.v1.ListProductsResponse result = + new com.google.cloud.channel.v1.ListProductsResponse(this); + int from_bitField0_ = bitField0_; + if (productsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + products_ = java.util.Collections.unmodifiableList(products_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.products_ = products_; + } else { + result.products_ = productsBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListProductsResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListProductsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListProductsResponse other) { + if (other == com.google.cloud.channel.v1.ListProductsResponse.getDefaultInstance()) + return this; + if (productsBuilder_ == null) { + if (!other.products_.isEmpty()) { + if (products_.isEmpty()) { + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureProductsIsMutable(); + products_.addAll(other.products_); + } + onChanged(); + } + } else { + if (!other.products_.isEmpty()) { + if (productsBuilder_.isEmpty()) { + productsBuilder_.dispose(); + productsBuilder_ = null; + products_ = other.products_; + bitField0_ = (bitField0_ & ~0x00000001); + productsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getProductsFieldBuilder() + : null; + } else { + productsBuilder_.addAllMessages(other.products_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListProductsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ListProductsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List products_ = + java.util.Collections.emptyList(); + + private void ensureProductsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + products_ = new java.util.ArrayList(products_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Product, + com.google.cloud.channel.v1.Product.Builder, + com.google.cloud.channel.v1.ProductOrBuilder> + productsBuilder_; + + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public java.util.List getProductsList() { + if (productsBuilder_ == null) { + return java.util.Collections.unmodifiableList(products_); + } else { + return productsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public int getProductsCount() { + if (productsBuilder_ == null) { + return products_.size(); + } else { + return productsBuilder_.getCount(); + } + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public com.google.cloud.channel.v1.Product getProducts(int index) { + if (productsBuilder_ == null) { + return products_.get(index); + } else { + return productsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public Builder setProducts(int index, com.google.cloud.channel.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.set(index, value); + onChanged(); + } else { + productsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public Builder setProducts( + int index, com.google.cloud.channel.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.set(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public Builder addProducts(com.google.cloud.channel.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(value); + onChanged(); + } else { + productsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public Builder addProducts(int index, com.google.cloud.channel.v1.Product value) { + if (productsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureProductsIsMutable(); + products_.add(index, value); + onChanged(); + } else { + productsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public Builder addProducts(com.google.cloud.channel.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public Builder addProducts( + int index, com.google.cloud.channel.v1.Product.Builder builderForValue) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.add(index, builderForValue.build()); + onChanged(); + } else { + productsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public Builder addAllProducts( + java.lang.Iterable values) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, products_); + onChanged(); + } else { + productsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public Builder clearProducts() { + if (productsBuilder_ == null) { + products_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + productsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public Builder removeProducts(int index) { + if (productsBuilder_ == null) { + ensureProductsIsMutable(); + products_.remove(index); + onChanged(); + } else { + productsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public com.google.cloud.channel.v1.Product.Builder getProductsBuilder(int index) { + return getProductsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public com.google.cloud.channel.v1.ProductOrBuilder getProductsOrBuilder(int index) { + if (productsBuilder_ == null) { + return products_.get(index); + } else { + return productsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public java.util.List + getProductsOrBuilderList() { + if (productsBuilder_ != null) { + return productsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(products_); + } + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public com.google.cloud.channel.v1.Product.Builder addProductsBuilder() { + return getProductsFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.Product.getDefaultInstance()); + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public com.google.cloud.channel.v1.Product.Builder addProductsBuilder(int index) { + return getProductsFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Product.getDefaultInstance()); + } + /** + * + * + *
+     * List of Products requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + public java.util.List getProductsBuilderList() { + return getProductsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Product, + com.google.cloud.channel.v1.Product.Builder, + com.google.cloud.channel.v1.ProductOrBuilder> + getProductsFieldBuilder() { + if (productsBuilder_ == null) { + productsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Product, + com.google.cloud.channel.v1.Product.Builder, + com.google.cloud.channel.v1.ProductOrBuilder>( + products_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + products_ = null; + } + return productsBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve 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; + } + } + /** + * + * + *
+     * A token to retrieve 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; + } + } + /** + * + * + *
+     * A token to retrieve 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; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve 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.cloud.channel.v1.ListProductsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListProductsResponse) + private static final com.google.cloud.channel.v1.ListProductsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListProductsResponse(); + } + + public static com.google.cloud.channel.v1.ListProductsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListProductsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListProductsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListProductsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsResponseOrBuilder.java new file mode 100644 index 00000000..cf288372 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListProductsResponseOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListProductsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListProductsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List of Products requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + java.util.List getProductsList(); + /** + * + * + *
+   * List of Products requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + com.google.cloud.channel.v1.Product getProducts(int index); + /** + * + * + *
+   * List of Products requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + int getProductsCount(); + /** + * + * + *
+   * List of Products requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + java.util.List getProductsOrBuilderList(); + /** + * + * + *
+   * List of Products requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Product products = 1; + */ + com.google.cloud.channel.v1.ProductOrBuilder getProductsOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve 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-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersRequest.java new file mode 100644 index 00000000..32ee12d9 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersRequest.java @@ -0,0 +1,3572 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for ListPurchasableOffers.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListPurchasableOffersRequest} + */ +public final class ListPurchasableOffersRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListPurchasableOffersRequest) + ListPurchasableOffersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPurchasableOffersRequest.newBuilder() to construct. + private ListPurchasableOffersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPurchasableOffersRequest() { + customer_ = ""; + pageToken_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPurchasableOffersRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPurchasableOffersRequest( + 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(); + + customer_ = s; + break; + } + case 18: + { + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .Builder + subBuilder = null; + if (purchaseOptionCase_ == 2) { + subBuilder = + ((com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchase) + purchaseOption_) + .toBuilder(); + } + purchaseOption_ = + input.readMessage( + com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchase.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchase) + purchaseOption_); + purchaseOption_ = subBuilder.buildPartial(); + } + purchaseOptionCase_ = 2; + break; + } + case 26: + { + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase.Builder + subBuilder = null; + if (purchaseOptionCase_ == 3) { + subBuilder = + ((com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + purchaseOption_) + .toBuilder(); + } + purchaseOption_ = + input.readMessage( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + purchaseOption_); + purchaseOption_ = subBuilder.buildPartial(); + } + purchaseOptionCase_ = 3; + break; + } + case 32: + { + pageSize_ = input.readInt32(); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.class, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.Builder.class); + } + + public interface CreateEntitlementPurchaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. SKU that the result should be restricted to.
+     * Format: products/{product_id}/skus/{sku_id}.
+     * 
+ * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sku. + */ + java.lang.String getSku(); + /** + * + * + *
+     * Required. SKU that the result should be restricted to.
+     * Format: products/{product_id}/skus/{sku_id}.
+     * 
+ * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sku. + */ + com.google.protobuf.ByteString getSkuBytes(); + } + /** + * + * + *
+   * List Offers for CreateEntitlement purchase.
+   * 
+ * + * Protobuf type {@code + * google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase} + */ + public static final class CreateEntitlementPurchase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + CreateEntitlementPurchaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEntitlementPurchase.newBuilder() to construct. + private CreateEntitlementPurchase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEntitlementPurchase() { + sku_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEntitlementPurchase(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateEntitlementPurchase( + 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(); + + sku_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_CreateEntitlementPurchase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_CreateEntitlementPurchase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .class, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .Builder.class); + } + + public static final int SKU_FIELD_NUMBER = 1; + private volatile java.lang.Object sku_; + /** + * + * + *
+     * Required. SKU that the result should be restricted to.
+     * Format: products/{product_id}/skus/{sku_id}.
+     * 
+ * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sku. + */ + @java.lang.Override + public java.lang.String getSku() { + java.lang.Object ref = sku_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sku_ = s; + return s; + } + } + /** + * + * + *
+     * Required. SKU that the result should be restricted to.
+     * Format: products/{product_id}/skus/{sku_id}.
+     * 
+ * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sku. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSkuBytes() { + java.lang.Object ref = sku_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sku_ = 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 (!getSkuBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sku_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getSkuBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sku_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase other = + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) obj; + + if (!getSku().equals(other.getSku())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + SKU_FIELD_NUMBER; + hash = (53 * hash) + getSku().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * List Offers for CreateEntitlement purchase.
+     * 
+ * + * Protobuf type {@code + * google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_CreateEntitlementPurchase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_CreateEntitlementPurchase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .class, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .Builder.class); + } + + // Construct using + // com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + sku_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_CreateEntitlementPurchase_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + build() { + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + buildPartial() { + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase result = + new com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase( + this); + result.sku_ = sku_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) { + return mergeFrom( + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + other) { + if (other + == com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .getDefaultInstance()) return this; + if (!other.getSku().isEmpty()) { + sku_ = other.sku_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object sku_ = ""; + /** + * + * + *
+       * Required. SKU that the result should be restricted to.
+       * Format: products/{product_id}/skus/{sku_id}.
+       * 
+ * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sku. + */ + public java.lang.String getSku() { + java.lang.Object ref = sku_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sku_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. SKU that the result should be restricted to.
+       * Format: products/{product_id}/skus/{sku_id}.
+       * 
+ * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sku. + */ + public com.google.protobuf.ByteString getSkuBytes() { + java.lang.Object ref = sku_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sku_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. SKU that the result should be restricted to.
+       * Format: products/{product_id}/skus/{sku_id}.
+       * 
+ * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The sku to set. + * @return This builder for chaining. + */ + public Builder setSku(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sku_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. SKU that the result should be restricted to.
+       * Format: products/{product_id}/skus/{sku_id}.
+       * 
+ * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSku() { + + sku_ = getDefaultInstance().getSku(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. SKU that the result should be restricted to.
+       * Format: products/{product_id}/skus/{sku_id}.
+       * 
+ * + * string sku = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for sku to set. + * @return This builder for chaining. + */ + public Builder setSkuBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sku_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + private static final com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchase + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase(); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEntitlementPurchase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateEntitlementPurchase(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ChangeOfferPurchaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Resource name of the entitlement.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entitlement. + */ + java.lang.String getEntitlement(); + /** + * + * + *
+     * Required. Resource name of the entitlement.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entitlement. + */ + com.google.protobuf.ByteString getEntitlementBytes(); + + /** + * + * + *
+     * Optional. Resource name of the SKU that is being changed to. Should be provided if
+     * upgrading or downgrading an entitlement. Format:
+     * products/{product_id}/skus/{sku_id}
+     * 
+ * + * string new_sku = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The newSku. + */ + java.lang.String getNewSku(); + /** + * + * + *
+     * Optional. Resource name of the SKU that is being changed to. Should be provided if
+     * upgrading or downgrading an entitlement. Format:
+     * products/{product_id}/skus/{sku_id}
+     * 
+ * + * string new_sku = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for newSku. + */ + com.google.protobuf.ByteString getNewSkuBytes(); + } + /** + * + * + *
+   * List Offers for ChangeOffer purchase.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase} + */ + public static final class ChangeOfferPurchase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + ChangeOfferPurchaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChangeOfferPurchase.newBuilder() to construct. + private ChangeOfferPurchase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChangeOfferPurchase() { + entitlement_ = ""; + newSku_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeOfferPurchase(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ChangeOfferPurchase( + 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(); + + entitlement_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + newSku_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_ChangeOfferPurchase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_ChangeOfferPurchase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase.class, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase.Builder + .class); + } + + public static final int ENTITLEMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object entitlement_; + /** + * + * + *
+     * Required. Resource name of the entitlement.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entitlement. + */ + @java.lang.Override + public java.lang.String getEntitlement() { + java.lang.Object ref = entitlement_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entitlement_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Resource name of the entitlement.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entitlement. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntitlementBytes() { + java.lang.Object ref = entitlement_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entitlement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int NEW_SKU_FIELD_NUMBER = 2; + private volatile java.lang.Object newSku_; + /** + * + * + *
+     * Optional. Resource name of the SKU that is being changed to. Should be provided if
+     * upgrading or downgrading an entitlement. Format:
+     * products/{product_id}/skus/{sku_id}
+     * 
+ * + * string new_sku = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The newSku. + */ + @java.lang.Override + public java.lang.String getNewSku() { + java.lang.Object ref = newSku_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newSku_ = s; + return s; + } + } + /** + * + * + *
+     * Optional. Resource name of the SKU that is being changed to. Should be provided if
+     * upgrading or downgrading an entitlement. Format:
+     * products/{product_id}/skus/{sku_id}
+     * 
+ * + * string new_sku = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for newSku. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNewSkuBytes() { + java.lang.Object ref = newSku_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newSku_ = 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 (!getEntitlementBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entitlement_); + } + if (!getNewSkuBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, newSku_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEntitlementBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entitlement_); + } + if (!getNewSkuBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, newSku_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase other = + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) obj; + + if (!getEntitlement().equals(other.getEntitlement())) return false; + if (!getNewSku().equals(other.getNewSku())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENTITLEMENT_FIELD_NUMBER; + hash = (53 * hash) + getEntitlement().hashCode(); + hash = (37 * hash) + NEW_SKU_FIELD_NUMBER; + hash = (53 * hash) + getNewSku().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * List Offers for ChangeOffer purchase.
+     * 
+ * + * Protobuf type {@code + * google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_ChangeOfferPurchase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_ChangeOfferPurchase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase.class, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase.Builder + .class); + } + + // Construct using + // com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + entitlement_ = ""; + + newSku_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_ChangeOfferPurchase_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase build() { + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + buildPartial() { + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase result = + new com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase(this); + result.entitlement_ = entitlement_; + result.newSku_ = newSku_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) { + return mergeFrom( + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase other) { + if (other + == com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .getDefaultInstance()) return this; + if (!other.getEntitlement().isEmpty()) { + entitlement_ = other.entitlement_; + onChanged(); + } + if (!other.getNewSku().isEmpty()) { + newSku_ = other.newSku_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object entitlement_ = ""; + /** + * + * + *
+       * Required. Resource name of the entitlement.
+       * Format:
+       * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+       * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entitlement. + */ + public java.lang.String getEntitlement() { + java.lang.Object ref = entitlement_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entitlement_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Resource name of the entitlement.
+       * Format:
+       * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+       * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entitlement. + */ + public com.google.protobuf.ByteString getEntitlementBytes() { + java.lang.Object ref = entitlement_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entitlement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Resource name of the entitlement.
+       * Format:
+       * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+       * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The entitlement to set. + * @return This builder for chaining. + */ + public Builder setEntitlement(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + entitlement_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Resource name of the entitlement.
+       * Format:
+       * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+       * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEntitlement() { + + entitlement_ = getDefaultInstance().getEntitlement(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Resource name of the entitlement.
+       * Format:
+       * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+       * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for entitlement to set. + * @return This builder for chaining. + */ + public Builder setEntitlementBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + entitlement_ = value; + onChanged(); + return this; + } + + private java.lang.Object newSku_ = ""; + /** + * + * + *
+       * Optional. Resource name of the SKU that is being changed to. Should be provided if
+       * upgrading or downgrading an entitlement. Format:
+       * products/{product_id}/skus/{sku_id}
+       * 
+ * + * string new_sku = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The newSku. + */ + public java.lang.String getNewSku() { + java.lang.Object ref = newSku_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + newSku_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Optional. Resource name of the SKU that is being changed to. Should be provided if
+       * upgrading or downgrading an entitlement. Format:
+       * products/{product_id}/skus/{sku_id}
+       * 
+ * + * string new_sku = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for newSku. + */ + public com.google.protobuf.ByteString getNewSkuBytes() { + java.lang.Object ref = newSku_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + newSku_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Optional. Resource name of the SKU that is being changed to. Should be provided if
+       * upgrading or downgrading an entitlement. Format:
+       * products/{product_id}/skus/{sku_id}
+       * 
+ * + * string new_sku = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The newSku to set. + * @return This builder for chaining. + */ + public Builder setNewSku(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + newSku_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Resource name of the SKU that is being changed to. Should be provided if
+       * upgrading or downgrading an entitlement. Format:
+       * products/{product_id}/skus/{sku_id}
+       * 
+ * + * string new_sku = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearNewSku() { + + newSku_ = getDefaultInstance().getNewSku(); + onChanged(); + return this; + } + /** + * + * + *
+       * Optional. Resource name of the SKU that is being changed to. Should be provided if
+       * upgrading or downgrading an entitlement. Format:
+       * products/{product_id}/skus/{sku_id}
+       * 
+ * + * string new_sku = 2 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for newSku to set. + * @return This builder for chaining. + */ + public Builder setNewSkuBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + newSku_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + private static final com.google.cloud.channel.v1.ListPurchasableOffersRequest + .ChangeOfferPurchase + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase(); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChangeOfferPurchase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ChangeOfferPurchase(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int purchaseOptionCase_ = 0; + private java.lang.Object purchaseOption_; + + public enum PurchaseOptionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CREATE_ENTITLEMENT_PURCHASE(2), + CHANGE_OFFER_PURCHASE(3), + PURCHASEOPTION_NOT_SET(0); + private final int value; + + private PurchaseOptionCase(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 PurchaseOptionCase valueOf(int value) { + return forNumber(value); + } + + public static PurchaseOptionCase forNumber(int value) { + switch (value) { + case 2: + return CREATE_ENTITLEMENT_PURCHASE; + case 3: + return CHANGE_OFFER_PURCHASE; + case 0: + return PURCHASEOPTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PurchaseOptionCase getPurchaseOptionCase() { + return PurchaseOptionCase.forNumber(purchaseOptionCase_); + } + + public static final int CREATE_ENTITLEMENT_PURCHASE_FIELD_NUMBER = 2; + /** + * + * + *
+   * List Offers for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return Whether the createEntitlementPurchase field is set. + */ + @java.lang.Override + public boolean hasCreateEntitlementPurchase() { + return purchaseOptionCase_ == 2; + } + /** + * + * + *
+   * List Offers for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return The createEntitlementPurchase. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + getCreateEntitlementPurchase() { + if (purchaseOptionCase_ == 2) { + return (com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + /** + * + * + *
+   * List Offers for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchaseOrBuilder + getCreateEntitlementPurchaseOrBuilder() { + if (purchaseOptionCase_ == 2) { + return (com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + + public static final int CHANGE_OFFER_PURCHASE_FIELD_NUMBER = 3; + /** + * + * + *
+   * List Offers for ChangeOffer purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return Whether the changeOfferPurchase field is set. + */ + @java.lang.Override + public boolean hasChangeOfferPurchase() { + return purchaseOptionCase_ == 3; + } + /** + * + * + *
+   * List Offers for ChangeOffer purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return The changeOfferPurchase. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + getChangeOfferPurchase() { + if (purchaseOptionCase_ == 3) { + return (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + /** + * + * + *
+   * List Offers for ChangeOffer purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchaseOrBuilder + getChangeOfferPurchaseOrBuilder() { + if (purchaseOptionCase_ == 3) { + return (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + + public static final int CUSTOMER_FIELD_NUMBER = 1; + private volatile java.lang.Object customer_; + /** + * + * + *
+   * Required. The resource name of the customer for which to list Offers.
+   * Format: accounts/{account_id}/customers/{customer_id}.
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The customer. + */ + @java.lang.Override + public java.lang.String getCustomer() { + java.lang.Object ref = customer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customer_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the customer for which to list Offers.
+   * Format: accounts/{account_id}/customers/{customer_id}.
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomerBytes() { + java.lang.Object ref = customer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 Offers will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = 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 (!getCustomerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, customer_); + } + if (purchaseOptionCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + purchaseOption_); + } + if (purchaseOptionCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + purchaseOption_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCustomerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, customer_); + } + if (purchaseOptionCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + purchaseOption_); + } + if (purchaseOptionCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + purchaseOption_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListPurchasableOffersRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListPurchasableOffersRequest other = + (com.google.cloud.channel.v1.ListPurchasableOffersRequest) obj; + + if (!getCustomer().equals(other.getCustomer())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getPurchaseOptionCase().equals(other.getPurchaseOptionCase())) return false; + switch (purchaseOptionCase_) { + case 2: + if (!getCreateEntitlementPurchase().equals(other.getCreateEntitlementPurchase())) + return false; + break; + case 3: + if (!getChangeOfferPurchase().equals(other.getChangeOfferPurchase())) 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) + CUSTOMER_FIELD_NUMBER; + hash = (53 * hash) + getCustomer().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) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + switch (purchaseOptionCase_) { + case 2: + hash = (37 * hash) + CREATE_ENTITLEMENT_PURCHASE_FIELD_NUMBER; + hash = (53 * hash) + getCreateEntitlementPurchase().hashCode(); + break; + case 3: + hash = (37 * hash) + CHANGE_OFFER_PURCHASE_FIELD_NUMBER; + hash = (53 * hash) + getChangeOfferPurchase().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListPurchasableOffersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ListPurchasableOffers.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListPurchasableOffersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListPurchasableOffersRequest) + com.google.cloud.channel.v1.ListPurchasableOffersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.class, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListPurchasableOffersRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + customer_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + languageCode_ = ""; + + purchaseOptionCase_ = 0; + purchaseOption_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest build() { + com.google.cloud.channel.v1.ListPurchasableOffersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest buildPartial() { + com.google.cloud.channel.v1.ListPurchasableOffersRequest result = + new com.google.cloud.channel.v1.ListPurchasableOffersRequest(this); + if (purchaseOptionCase_ == 2) { + if (createEntitlementPurchaseBuilder_ == null) { + result.purchaseOption_ = purchaseOption_; + } else { + result.purchaseOption_ = createEntitlementPurchaseBuilder_.build(); + } + } + if (purchaseOptionCase_ == 3) { + if (changeOfferPurchaseBuilder_ == null) { + result.purchaseOption_ = purchaseOption_; + } else { + result.purchaseOption_ = changeOfferPurchaseBuilder_.build(); + } + } + result.customer_ = customer_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.languageCode_ = languageCode_; + result.purchaseOptionCase_ = purchaseOptionCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListPurchasableOffersRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListPurchasableOffersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListPurchasableOffersRequest other) { + if (other == com.google.cloud.channel.v1.ListPurchasableOffersRequest.getDefaultInstance()) + return this; + if (!other.getCustomer().isEmpty()) { + customer_ = other.customer_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + switch (other.getPurchaseOptionCase()) { + case CREATE_ENTITLEMENT_PURCHASE: + { + mergeCreateEntitlementPurchase(other.getCreateEntitlementPurchase()); + break; + } + case CHANGE_OFFER_PURCHASE: + { + mergeChangeOfferPurchase(other.getChangeOfferPurchase()); + break; + } + case PURCHASEOPTION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListPurchasableOffersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListPurchasableOffersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int purchaseOptionCase_ = 0; + private java.lang.Object purchaseOption_; + + public PurchaseOptionCase getPurchaseOptionCase() { + return PurchaseOptionCase.forNumber(purchaseOptionCase_); + } + + public Builder clearPurchaseOption() { + purchaseOptionCase_ = 0; + purchaseOption_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .Builder, + com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchaseOrBuilder> + createEntitlementPurchaseBuilder_; + /** + * + * + *
+     * List Offers for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return Whether the createEntitlementPurchase field is set. + */ + @java.lang.Override + public boolean hasCreateEntitlementPurchase() { + return purchaseOptionCase_ == 2; + } + /** + * + * + *
+     * List Offers for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return The createEntitlementPurchase. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + getCreateEntitlementPurchase() { + if (createEntitlementPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 2) { + return (com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } else { + if (purchaseOptionCase_ == 2) { + return createEntitlementPurchaseBuilder_.getMessage(); + } + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + } + /** + * + * + *
+     * List Offers for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + public Builder setCreateEntitlementPurchase( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase value) { + if (createEntitlementPurchaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + purchaseOption_ = value; + onChanged(); + } else { + createEntitlementPurchaseBuilder_.setMessage(value); + } + purchaseOptionCase_ = 2; + return this; + } + /** + * + * + *
+     * List Offers for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + public Builder setCreateEntitlementPurchase( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase.Builder + builderForValue) { + if (createEntitlementPurchaseBuilder_ == null) { + purchaseOption_ = builderForValue.build(); + onChanged(); + } else { + createEntitlementPurchaseBuilder_.setMessage(builderForValue.build()); + } + purchaseOptionCase_ = 2; + return this; + } + /** + * + * + *
+     * List Offers for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + public Builder mergeCreateEntitlementPurchase( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase value) { + if (createEntitlementPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 2 + && purchaseOption_ + != com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchase.getDefaultInstance()) { + purchaseOption_ = + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .newBuilder( + (com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchase) + purchaseOption_) + .mergeFrom(value) + .buildPartial(); + } else { + purchaseOption_ = value; + } + onChanged(); + } else { + if (purchaseOptionCase_ == 2) { + createEntitlementPurchaseBuilder_.mergeFrom(value); + } + createEntitlementPurchaseBuilder_.setMessage(value); + } + purchaseOptionCase_ = 2; + return this; + } + /** + * + * + *
+     * List Offers for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + public Builder clearCreateEntitlementPurchase() { + if (createEntitlementPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 2) { + purchaseOptionCase_ = 0; + purchaseOption_ = null; + onChanged(); + } + } else { + if (purchaseOptionCase_ == 2) { + purchaseOptionCase_ = 0; + purchaseOption_ = null; + } + createEntitlementPurchaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List Offers for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .Builder + getCreateEntitlementPurchaseBuilder() { + return getCreateEntitlementPurchaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * List Offers for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchaseOrBuilder + getCreateEntitlementPurchaseOrBuilder() { + if ((purchaseOptionCase_ == 2) && (createEntitlementPurchaseBuilder_ != null)) { + return createEntitlementPurchaseBuilder_.getMessageOrBuilder(); + } else { + if (purchaseOptionCase_ == 2) { + return (com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + } + /** + * + * + *
+     * List Offers for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .Builder, + com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchaseOrBuilder> + getCreateEntitlementPurchaseFieldBuilder() { + if (createEntitlementPurchaseBuilder_ == null) { + if (!(purchaseOptionCase_ == 2)) { + purchaseOption_ = + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + createEntitlementPurchaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + .Builder, + com.google.cloud.channel.v1.ListPurchasableOffersRequest + .CreateEntitlementPurchaseOrBuilder>( + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase) + purchaseOption_, + getParentForChildren(), + isClean()); + purchaseOption_ = null; + } + purchaseOptionCase_ = 2; + onChanged(); + ; + return createEntitlementPurchaseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase.Builder, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchaseOrBuilder> + changeOfferPurchaseBuilder_; + /** + * + * + *
+     * List Offers for ChangeOffer purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return Whether the changeOfferPurchase field is set. + */ + @java.lang.Override + public boolean hasChangeOfferPurchase() { + return purchaseOptionCase_ == 3; + } + /** + * + * + *
+     * List Offers for ChangeOffer purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return The changeOfferPurchase. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + getChangeOfferPurchase() { + if (changeOfferPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 3) { + return (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .getDefaultInstance(); + } else { + if (purchaseOptionCase_ == 3) { + return changeOfferPurchaseBuilder_.getMessage(); + } + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + } + /** + * + * + *
+     * List Offers for ChangeOffer purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + public Builder setChangeOfferPurchase( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase value) { + if (changeOfferPurchaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + purchaseOption_ = value; + onChanged(); + } else { + changeOfferPurchaseBuilder_.setMessage(value); + } + purchaseOptionCase_ = 3; + return this; + } + /** + * + * + *
+     * List Offers for ChangeOffer purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + public Builder setChangeOfferPurchase( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase.Builder + builderForValue) { + if (changeOfferPurchaseBuilder_ == null) { + purchaseOption_ = builderForValue.build(); + onChanged(); + } else { + changeOfferPurchaseBuilder_.setMessage(builderForValue.build()); + } + purchaseOptionCase_ = 3; + return this; + } + /** + * + * + *
+     * List Offers for ChangeOffer purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + public Builder mergeChangeOfferPurchase( + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase value) { + if (changeOfferPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 3 + && purchaseOption_ + != com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .getDefaultInstance()) { + purchaseOption_ = + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .newBuilder( + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + purchaseOption_) + .mergeFrom(value) + .buildPartial(); + } else { + purchaseOption_ = value; + } + onChanged(); + } else { + if (purchaseOptionCase_ == 3) { + changeOfferPurchaseBuilder_.mergeFrom(value); + } + changeOfferPurchaseBuilder_.setMessage(value); + } + purchaseOptionCase_ = 3; + return this; + } + /** + * + * + *
+     * List Offers for ChangeOffer purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + public Builder clearChangeOfferPurchase() { + if (changeOfferPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 3) { + purchaseOptionCase_ = 0; + purchaseOption_ = null; + onChanged(); + } + } else { + if (purchaseOptionCase_ == 3) { + purchaseOptionCase_ = 0; + purchaseOption_ = null; + } + changeOfferPurchaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List Offers for ChangeOffer purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase.Builder + getChangeOfferPurchaseBuilder() { + return getChangeOfferPurchaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * List Offers for ChangeOffer purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchaseOrBuilder + getChangeOfferPurchaseOrBuilder() { + if ((purchaseOptionCase_ == 3) && (changeOfferPurchaseBuilder_ != null)) { + return changeOfferPurchaseBuilder_.getMessageOrBuilder(); + } else { + if (purchaseOptionCase_ == 3) { + return (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + } + /** + * + * + *
+     * List Offers for ChangeOffer purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase.Builder, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchaseOrBuilder> + getChangeOfferPurchaseFieldBuilder() { + if (changeOfferPurchaseBuilder_ == null) { + if (!(purchaseOptionCase_ == 3)) { + purchaseOption_ = + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + changeOfferPurchaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase, + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + .Builder, + com.google.cloud.channel.v1.ListPurchasableOffersRequest + .ChangeOfferPurchaseOrBuilder>( + (com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase) + purchaseOption_, + getParentForChildren(), + isClean()); + purchaseOption_ = null; + } + purchaseOptionCase_ = 3; + onChanged(); + ; + return changeOfferPurchaseBuilder_; + } + + private java.lang.Object customer_ = ""; + /** + * + * + *
+     * Required. The resource name of the customer for which to list Offers.
+     * Format: accounts/{account_id}/customers/{customer_id}.
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The customer. + */ + public java.lang.String getCustomer() { + java.lang.Object ref = customer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the customer for which to list Offers.
+     * Format: accounts/{account_id}/customers/{customer_id}.
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customer. + */ + public com.google.protobuf.ByteString getCustomerBytes() { + java.lang.Object ref = customer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the customer for which to list Offers.
+     * Format: accounts/{account_id}/customers/{customer_id}.
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The customer to set. + * @return This builder for chaining. + */ + public Builder setCustomer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customer_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the customer for which to list Offers.
+     * Format: accounts/{account_id}/customers/{customer_id}.
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearCustomer() { + + customer_ = getDefaultInstance().getCustomer(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the customer for which to list Offers.
+     * Format: accounts/{account_id}/customers/{customer_id}.
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for customer to set. + * @return This builder for chaining. + */ + public Builder setCustomerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customer_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 Offers will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 Offers will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 Offers will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListPurchasableOffersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListPurchasableOffersRequest) + private static final com.google.cloud.channel.v1.ListPurchasableOffersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListPurchasableOffersRequest(); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPurchasableOffersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPurchasableOffersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersRequestOrBuilder.java new file mode 100644 index 00000000..5e376603 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersRequestOrBuilder.java @@ -0,0 +1,214 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListPurchasableOffersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListPurchasableOffersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List Offers for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return Whether the createEntitlementPurchase field is set. + */ + boolean hasCreateEntitlementPurchase(); + /** + * + * + *
+   * List Offers for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return The createEntitlementPurchase. + */ + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase + getCreateEntitlementPurchase(); + /** + * + * + *
+   * List Offers for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + com.google.cloud.channel.v1.ListPurchasableOffersRequest.CreateEntitlementPurchaseOrBuilder + getCreateEntitlementPurchaseOrBuilder(); + + /** + * + * + *
+   * List Offers for ChangeOffer purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return Whether the changeOfferPurchase field is set. + */ + boolean hasChangeOfferPurchase(); + /** + * + * + *
+   * List Offers for ChangeOffer purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return The changeOfferPurchase. + */ + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase + getChangeOfferPurchase(); + /** + * + * + *
+   * List Offers for ChangeOffer purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + com.google.cloud.channel.v1.ListPurchasableOffersRequest.ChangeOfferPurchaseOrBuilder + getChangeOfferPurchaseOrBuilder(); + + /** + * + * + *
+   * Required. The resource name of the customer for which to list Offers.
+   * Format: accounts/{account_id}/customers/{customer_id}.
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The customer. + */ + java.lang.String getCustomer(); + /** + * + * + *
+   * Required. The resource name of the customer for which to list Offers.
+   * Format: accounts/{account_id}/customers/{customer_id}.
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customer. + */ + com.google.protobuf.ByteString getCustomerBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 Offers will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + public com.google.cloud.channel.v1.ListPurchasableOffersRequest.PurchaseOptionCase + getPurchaseOptionCase(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersResponse.java new file mode 100644 index 00000000..110a66bc --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersResponse.java @@ -0,0 +1,1143 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for ListPurchasableOffers.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListPurchasableOffersResponse} + */ +public final class ListPurchasableOffersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListPurchasableOffersResponse) + ListPurchasableOffersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPurchasableOffersResponse.newBuilder() to construct. + private ListPurchasableOffersResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPurchasableOffersResponse() { + purchasableOffers_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPurchasableOffersResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPurchasableOffersResponse( + 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)) { + purchasableOffers_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + purchasableOffers_.add( + input.readMessage( + com.google.cloud.channel.v1.PurchasableOffer.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)) { + purchasableOffers_ = java.util.Collections.unmodifiableList(purchasableOffers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableOffersResponse.class, + com.google.cloud.channel.v1.ListPurchasableOffersResponse.Builder.class); + } + + public static final int PURCHASABLE_OFFERS_FIELD_NUMBER = 1; + private java.util.List purchasableOffers_; + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + @java.lang.Override + public java.util.List getPurchasableOffersList() { + return purchasableOffers_; + } + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + @java.lang.Override + public java.util.List + getPurchasableOffersOrBuilderList() { + return purchasableOffers_; + } + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + @java.lang.Override + public int getPurchasableOffersCount() { + return purchasableOffers_.size(); + } + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableOffer getPurchasableOffers(int index) { + return purchasableOffers_.get(index); + } + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableOfferOrBuilder getPurchasableOffersOrBuilder( + int index) { + return purchasableOffers_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve 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; + } + } + /** + * + * + *
+   * A token to retrieve 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 < purchasableOffers_.size(); i++) { + output.writeMessage(1, purchasableOffers_.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 < purchasableOffers_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, purchasableOffers_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListPurchasableOffersResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListPurchasableOffersResponse other = + (com.google.cloud.channel.v1.ListPurchasableOffersResponse) obj; + + if (!getPurchasableOffersList().equals(other.getPurchasableOffersList())) 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 (getPurchasableOffersCount() > 0) { + hash = (37 * hash) + PURCHASABLE_OFFERS_FIELD_NUMBER; + hash = (53 * hash) + getPurchasableOffersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListPurchasableOffersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ListPurchasableOffers.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListPurchasableOffersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListPurchasableOffersResponse) + com.google.cloud.channel.v1.ListPurchasableOffersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableOffersResponse.class, + com.google.cloud.channel.v1.ListPurchasableOffersResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListPurchasableOffersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPurchasableOffersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (purchasableOffersBuilder_ == null) { + purchasableOffers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + purchasableOffersBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableOffersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListPurchasableOffersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersResponse build() { + com.google.cloud.channel.v1.ListPurchasableOffersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersResponse buildPartial() { + com.google.cloud.channel.v1.ListPurchasableOffersResponse result = + new com.google.cloud.channel.v1.ListPurchasableOffersResponse(this); + int from_bitField0_ = bitField0_; + if (purchasableOffersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + purchasableOffers_ = java.util.Collections.unmodifiableList(purchasableOffers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.purchasableOffers_ = purchasableOffers_; + } else { + result.purchasableOffers_ = purchasableOffersBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListPurchasableOffersResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListPurchasableOffersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListPurchasableOffersResponse other) { + if (other == com.google.cloud.channel.v1.ListPurchasableOffersResponse.getDefaultInstance()) + return this; + if (purchasableOffersBuilder_ == null) { + if (!other.purchasableOffers_.isEmpty()) { + if (purchasableOffers_.isEmpty()) { + purchasableOffers_ = other.purchasableOffers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePurchasableOffersIsMutable(); + purchasableOffers_.addAll(other.purchasableOffers_); + } + onChanged(); + } + } else { + if (!other.purchasableOffers_.isEmpty()) { + if (purchasableOffersBuilder_.isEmpty()) { + purchasableOffersBuilder_.dispose(); + purchasableOffersBuilder_ = null; + purchasableOffers_ = other.purchasableOffers_; + bitField0_ = (bitField0_ & ~0x00000001); + purchasableOffersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPurchasableOffersFieldBuilder() + : null; + } else { + purchasableOffersBuilder_.addAllMessages(other.purchasableOffers_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListPurchasableOffersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListPurchasableOffersResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List purchasableOffers_ = + java.util.Collections.emptyList(); + + private void ensurePurchasableOffersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + purchasableOffers_ = + new java.util.ArrayList( + purchasableOffers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PurchasableOffer, + com.google.cloud.channel.v1.PurchasableOffer.Builder, + com.google.cloud.channel.v1.PurchasableOfferOrBuilder> + purchasableOffersBuilder_; + + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public java.util.List getPurchasableOffersList() { + if (purchasableOffersBuilder_ == null) { + return java.util.Collections.unmodifiableList(purchasableOffers_); + } else { + return purchasableOffersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public int getPurchasableOffersCount() { + if (purchasableOffersBuilder_ == null) { + return purchasableOffers_.size(); + } else { + return purchasableOffersBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public com.google.cloud.channel.v1.PurchasableOffer getPurchasableOffers(int index) { + if (purchasableOffersBuilder_ == null) { + return purchasableOffers_.get(index); + } else { + return purchasableOffersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public Builder setPurchasableOffers( + int index, com.google.cloud.channel.v1.PurchasableOffer value) { + if (purchasableOffersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurchasableOffersIsMutable(); + purchasableOffers_.set(index, value); + onChanged(); + } else { + purchasableOffersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public Builder setPurchasableOffers( + int index, com.google.cloud.channel.v1.PurchasableOffer.Builder builderForValue) { + if (purchasableOffersBuilder_ == null) { + ensurePurchasableOffersIsMutable(); + purchasableOffers_.set(index, builderForValue.build()); + onChanged(); + } else { + purchasableOffersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public Builder addPurchasableOffers(com.google.cloud.channel.v1.PurchasableOffer value) { + if (purchasableOffersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurchasableOffersIsMutable(); + purchasableOffers_.add(value); + onChanged(); + } else { + purchasableOffersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public Builder addPurchasableOffers( + int index, com.google.cloud.channel.v1.PurchasableOffer value) { + if (purchasableOffersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurchasableOffersIsMutable(); + purchasableOffers_.add(index, value); + onChanged(); + } else { + purchasableOffersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public Builder addPurchasableOffers( + com.google.cloud.channel.v1.PurchasableOffer.Builder builderForValue) { + if (purchasableOffersBuilder_ == null) { + ensurePurchasableOffersIsMutable(); + purchasableOffers_.add(builderForValue.build()); + onChanged(); + } else { + purchasableOffersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public Builder addPurchasableOffers( + int index, com.google.cloud.channel.v1.PurchasableOffer.Builder builderForValue) { + if (purchasableOffersBuilder_ == null) { + ensurePurchasableOffersIsMutable(); + purchasableOffers_.add(index, builderForValue.build()); + onChanged(); + } else { + purchasableOffersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public Builder addAllPurchasableOffers( + java.lang.Iterable values) { + if (purchasableOffersBuilder_ == null) { + ensurePurchasableOffersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, purchasableOffers_); + onChanged(); + } else { + purchasableOffersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public Builder clearPurchasableOffers() { + if (purchasableOffersBuilder_ == null) { + purchasableOffers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + purchasableOffersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public Builder removePurchasableOffers(int index) { + if (purchasableOffersBuilder_ == null) { + ensurePurchasableOffersIsMutable(); + purchasableOffers_.remove(index); + onChanged(); + } else { + purchasableOffersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public com.google.cloud.channel.v1.PurchasableOffer.Builder getPurchasableOffersBuilder( + int index) { + return getPurchasableOffersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public com.google.cloud.channel.v1.PurchasableOfferOrBuilder getPurchasableOffersOrBuilder( + int index) { + if (purchasableOffersBuilder_ == null) { + return purchasableOffers_.get(index); + } else { + return purchasableOffersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public java.util.List + getPurchasableOffersOrBuilderList() { + if (purchasableOffersBuilder_ != null) { + return purchasableOffersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(purchasableOffers_); + } + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public com.google.cloud.channel.v1.PurchasableOffer.Builder addPurchasableOffersBuilder() { + return getPurchasableOffersFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.PurchasableOffer.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public com.google.cloud.channel.v1.PurchasableOffer.Builder addPurchasableOffersBuilder( + int index) { + return getPurchasableOffersFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.PurchasableOffer.getDefaultInstance()); + } + /** + * + * + *
+     * The list of Offers requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + public java.util.List + getPurchasableOffersBuilderList() { + return getPurchasableOffersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PurchasableOffer, + com.google.cloud.channel.v1.PurchasableOffer.Builder, + com.google.cloud.channel.v1.PurchasableOfferOrBuilder> + getPurchasableOffersFieldBuilder() { + if (purchasableOffersBuilder_ == null) { + purchasableOffersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PurchasableOffer, + com.google.cloud.channel.v1.PurchasableOffer.Builder, + com.google.cloud.channel.v1.PurchasableOfferOrBuilder>( + purchasableOffers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + purchasableOffers_ = null; + } + return purchasableOffersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve 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; + } + } + /** + * + * + *
+     * A token to retrieve 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; + } + } + /** + * + * + *
+     * A token to retrieve 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; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve 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.cloud.channel.v1.ListPurchasableOffersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListPurchasableOffersResponse) + private static final com.google.cloud.channel.v1.ListPurchasableOffersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListPurchasableOffersResponse(); + } + + public static com.google.cloud.channel.v1.ListPurchasableOffersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPurchasableOffersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPurchasableOffersResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableOffersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersResponseOrBuilder.java new file mode 100644 index 00000000..485e62df --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableOffersResponseOrBuilder.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/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListPurchasableOffersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListPurchasableOffersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + java.util.List getPurchasableOffersList(); + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + com.google.cloud.channel.v1.PurchasableOffer getPurchasableOffers(int index); + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + int getPurchasableOffersCount(); + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + java.util.List + getPurchasableOffersOrBuilderList(); + /** + * + * + *
+   * The list of Offers requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableOffer purchasable_offers = 1; + */ + com.google.cloud.channel.v1.PurchasableOfferOrBuilder getPurchasableOffersOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve 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-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusRequest.java new file mode 100644 index 00000000..8e04f755 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusRequest.java @@ -0,0 +1,3725 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for ListPurchasableSkus.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListPurchasableSkusRequest} + */ +public final class ListPurchasableSkusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListPurchasableSkusRequest) + ListPurchasableSkusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPurchasableSkusRequest.newBuilder() to construct. + private ListPurchasableSkusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPurchasableSkusRequest() { + customer_ = ""; + pageToken_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPurchasableSkusRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPurchasableSkusRequest( + 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(); + + customer_ = s; + break; + } + case 18: + { + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .Builder + subBuilder = null; + if (purchaseOptionCase_ == 2) { + subBuilder = + ((com.google.cloud.channel.v1.ListPurchasableSkusRequest + .CreateEntitlementPurchase) + purchaseOption_) + .toBuilder(); + } + purchaseOption_ = + input.readMessage( + com.google.cloud.channel.v1.ListPurchasableSkusRequest + .CreateEntitlementPurchase.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.channel.v1.ListPurchasableSkusRequest + .CreateEntitlementPurchase) + purchaseOption_); + purchaseOption_ = subBuilder.buildPartial(); + } + purchaseOptionCase_ = 2; + break; + } + case 26: + { + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.Builder + subBuilder = null; + if (purchaseOptionCase_ == 3) { + subBuilder = + ((com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + purchaseOption_) + .toBuilder(); + } + purchaseOption_ = + input.readMessage( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom( + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + purchaseOption_); + purchaseOption_ = subBuilder.buildPartial(); + } + purchaseOptionCase_ = 3; + break; + } + case 32: + { + pageSize_ = input.readInt32(); + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.class, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.Builder.class); + } + + public interface CreateEntitlementPurchaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. List SKUs belonging to this Product.
+     * Format: products/{product_id}.
+     * Supports products/- to retrieve SKUs for all products.
+     * 
+ * + * string product = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The product. + */ + java.lang.String getProduct(); + /** + * + * + *
+     * Required. List SKUs belonging to this Product.
+     * Format: products/{product_id}.
+     * Supports products/- to retrieve SKUs for all products.
+     * 
+ * + * string product = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for product. + */ + com.google.protobuf.ByteString getProductBytes(); + } + /** + * + * + *
+   * List SKUs for a new entitlement. Make the purchase using
+   * [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement].
+   * 
+ * + * Protobuf type {@code + * google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase} + */ + public static final class CreateEntitlementPurchase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + CreateEntitlementPurchaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use CreateEntitlementPurchase.newBuilder() to construct. + private CreateEntitlementPurchase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private CreateEntitlementPurchase() { + product_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new CreateEntitlementPurchase(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private CreateEntitlementPurchase( + 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(); + + product_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_CreateEntitlementPurchase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_CreateEntitlementPurchase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .class, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .Builder.class); + } + + public static final int PRODUCT_FIELD_NUMBER = 1; + private volatile java.lang.Object product_; + /** + * + * + *
+     * Required. List SKUs belonging to this Product.
+     * Format: products/{product_id}.
+     * Supports products/- to retrieve SKUs for all products.
+     * 
+ * + * string product = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The product. + */ + @java.lang.Override + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } + } + /** + * + * + *
+     * Required. List SKUs belonging to this Product.
+     * Format: products/{product_id}.
+     * Supports products/- to retrieve SKUs for all products.
+     * 
+ * + * string product = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for product. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + product_ = 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 (!getProductBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, product_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getProductBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, product_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase other = + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) obj; + + if (!getProduct().equals(other.getProduct())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * List SKUs for a new entitlement. Make the purchase using
+     * [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement].
+     * 
+ * + * Protobuf type {@code + * google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_CreateEntitlementPurchase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_CreateEntitlementPurchase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .class, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .Builder.class); + } + + // Construct using + // com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + product_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_CreateEntitlementPurchase_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + build() { + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + buildPartial() { + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase result = + new com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase( + this); + result.product_ = product_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) { + return mergeFrom( + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase other) { + if (other + == com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .getDefaultInstance()) return this; + if (!other.getProduct().isEmpty()) { + product_ = other.product_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object product_ = ""; + /** + * + * + *
+       * Required. List SKUs belonging to this Product.
+       * Format: products/{product_id}.
+       * Supports products/- to retrieve SKUs for all products.
+       * 
+ * + * string product = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The product. + */ + public java.lang.String getProduct() { + java.lang.Object ref = product_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + product_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. List SKUs belonging to this Product.
+       * Format: products/{product_id}.
+       * Supports products/- to retrieve SKUs for all products.
+       * 
+ * + * string product = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for product. + */ + public com.google.protobuf.ByteString getProductBytes() { + java.lang.Object ref = product_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + product_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. List SKUs belonging to this Product.
+       * Format: products/{product_id}.
+       * Supports products/- to retrieve SKUs for all products.
+       * 
+ * + * string product = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The product to set. + * @return This builder for chaining. + */ + public Builder setProduct(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + product_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. List SKUs belonging to this Product.
+       * Format: products/{product_id}.
+       * Supports products/- to retrieve SKUs for all products.
+       * 
+ * + * string product = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearProduct() { + + product_ = getDefaultInstance().getProduct(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. List SKUs belonging to this Product.
+       * Format: products/{product_id}.
+       * Supports products/- to retrieve SKUs for all products.
+       * 
+ * + * string product = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for product to set. + * @return This builder for chaining. + */ + public Builder setProductBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + product_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + private static final com.google.cloud.channel.v1.ListPurchasableSkusRequest + .CreateEntitlementPurchase + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase(); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public CreateEntitlementPurchase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new CreateEntitlementPurchase(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ChangeOfferPurchaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Required. Resource name of the entitlement.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entitlement. + */ + java.lang.String getEntitlement(); + /** + * + * + *
+     * Required. Resource name of the entitlement.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entitlement. + */ + com.google.protobuf.ByteString getEntitlementBytes(); + + /** + * + * + *
+     * Required. Change Type for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType change_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for changeType. + */ + int getChangeTypeValue(); + /** + * + * + *
+     * Required. Change Type for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType change_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The changeType. + */ + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType + getChangeType(); + } + /** + * + * + *
+   * List SKUs for upgrading or downgrading an entitlement. Make the purchase
+   * using [CloudChannelService.ChangeOffer][google.cloud.channel.v1.CloudChannelService.ChangeOffer].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase} + */ + public static final class ChangeOfferPurchase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + ChangeOfferPurchaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ChangeOfferPurchase.newBuilder() to construct. + private ChangeOfferPurchase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ChangeOfferPurchase() { + entitlement_ = ""; + changeType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeOfferPurchase(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ChangeOfferPurchase( + 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(); + + entitlement_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + changeType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_ChangeOfferPurchase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_ChangeOfferPurchase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.class, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.Builder + .class); + } + + /** + * + * + *
+     * Change Type enum.
+     * 
+ * + * Protobuf enum {@code + * google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType} + */ + public enum ChangeType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+       * Not used.
+       * 
+ * + * CHANGE_TYPE_UNSPECIFIED = 0; + */ + CHANGE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+       * SKU is an upgrade on the current entitlement.
+       * 
+ * + * UPGRADE = 1; + */ + UPGRADE(1), + /** + * + * + *
+       * SKU is a downgrade on the current entitlement.
+       * 
+ * + * DOWNGRADE = 2; + */ + DOWNGRADE(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+       * Not used.
+       * 
+ * + * CHANGE_TYPE_UNSPECIFIED = 0; + */ + public static final int CHANGE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+       * SKU is an upgrade on the current entitlement.
+       * 
+ * + * UPGRADE = 1; + */ + public static final int UPGRADE_VALUE = 1; + /** + * + * + *
+       * SKU is a downgrade on the current entitlement.
+       * 
+ * + * DOWNGRADE = 2; + */ + public static final int DOWNGRADE_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ChangeType 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 ChangeType forNumber(int value) { + switch (value) { + case 0: + return CHANGE_TYPE_UNSPECIFIED; + case 1: + return UPGRADE; + case 2: + return DOWNGRADE; + 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 ChangeType findValueByNumber(int number) { + return ChangeType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .getDescriptor() + .getEnumTypes() + .get(0); + } + + private static final ChangeType[] VALUES = values(); + + public static ChangeType 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 ChangeType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType) + } + + public static final int ENTITLEMENT_FIELD_NUMBER = 1; + private volatile java.lang.Object entitlement_; + /** + * + * + *
+     * Required. Resource name of the entitlement.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entitlement. + */ + @java.lang.Override + public java.lang.String getEntitlement() { + java.lang.Object ref = entitlement_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entitlement_ = s; + return s; + } + } + /** + * + * + *
+     * Required. Resource name of the entitlement.
+     * Format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entitlement. + */ + @java.lang.Override + public com.google.protobuf.ByteString getEntitlementBytes() { + java.lang.Object ref = entitlement_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entitlement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHANGE_TYPE_FIELD_NUMBER = 2; + private int changeType_; + /** + * + * + *
+     * Required. Change Type for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType change_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for changeType. + */ + @java.lang.Override + public int getChangeTypeValue() { + return changeType_; + } + /** + * + * + *
+     * Required. Change Type for the entitlement.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType change_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The changeType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType + getChangeType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType result = + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType + .valueOf(changeType_); + return result == null + ? com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType + .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 (!getEntitlementBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, entitlement_); + } + if (changeType_ + != com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType + .CHANGE_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, changeType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getEntitlementBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, entitlement_); + } + if (changeType_ + != com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType + .CHANGE_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, changeType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj + instanceof com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase other = + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) obj; + + if (!getEntitlement().equals(other.getEntitlement())) return false; + if (changeType_ != other.changeType_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENTITLEMENT_FIELD_NUMBER; + hash = (53 * hash) + getEntitlement().hashCode(); + hash = (37 * hash) + CHANGE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + changeType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType( + com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+     * List SKUs for upgrading or downgrading an entitlement. Make the purchase
+     * using [CloudChannelService.ChangeOffer][google.cloud.channel.v1.CloudChannelService.ChangeOffer].
+     * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_ChangeOfferPurchase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_ChangeOfferPurchase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.class, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.Builder + .class); + } + + // Construct using + // com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + entitlement_ = ""; + + changeType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_ChangeOfferPurchase_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase build() { + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + buildPartial() { + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase result = + new com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase(this); + result.entitlement_ = entitlement_; + result.changeType_ = changeType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) { + return mergeFrom( + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase other) { + if (other + == com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .getDefaultInstance()) return this; + if (!other.getEntitlement().isEmpty()) { + entitlement_ = other.entitlement_; + onChanged(); + } + if (other.changeType_ != 0) { + setChangeTypeValue(other.getChangeTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object entitlement_ = ""; + /** + * + * + *
+       * Required. Resource name of the entitlement.
+       * Format:
+       * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+       * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The entitlement. + */ + public java.lang.String getEntitlement() { + java.lang.Object ref = entitlement_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + entitlement_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+       * Required. Resource name of the entitlement.
+       * Format:
+       * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+       * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for entitlement. + */ + public com.google.protobuf.ByteString getEntitlementBytes() { + java.lang.Object ref = entitlement_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + entitlement_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+       * Required. Resource name of the entitlement.
+       * Format:
+       * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+       * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The entitlement to set. + * @return This builder for chaining. + */ + public Builder setEntitlement(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + entitlement_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Resource name of the entitlement.
+       * Format:
+       * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+       * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearEntitlement() { + + entitlement_ = getDefaultInstance().getEntitlement(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Resource name of the entitlement.
+       * Format:
+       * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+       * 
+ * + * string entitlement = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for entitlement to set. + * @return This builder for chaining. + */ + public Builder setEntitlementBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + entitlement_ = value; + onChanged(); + return this; + } + + private int changeType_ = 0; + /** + * + * + *
+       * Required. Change Type for the entitlement.
+       * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType change_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The enum numeric value on the wire for changeType. + */ + @java.lang.Override + public int getChangeTypeValue() { + return changeType_; + } + /** + * + * + *
+       * Required. Change Type for the entitlement.
+       * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType change_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The enum numeric value on the wire for changeType to set. + * @return This builder for chaining. + */ + public Builder setChangeTypeValue(int value) { + + changeType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Change Type for the entitlement.
+       * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType change_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The changeType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType + getChangeType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType + result = + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .ChangeType.valueOf(changeType_); + return result == null + ? com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType + .UNRECOGNIZED + : result; + } + /** + * + * + *
+       * Required. Change Type for the entitlement.
+       * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType change_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @param value The changeType to set. + * @return This builder for chaining. + */ + public Builder setChangeType( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType + value) { + if (value == null) { + throw new NullPointerException(); + } + + changeType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+       * Required. Change Type for the entitlement.
+       * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.ChangeType change_type = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return This builder for chaining. + */ + public Builder clearChangeType() { + + changeType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + private static final com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase(); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ChangeOfferPurchase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ChangeOfferPurchase(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + private int purchaseOptionCase_ = 0; + private java.lang.Object purchaseOption_; + + public enum PurchaseOptionCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CREATE_ENTITLEMENT_PURCHASE(2), + CHANGE_OFFER_PURCHASE(3), + PURCHASEOPTION_NOT_SET(0); + private final int value; + + private PurchaseOptionCase(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 PurchaseOptionCase valueOf(int value) { + return forNumber(value); + } + + public static PurchaseOptionCase forNumber(int value) { + switch (value) { + case 2: + return CREATE_ENTITLEMENT_PURCHASE; + case 3: + return CHANGE_OFFER_PURCHASE; + case 0: + return PURCHASEOPTION_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public PurchaseOptionCase getPurchaseOptionCase() { + return PurchaseOptionCase.forNumber(purchaseOptionCase_); + } + + public static final int CREATE_ENTITLEMENT_PURCHASE_FIELD_NUMBER = 2; + /** + * + * + *
+   * List SKUs for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return Whether the createEntitlementPurchase field is set. + */ + @java.lang.Override + public boolean hasCreateEntitlementPurchase() { + return purchaseOptionCase_ == 2; + } + /** + * + * + *
+   * List SKUs for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return The createEntitlementPurchase. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + getCreateEntitlementPurchase() { + if (purchaseOptionCase_ == 2) { + return (com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + /** + * + * + *
+   * List SKUs for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchaseOrBuilder + getCreateEntitlementPurchaseOrBuilder() { + if (purchaseOptionCase_ == 2) { + return (com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + + public static final int CHANGE_OFFER_PURCHASE_FIELD_NUMBER = 3; + /** + * + * + *
+   * List SKUs for ChangeOffer purchase with a new SKU.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return Whether the changeOfferPurchase field is set. + */ + @java.lang.Override + public boolean hasChangeOfferPurchase() { + return purchaseOptionCase_ == 3; + } + /** + * + * + *
+   * List SKUs for ChangeOffer purchase with a new SKU.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return The changeOfferPurchase. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + getChangeOfferPurchase() { + if (purchaseOptionCase_ == 3) { + return (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + /** + * + * + *
+   * List SKUs for ChangeOffer purchase with a new SKU.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchaseOrBuilder + getChangeOfferPurchaseOrBuilder() { + if (purchaseOptionCase_ == 3) { + return (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + + public static final int CUSTOMER_FIELD_NUMBER = 1; + private volatile java.lang.Object customer_; + /** + * + * + *
+   * Required. The resource name of the customer for which to list SKUs.
+   * Format: accounts/{account_id}/customers/{customer_id}.
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The customer. + */ + @java.lang.Override + public java.lang.String getCustomer() { + java.lang.Object ref = customer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customer_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the customer for which to list SKUs.
+   * Format: accounts/{account_id}/customers/{customer_id}.
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomerBytes() { + java.lang.Object ref = customer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 4; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 SKUs will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 5; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = 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 (!getCustomerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, customer_); + } + if (purchaseOptionCase_ == 2) { + output.writeMessage( + 2, + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + purchaseOption_); + } + if (purchaseOptionCase_ == 3) { + output.writeMessage( + 3, + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + purchaseOption_); + } + if (pageSize_ != 0) { + output.writeInt32(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, pageToken_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCustomerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, customer_); + } + if (purchaseOptionCase_ == 2) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 2, + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + purchaseOption_); + } + if (purchaseOptionCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + purchaseOption_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(4, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, pageToken_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListPurchasableSkusRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListPurchasableSkusRequest other = + (com.google.cloud.channel.v1.ListPurchasableSkusRequest) obj; + + if (!getCustomer().equals(other.getCustomer())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getPurchaseOptionCase().equals(other.getPurchaseOptionCase())) return false; + switch (purchaseOptionCase_) { + case 2: + if (!getCreateEntitlementPurchase().equals(other.getCreateEntitlementPurchase())) + return false; + break; + case 3: + if (!getChangeOfferPurchase().equals(other.getChangeOfferPurchase())) 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) + CUSTOMER_FIELD_NUMBER; + hash = (53 * hash) + getCustomer().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) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + switch (purchaseOptionCase_) { + case 2: + hash = (37 * hash) + CREATE_ENTITLEMENT_PURCHASE_FIELD_NUMBER; + hash = (53 * hash) + getCreateEntitlementPurchase().hashCode(); + break; + case 3: + hash = (37 * hash) + CHANGE_OFFER_PURCHASE_FIELD_NUMBER; + hash = (53 * hash) + getChangeOfferPurchase().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListPurchasableSkusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ListPurchasableSkus.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListPurchasableSkusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListPurchasableSkusRequest) + com.google.cloud.channel.v1.ListPurchasableSkusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.class, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListPurchasableSkusRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + customer_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + languageCode_ = ""; + + purchaseOptionCase_ = 0; + purchaseOption_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest build() { + com.google.cloud.channel.v1.ListPurchasableSkusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest buildPartial() { + com.google.cloud.channel.v1.ListPurchasableSkusRequest result = + new com.google.cloud.channel.v1.ListPurchasableSkusRequest(this); + if (purchaseOptionCase_ == 2) { + if (createEntitlementPurchaseBuilder_ == null) { + result.purchaseOption_ = purchaseOption_; + } else { + result.purchaseOption_ = createEntitlementPurchaseBuilder_.build(); + } + } + if (purchaseOptionCase_ == 3) { + if (changeOfferPurchaseBuilder_ == null) { + result.purchaseOption_ = purchaseOption_; + } else { + result.purchaseOption_ = changeOfferPurchaseBuilder_.build(); + } + } + result.customer_ = customer_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.languageCode_ = languageCode_; + result.purchaseOptionCase_ = purchaseOptionCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListPurchasableSkusRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListPurchasableSkusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListPurchasableSkusRequest other) { + if (other == com.google.cloud.channel.v1.ListPurchasableSkusRequest.getDefaultInstance()) + return this; + if (!other.getCustomer().isEmpty()) { + customer_ = other.customer_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + switch (other.getPurchaseOptionCase()) { + case CREATE_ENTITLEMENT_PURCHASE: + { + mergeCreateEntitlementPurchase(other.getCreateEntitlementPurchase()); + break; + } + case CHANGE_OFFER_PURCHASE: + { + mergeChangeOfferPurchase(other.getChangeOfferPurchase()); + break; + } + case PURCHASEOPTION_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListPurchasableSkusRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListPurchasableSkusRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int purchaseOptionCase_ = 0; + private java.lang.Object purchaseOption_; + + public PurchaseOptionCase getPurchaseOptionCase() { + return PurchaseOptionCase.forNumber(purchaseOptionCase_); + } + + public Builder clearPurchaseOption() { + purchaseOptionCase_ = 0; + purchaseOption_ = null; + onChanged(); + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .Builder, + com.google.cloud.channel.v1.ListPurchasableSkusRequest + .CreateEntitlementPurchaseOrBuilder> + createEntitlementPurchaseBuilder_; + /** + * + * + *
+     * List SKUs for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return Whether the createEntitlementPurchase field is set. + */ + @java.lang.Override + public boolean hasCreateEntitlementPurchase() { + return purchaseOptionCase_ == 2; + } + /** + * + * + *
+     * List SKUs for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return The createEntitlementPurchase. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + getCreateEntitlementPurchase() { + if (createEntitlementPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 2) { + return (com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } else { + if (purchaseOptionCase_ == 2) { + return createEntitlementPurchaseBuilder_.getMessage(); + } + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + } + /** + * + * + *
+     * List SKUs for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + public Builder setCreateEntitlementPurchase( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase value) { + if (createEntitlementPurchaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + purchaseOption_ = value; + onChanged(); + } else { + createEntitlementPurchaseBuilder_.setMessage(value); + } + purchaseOptionCase_ = 2; + return this; + } + /** + * + * + *
+     * List SKUs for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + public Builder setCreateEntitlementPurchase( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase.Builder + builderForValue) { + if (createEntitlementPurchaseBuilder_ == null) { + purchaseOption_ = builderForValue.build(); + onChanged(); + } else { + createEntitlementPurchaseBuilder_.setMessage(builderForValue.build()); + } + purchaseOptionCase_ = 2; + return this; + } + /** + * + * + *
+     * List SKUs for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + public Builder mergeCreateEntitlementPurchase( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase value) { + if (createEntitlementPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 2 + && purchaseOption_ + != com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .getDefaultInstance()) { + purchaseOption_ = + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .newBuilder( + (com.google.cloud.channel.v1.ListPurchasableSkusRequest + .CreateEntitlementPurchase) + purchaseOption_) + .mergeFrom(value) + .buildPartial(); + } else { + purchaseOption_ = value; + } + onChanged(); + } else { + if (purchaseOptionCase_ == 2) { + createEntitlementPurchaseBuilder_.mergeFrom(value); + } + createEntitlementPurchaseBuilder_.setMessage(value); + } + purchaseOptionCase_ = 2; + return this; + } + /** + * + * + *
+     * List SKUs for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + public Builder clearCreateEntitlementPurchase() { + if (createEntitlementPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 2) { + purchaseOptionCase_ = 0; + purchaseOption_ = null; + onChanged(); + } + } else { + if (purchaseOptionCase_ == 2) { + purchaseOptionCase_ = 0; + purchaseOption_ = null; + } + createEntitlementPurchaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List SKUs for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase.Builder + getCreateEntitlementPurchaseBuilder() { + return getCreateEntitlementPurchaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * List SKUs for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchaseOrBuilder + getCreateEntitlementPurchaseOrBuilder() { + if ((purchaseOptionCase_ == 2) && (createEntitlementPurchaseBuilder_ != null)) { + return createEntitlementPurchaseBuilder_.getMessageOrBuilder(); + } else { + if (purchaseOptionCase_ == 2) { + return (com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + } + /** + * + * + *
+     * List SKUs for CreateEntitlement purchase.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .Builder, + com.google.cloud.channel.v1.ListPurchasableSkusRequest + .CreateEntitlementPurchaseOrBuilder> + getCreateEntitlementPurchaseFieldBuilder() { + if (createEntitlementPurchaseBuilder_ == null) { + if (!(purchaseOptionCase_ == 2)) { + purchaseOption_ = + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .getDefaultInstance(); + } + createEntitlementPurchaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + .Builder, + com.google.cloud.channel.v1.ListPurchasableSkusRequest + .CreateEntitlementPurchaseOrBuilder>( + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase) + purchaseOption_, + getParentForChildren(), + isClean()); + purchaseOption_ = null; + } + purchaseOptionCase_ = 2; + onChanged(); + ; + return createEntitlementPurchaseBuilder_; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.Builder, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchaseOrBuilder> + changeOfferPurchaseBuilder_; + /** + * + * + *
+     * List SKUs for ChangeOffer purchase with a new SKU.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return Whether the changeOfferPurchase field is set. + */ + @java.lang.Override + public boolean hasChangeOfferPurchase() { + return purchaseOptionCase_ == 3; + } + /** + * + * + *
+     * List SKUs for ChangeOffer purchase with a new SKU.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return The changeOfferPurchase. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + getChangeOfferPurchase() { + if (changeOfferPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 3) { + return (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .getDefaultInstance(); + } else { + if (purchaseOptionCase_ == 3) { + return changeOfferPurchaseBuilder_.getMessage(); + } + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + } + /** + * + * + *
+     * List SKUs for ChangeOffer purchase with a new SKU.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + public Builder setChangeOfferPurchase( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase value) { + if (changeOfferPurchaseBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + purchaseOption_ = value; + onChanged(); + } else { + changeOfferPurchaseBuilder_.setMessage(value); + } + purchaseOptionCase_ = 3; + return this; + } + /** + * + * + *
+     * List SKUs for ChangeOffer purchase with a new SKU.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + public Builder setChangeOfferPurchase( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.Builder + builderForValue) { + if (changeOfferPurchaseBuilder_ == null) { + purchaseOption_ = builderForValue.build(); + onChanged(); + } else { + changeOfferPurchaseBuilder_.setMessage(builderForValue.build()); + } + purchaseOptionCase_ = 3; + return this; + } + /** + * + * + *
+     * List SKUs for ChangeOffer purchase with a new SKU.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + public Builder mergeChangeOfferPurchase( + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase value) { + if (changeOfferPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 3 + && purchaseOption_ + != com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .getDefaultInstance()) { + purchaseOption_ = + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.newBuilder( + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + purchaseOption_) + .mergeFrom(value) + .buildPartial(); + } else { + purchaseOption_ = value; + } + onChanged(); + } else { + if (purchaseOptionCase_ == 3) { + changeOfferPurchaseBuilder_.mergeFrom(value); + } + changeOfferPurchaseBuilder_.setMessage(value); + } + purchaseOptionCase_ = 3; + return this; + } + /** + * + * + *
+     * List SKUs for ChangeOffer purchase with a new SKU.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + public Builder clearChangeOfferPurchase() { + if (changeOfferPurchaseBuilder_ == null) { + if (purchaseOptionCase_ == 3) { + purchaseOptionCase_ = 0; + purchaseOption_ = null; + onChanged(); + } + } else { + if (purchaseOptionCase_ == 3) { + purchaseOptionCase_ = 0; + purchaseOption_ = null; + } + changeOfferPurchaseBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * List SKUs for ChangeOffer purchase with a new SKU.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.Builder + getChangeOfferPurchaseBuilder() { + return getChangeOfferPurchaseFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * List SKUs for ChangeOffer purchase with a new SKU.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchaseOrBuilder + getChangeOfferPurchaseOrBuilder() { + if ((purchaseOptionCase_ == 3) && (changeOfferPurchaseBuilder_ != null)) { + return changeOfferPurchaseBuilder_.getMessageOrBuilder(); + } else { + if (purchaseOptionCase_ == 3) { + return (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + purchaseOption_; + } + return com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + } + /** + * + * + *
+     * List SKUs for ChangeOffer purchase with a new SKU.
+     * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.Builder, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchaseOrBuilder> + getChangeOfferPurchaseFieldBuilder() { + if (changeOfferPurchaseBuilder_ == null) { + if (!(purchaseOptionCase_ == 3)) { + purchaseOption_ = + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + .getDefaultInstance(); + } + changeOfferPurchaseBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase, + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase.Builder, + com.google.cloud.channel.v1.ListPurchasableSkusRequest + .ChangeOfferPurchaseOrBuilder>( + (com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase) + purchaseOption_, + getParentForChildren(), + isClean()); + purchaseOption_ = null; + } + purchaseOptionCase_ = 3; + onChanged(); + ; + return changeOfferPurchaseBuilder_; + } + + private java.lang.Object customer_ = ""; + /** + * + * + *
+     * Required. The resource name of the customer for which to list SKUs.
+     * Format: accounts/{account_id}/customers/{customer_id}.
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The customer. + */ + public java.lang.String getCustomer() { + java.lang.Object ref = customer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the customer for which to list SKUs.
+     * Format: accounts/{account_id}/customers/{customer_id}.
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customer. + */ + public com.google.protobuf.ByteString getCustomerBytes() { + java.lang.Object ref = customer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the customer for which to list SKUs.
+     * Format: accounts/{account_id}/customers/{customer_id}.
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The customer to set. + * @return This builder for chaining. + */ + public Builder setCustomer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customer_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the customer for which to list SKUs.
+     * Format: accounts/{account_id}/customers/{customer_id}.
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearCustomer() { + + customer_ = getDefaultInstance().getCustomer(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the customer for which to list SKUs.
+     * Format: accounts/{account_id}/customers/{customer_id}.
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for customer to set. + * @return This builder for chaining. + */ + public Builder setCustomerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customer_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 SKUs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 SKUs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 SKUs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListPurchasableSkusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListPurchasableSkusRequest) + private static final com.google.cloud.channel.v1.ListPurchasableSkusRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListPurchasableSkusRequest(); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPurchasableSkusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPurchasableSkusRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusRequestOrBuilder.java new file mode 100644 index 00000000..d6d96762 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusRequestOrBuilder.java @@ -0,0 +1,214 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListPurchasableSkusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListPurchasableSkusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * List SKUs for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return Whether the createEntitlementPurchase field is set. + */ + boolean hasCreateEntitlementPurchase(); + /** + * + * + *
+   * List SKUs for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + * + * @return The createEntitlementPurchase. + */ + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase + getCreateEntitlementPurchase(); + /** + * + * + *
+   * List SKUs for CreateEntitlement purchase.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchase create_entitlement_purchase = 2; + * + */ + com.google.cloud.channel.v1.ListPurchasableSkusRequest.CreateEntitlementPurchaseOrBuilder + getCreateEntitlementPurchaseOrBuilder(); + + /** + * + * + *
+   * List SKUs for ChangeOffer purchase with a new SKU.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return Whether the changeOfferPurchase field is set. + */ + boolean hasChangeOfferPurchase(); + /** + * + * + *
+   * List SKUs for ChangeOffer purchase with a new SKU.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + * + * @return The changeOfferPurchase. + */ + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase + getChangeOfferPurchase(); + /** + * + * + *
+   * List SKUs for ChangeOffer purchase with a new SKU.
+   * 
+ * + * + * .google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchase change_offer_purchase = 3; + * + */ + com.google.cloud.channel.v1.ListPurchasableSkusRequest.ChangeOfferPurchaseOrBuilder + getChangeOfferPurchaseOrBuilder(); + + /** + * + * + *
+   * Required. The resource name of the customer for which to list SKUs.
+   * Format: accounts/{account_id}/customers/{customer_id}.
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The customer. + */ + java.lang.String getCustomer(); + /** + * + * + *
+   * Required. The resource name of the customer for which to list SKUs.
+   * Format: accounts/{account_id}/customers/{customer_id}.
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customer. + */ + com.google.protobuf.ByteString getCustomerBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 SKUs will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * 
+ * + * string page_token = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + public com.google.cloud.channel.v1.ListPurchasableSkusRequest.PurchaseOptionCase + getPurchaseOptionCase(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusResponse.java new file mode 100644 index 00000000..3d9661af --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusResponse.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/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for ListPurchasableSkus.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListPurchasableSkusResponse} + */ +public final class ListPurchasableSkusResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListPurchasableSkusResponse) + ListPurchasableSkusResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListPurchasableSkusResponse.newBuilder() to construct. + private ListPurchasableSkusResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListPurchasableSkusResponse() { + purchasableSkus_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListPurchasableSkusResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListPurchasableSkusResponse( + 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)) { + purchasableSkus_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + purchasableSkus_.add( + input.readMessage( + com.google.cloud.channel.v1.PurchasableSku.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)) { + purchasableSkus_ = java.util.Collections.unmodifiableList(purchasableSkus_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableSkusResponse.class, + com.google.cloud.channel.v1.ListPurchasableSkusResponse.Builder.class); + } + + public static final int PURCHASABLE_SKUS_FIELD_NUMBER = 1; + private java.util.List purchasableSkus_; + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + @java.lang.Override + public java.util.List getPurchasableSkusList() { + return purchasableSkus_; + } + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + @java.lang.Override + public java.util.List + getPurchasableSkusOrBuilderList() { + return purchasableSkus_; + } + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + @java.lang.Override + public int getPurchasableSkusCount() { + return purchasableSkus_.size(); + } + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableSku getPurchasableSkus(int index) { + return purchasableSkus_.get(index); + } + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableSkuOrBuilder getPurchasableSkusOrBuilder( + int index) { + return purchasableSkus_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve 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; + } + } + /** + * + * + *
+   * A token to retrieve 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 < purchasableSkus_.size(); i++) { + output.writeMessage(1, purchasableSkus_.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 < purchasableSkus_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, purchasableSkus_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListPurchasableSkusResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListPurchasableSkusResponse other = + (com.google.cloud.channel.v1.ListPurchasableSkusResponse) obj; + + if (!getPurchasableSkusList().equals(other.getPurchasableSkusList())) 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 (getPurchasableSkusCount() > 0) { + hash = (37 * hash) + PURCHASABLE_SKUS_FIELD_NUMBER; + hash = (53 * hash) + getPurchasableSkusList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListPurchasableSkusResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ListPurchasableSkus.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListPurchasableSkusResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListPurchasableSkusResponse) + com.google.cloud.channel.v1.ListPurchasableSkusResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListPurchasableSkusResponse.class, + com.google.cloud.channel.v1.ListPurchasableSkusResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListPurchasableSkusResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPurchasableSkusFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (purchasableSkusBuilder_ == null) { + purchasableSkus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + purchasableSkusBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListPurchasableSkusResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListPurchasableSkusResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusResponse build() { + com.google.cloud.channel.v1.ListPurchasableSkusResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusResponse buildPartial() { + com.google.cloud.channel.v1.ListPurchasableSkusResponse result = + new com.google.cloud.channel.v1.ListPurchasableSkusResponse(this); + int from_bitField0_ = bitField0_; + if (purchasableSkusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + purchasableSkus_ = java.util.Collections.unmodifiableList(purchasableSkus_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.purchasableSkus_ = purchasableSkus_; + } else { + result.purchasableSkus_ = purchasableSkusBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListPurchasableSkusResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListPurchasableSkusResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListPurchasableSkusResponse other) { + if (other == com.google.cloud.channel.v1.ListPurchasableSkusResponse.getDefaultInstance()) + return this; + if (purchasableSkusBuilder_ == null) { + if (!other.purchasableSkus_.isEmpty()) { + if (purchasableSkus_.isEmpty()) { + purchasableSkus_ = other.purchasableSkus_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePurchasableSkusIsMutable(); + purchasableSkus_.addAll(other.purchasableSkus_); + } + onChanged(); + } + } else { + if (!other.purchasableSkus_.isEmpty()) { + if (purchasableSkusBuilder_.isEmpty()) { + purchasableSkusBuilder_.dispose(); + purchasableSkusBuilder_ = null; + purchasableSkus_ = other.purchasableSkus_; + bitField0_ = (bitField0_ & ~0x00000001); + purchasableSkusBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPurchasableSkusFieldBuilder() + : null; + } else { + purchasableSkusBuilder_.addAllMessages(other.purchasableSkus_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListPurchasableSkusResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListPurchasableSkusResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List purchasableSkus_ = + java.util.Collections.emptyList(); + + private void ensurePurchasableSkusIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + purchasableSkus_ = + new java.util.ArrayList(purchasableSkus_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PurchasableSku, + com.google.cloud.channel.v1.PurchasableSku.Builder, + com.google.cloud.channel.v1.PurchasableSkuOrBuilder> + purchasableSkusBuilder_; + + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public java.util.List getPurchasableSkusList() { + if (purchasableSkusBuilder_ == null) { + return java.util.Collections.unmodifiableList(purchasableSkus_); + } else { + return purchasableSkusBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public int getPurchasableSkusCount() { + if (purchasableSkusBuilder_ == null) { + return purchasableSkus_.size(); + } else { + return purchasableSkusBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public com.google.cloud.channel.v1.PurchasableSku getPurchasableSkus(int index) { + if (purchasableSkusBuilder_ == null) { + return purchasableSkus_.get(index); + } else { + return purchasableSkusBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public Builder setPurchasableSkus(int index, com.google.cloud.channel.v1.PurchasableSku value) { + if (purchasableSkusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurchasableSkusIsMutable(); + purchasableSkus_.set(index, value); + onChanged(); + } else { + purchasableSkusBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public Builder setPurchasableSkus( + int index, com.google.cloud.channel.v1.PurchasableSku.Builder builderForValue) { + if (purchasableSkusBuilder_ == null) { + ensurePurchasableSkusIsMutable(); + purchasableSkus_.set(index, builderForValue.build()); + onChanged(); + } else { + purchasableSkusBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public Builder addPurchasableSkus(com.google.cloud.channel.v1.PurchasableSku value) { + if (purchasableSkusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurchasableSkusIsMutable(); + purchasableSkus_.add(value); + onChanged(); + } else { + purchasableSkusBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public Builder addPurchasableSkus(int index, com.google.cloud.channel.v1.PurchasableSku value) { + if (purchasableSkusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePurchasableSkusIsMutable(); + purchasableSkus_.add(index, value); + onChanged(); + } else { + purchasableSkusBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public Builder addPurchasableSkus( + com.google.cloud.channel.v1.PurchasableSku.Builder builderForValue) { + if (purchasableSkusBuilder_ == null) { + ensurePurchasableSkusIsMutable(); + purchasableSkus_.add(builderForValue.build()); + onChanged(); + } else { + purchasableSkusBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public Builder addPurchasableSkus( + int index, com.google.cloud.channel.v1.PurchasableSku.Builder builderForValue) { + if (purchasableSkusBuilder_ == null) { + ensurePurchasableSkusIsMutable(); + purchasableSkus_.add(index, builderForValue.build()); + onChanged(); + } else { + purchasableSkusBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public Builder addAllPurchasableSkus( + java.lang.Iterable values) { + if (purchasableSkusBuilder_ == null) { + ensurePurchasableSkusIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, purchasableSkus_); + onChanged(); + } else { + purchasableSkusBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public Builder clearPurchasableSkus() { + if (purchasableSkusBuilder_ == null) { + purchasableSkus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + purchasableSkusBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public Builder removePurchasableSkus(int index) { + if (purchasableSkusBuilder_ == null) { + ensurePurchasableSkusIsMutable(); + purchasableSkus_.remove(index); + onChanged(); + } else { + purchasableSkusBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public com.google.cloud.channel.v1.PurchasableSku.Builder getPurchasableSkusBuilder(int index) { + return getPurchasableSkusFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public com.google.cloud.channel.v1.PurchasableSkuOrBuilder getPurchasableSkusOrBuilder( + int index) { + if (purchasableSkusBuilder_ == null) { + return purchasableSkus_.get(index); + } else { + return purchasableSkusBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public java.util.List + getPurchasableSkusOrBuilderList() { + if (purchasableSkusBuilder_ != null) { + return purchasableSkusBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(purchasableSkus_); + } + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public com.google.cloud.channel.v1.PurchasableSku.Builder addPurchasableSkusBuilder() { + return getPurchasableSkusFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.PurchasableSku.getDefaultInstance()); + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public com.google.cloud.channel.v1.PurchasableSku.Builder addPurchasableSkusBuilder(int index) { + return getPurchasableSkusFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.PurchasableSku.getDefaultInstance()); + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + public java.util.List + getPurchasableSkusBuilderList() { + return getPurchasableSkusFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PurchasableSku, + com.google.cloud.channel.v1.PurchasableSku.Builder, + com.google.cloud.channel.v1.PurchasableSkuOrBuilder> + getPurchasableSkusFieldBuilder() { + if (purchasableSkusBuilder_ == null) { + purchasableSkusBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PurchasableSku, + com.google.cloud.channel.v1.PurchasableSku.Builder, + com.google.cloud.channel.v1.PurchasableSkuOrBuilder>( + purchasableSkus_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + purchasableSkus_ = null; + } + return purchasableSkusBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve 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; + } + } + /** + * + * + *
+     * A token to retrieve 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; + } + } + /** + * + * + *
+     * A token to retrieve 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; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve 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.cloud.channel.v1.ListPurchasableSkusResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListPurchasableSkusResponse) + private static final com.google.cloud.channel.v1.ListPurchasableSkusResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListPurchasableSkusResponse(); + } + + public static com.google.cloud.channel.v1.ListPurchasableSkusResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListPurchasableSkusResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListPurchasableSkusResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListPurchasableSkusResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusResponseOrBuilder.java new file mode 100644 index 00000000..be43459a --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListPurchasableSkusResponseOrBuilder.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/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListPurchasableSkusResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListPurchasableSkusResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + java.util.List getPurchasableSkusList(); + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + com.google.cloud.channel.v1.PurchasableSku getPurchasableSkus(int index); + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + int getPurchasableSkusCount(); + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + java.util.List + getPurchasableSkusOrBuilderList(); + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.PurchasableSku purchasable_skus = 1; + */ + com.google.cloud.channel.v1.PurchasableSkuOrBuilder getPurchasableSkusOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve 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-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusRequest.java new file mode 100644 index 00000000..dace2af7 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusRequest.java @@ -0,0 +1,1325 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for ListSkus.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkusRequest} + */ +public final class ListSkusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListSkusRequest) + ListSkusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSkusRequest.newBuilder() to construct. + private ListSkusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSkusRequest() { + parent_ = ""; + account_ = ""; + pageToken_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSkusRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListSkusRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + account_ = s; + break; + } + case 24: + { + pageSize_ = input.readInt32(); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkusRequest.class, + com.google.cloud.channel.v1.ListSkusRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the Product for which to list SKUs.
+   * The parent takes the format: products/{product_id}.
+   * Supports products/- to retrieve SKUs for all products.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the Product for which to list SKUs.
+   * The parent takes the format: products/{product_id}.
+   * Supports products/- to retrieve SKUs for all products.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ACCOUNT_FIELD_NUMBER = 2; + private volatile java.lang.Object account_; + /** + * + * + *
+   * Required. Resource name of the reseller.
+   * Format: accounts/{account_id}.
+   * 
+ * + * string account = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The account. + */ + @java.lang.Override + public java.lang.String getAccount() { + java.lang.Object ref = account_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + account_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the reseller.
+   * Format: accounts/{account_id}.
+   * 
+ * + * string account = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for account. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 3; + private int pageSize_; + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 SKUs will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Optional.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Optional.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 5; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (!getAccountBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, account_); + } + if (pageSize_ != 0) { + output.writeInt32(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, pageToken_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (!getAccountBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, account_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, pageToken_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListSkusRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListSkusRequest other = + (com.google.cloud.channel.v1.ListSkusRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getAccount().equals(other.getAccount())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + ACCOUNT_FIELD_NUMBER; + hash = (53 * hash) + getAccount().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) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkusRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListSkusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ListSkus.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListSkusRequest) + com.google.cloud.channel.v1.ListSkusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkusRequest.class, + com.google.cloud.channel.v1.ListSkusRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListSkusRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + account_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + languageCode_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkusRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListSkusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkusRequest build() { + com.google.cloud.channel.v1.ListSkusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkusRequest buildPartial() { + com.google.cloud.channel.v1.ListSkusRequest result = + new com.google.cloud.channel.v1.ListSkusRequest(this); + result.parent_ = parent_; + result.account_ = account_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.languageCode_ = languageCode_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListSkusRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListSkusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListSkusRequest other) { + if (other == com.google.cloud.channel.v1.ListSkusRequest.getDefaultInstance()) return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (!other.getAccount().isEmpty()) { + account_ = other.account_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListSkusRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ListSkusRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the Product for which to list SKUs.
+     * The parent takes the format: products/{product_id}.
+     * Supports products/- to retrieve SKUs for all products.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Product for which to list SKUs.
+     * The parent takes the format: products/{product_id}.
+     * Supports products/- to retrieve SKUs for all products.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the Product for which to list SKUs.
+     * The parent takes the format: products/{product_id}.
+     * Supports products/- to retrieve SKUs for all products.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Product for which to list SKUs.
+     * The parent takes the format: products/{product_id}.
+     * Supports products/- to retrieve SKUs for all products.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the Product for which to list SKUs.
+     * The parent takes the format: products/{product_id}.
+     * Supports products/- to retrieve SKUs for all products.
+     * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.lang.Object account_ = ""; + /** + * + * + *
+     * Required. Resource name of the reseller.
+     * Format: accounts/{account_id}.
+     * 
+ * + * string account = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The account. + */ + public java.lang.String getAccount() { + java.lang.Object ref = account_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + account_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the reseller.
+     * Format: accounts/{account_id}.
+     * 
+ * + * string account = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for account. + */ + public com.google.protobuf.ByteString getAccountBytes() { + java.lang.Object ref = account_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + account_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the reseller.
+     * Format: accounts/{account_id}.
+     * 
+ * + * string account = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The account to set. + * @return This builder for chaining. + */ + public Builder setAccount(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + account_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the reseller.
+     * Format: accounts/{account_id}.
+     * 
+ * + * string account = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearAccount() { + + account_ = getDefaultInstance().getAccount(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the reseller.
+     * Format: accounts/{account_id}.
+     * 
+ * + * string account = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for account to set. + * @return This builder for chaining. + */ + public Builder setAccountBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + account_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 SKUs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 SKUs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 SKUs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Optional.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Optional.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Optional.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Optional.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. A token identifying a page of results, if other than the first one.
+     * Optional.
+     * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListSkusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListSkusRequest) + private static final com.google.cloud.channel.v1.ListSkusRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListSkusRequest(); + } + + public static com.google.cloud.channel.v1.ListSkusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSkusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListSkusRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusRequestOrBuilder.java new file mode 100644 index 00000000..eaaf6fd9 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusRequestOrBuilder.java @@ -0,0 +1,156 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListSkusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListSkusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the Product for which to list SKUs.
+   * The parent takes the format: products/{product_id}.
+   * Supports products/- to retrieve SKUs for all products.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the Product for which to list SKUs.
+   * The parent takes the format: products/{product_id}.
+   * Supports products/- to retrieve SKUs for all products.
+   * 
+ * + * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. Resource name of the reseller.
+   * Format: accounts/{account_id}.
+   * 
+ * + * string account = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The account. + */ + java.lang.String getAccount(); + /** + * + * + *
+   * Required. Resource name of the reseller.
+   * Format: accounts/{account_id}.
+   * 
+ * + * string account = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for account. + */ + com.google.protobuf.ByteString getAccountBytes(); + + /** + * + * + *
+   * Optional. Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 SKUs will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Optional.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * Optional. A token identifying a page of results, if other than the first one.
+   * Optional.
+   * 
+ * + * string page_token = 4 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * Optional. The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 5 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusResponse.java new file mode 100644 index 00000000..4127f8cc --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusResponse.java @@ -0,0 +1,1120 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for ListSkus.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkusResponse} + */ +public final class ListSkusResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListSkusResponse) + ListSkusResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListSkusResponse.newBuilder() to construct. + private ListSkusResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListSkusResponse() { + skus_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListSkusResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListSkusResponse( + 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)) { + skus_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + skus_.add( + input.readMessage(com.google.cloud.channel.v1.Sku.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)) { + skus_ = java.util.Collections.unmodifiableList(skus_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkusResponse.class, + com.google.cloud.channel.v1.ListSkusResponse.Builder.class); + } + + public static final int SKUS_FIELD_NUMBER = 1; + private java.util.List skus_; + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + @java.lang.Override + public java.util.List getSkusList() { + return skus_; + } + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + @java.lang.Override + public java.util.List getSkusOrBuilderList() { + return skus_; + } + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + @java.lang.Override + public int getSkusCount() { + return skus_.size(); + } + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.Sku getSkus(int index) { + return skus_.get(index); + } + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.SkuOrBuilder getSkusOrBuilder(int index) { + return skus_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve 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; + } + } + /** + * + * + *
+   * A token to retrieve 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 < skus_.size(); i++) { + output.writeMessage(1, skus_.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 < skus_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, skus_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListSkusResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListSkusResponse other = + (com.google.cloud.channel.v1.ListSkusResponse) obj; + + if (!getSkusList().equals(other.getSkusList())) 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 (getSkusCount() > 0) { + hash = (37 * hash) + SKUS_FIELD_NUMBER; + hash = (53 * hash) + getSkusList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListSkusResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ListSkusResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 ListSkus.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListSkusResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListSkusResponse) + com.google.cloud.channel.v1.ListSkusResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListSkusResponse.class, + com.google.cloud.channel.v1.ListSkusResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListSkusResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getSkusFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (skusBuilder_ == null) { + skus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + skusBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListSkusResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkusResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListSkusResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkusResponse build() { + com.google.cloud.channel.v1.ListSkusResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkusResponse buildPartial() { + com.google.cloud.channel.v1.ListSkusResponse result = + new com.google.cloud.channel.v1.ListSkusResponse(this); + int from_bitField0_ = bitField0_; + if (skusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + skus_ = java.util.Collections.unmodifiableList(skus_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.skus_ = skus_; + } else { + result.skus_ = skusBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListSkusResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListSkusResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListSkusResponse other) { + if (other == com.google.cloud.channel.v1.ListSkusResponse.getDefaultInstance()) return this; + if (skusBuilder_ == null) { + if (!other.skus_.isEmpty()) { + if (skus_.isEmpty()) { + skus_ = other.skus_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureSkusIsMutable(); + skus_.addAll(other.skus_); + } + onChanged(); + } + } else { + if (!other.skus_.isEmpty()) { + if (skusBuilder_.isEmpty()) { + skusBuilder_.dispose(); + skusBuilder_ = null; + skus_ = other.skus_; + bitField0_ = (bitField0_ & ~0x00000001); + skusBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getSkusFieldBuilder() + : null; + } else { + skusBuilder_.addAllMessages(other.skus_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListSkusResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ListSkusResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List skus_ = + java.util.Collections.emptyList(); + + private void ensureSkusIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + skus_ = new java.util.ArrayList(skus_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder> + skusBuilder_; + + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public java.util.List getSkusList() { + if (skusBuilder_ == null) { + return java.util.Collections.unmodifiableList(skus_); + } else { + return skusBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public int getSkusCount() { + if (skusBuilder_ == null) { + return skus_.size(); + } else { + return skusBuilder_.getCount(); + } + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public com.google.cloud.channel.v1.Sku getSkus(int index) { + if (skusBuilder_ == null) { + return skus_.get(index); + } else { + return skusBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public Builder setSkus(int index, com.google.cloud.channel.v1.Sku value) { + if (skusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkusIsMutable(); + skus_.set(index, value); + onChanged(); + } else { + skusBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public Builder setSkus(int index, com.google.cloud.channel.v1.Sku.Builder builderForValue) { + if (skusBuilder_ == null) { + ensureSkusIsMutable(); + skus_.set(index, builderForValue.build()); + onChanged(); + } else { + skusBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public Builder addSkus(com.google.cloud.channel.v1.Sku value) { + if (skusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkusIsMutable(); + skus_.add(value); + onChanged(); + } else { + skusBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public Builder addSkus(int index, com.google.cloud.channel.v1.Sku value) { + if (skusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureSkusIsMutable(); + skus_.add(index, value); + onChanged(); + } else { + skusBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public Builder addSkus(com.google.cloud.channel.v1.Sku.Builder builderForValue) { + if (skusBuilder_ == null) { + ensureSkusIsMutable(); + skus_.add(builderForValue.build()); + onChanged(); + } else { + skusBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public Builder addSkus(int index, com.google.cloud.channel.v1.Sku.Builder builderForValue) { + if (skusBuilder_ == null) { + ensureSkusIsMutable(); + skus_.add(index, builderForValue.build()); + onChanged(); + } else { + skusBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public Builder addAllSkus( + java.lang.Iterable values) { + if (skusBuilder_ == null) { + ensureSkusIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, skus_); + onChanged(); + } else { + skusBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public Builder clearSkus() { + if (skusBuilder_ == null) { + skus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + skusBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public Builder removeSkus(int index) { + if (skusBuilder_ == null) { + ensureSkusIsMutable(); + skus_.remove(index); + onChanged(); + } else { + skusBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public com.google.cloud.channel.v1.Sku.Builder getSkusBuilder(int index) { + return getSkusFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public com.google.cloud.channel.v1.SkuOrBuilder getSkusOrBuilder(int index) { + if (skusBuilder_ == null) { + return skus_.get(index); + } else { + return skusBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public java.util.List + getSkusOrBuilderList() { + if (skusBuilder_ != null) { + return skusBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(skus_); + } + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public com.google.cloud.channel.v1.Sku.Builder addSkusBuilder() { + return getSkusFieldBuilder().addBuilder(com.google.cloud.channel.v1.Sku.getDefaultInstance()); + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public com.google.cloud.channel.v1.Sku.Builder addSkusBuilder(int index) { + return getSkusFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Sku.getDefaultInstance()); + } + /** + * + * + *
+     * The list of SKUs requested.
+     * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + public java.util.List getSkusBuilderList() { + return getSkusFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder> + getSkusFieldBuilder() { + if (skusBuilder_ == null) { + skusBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder>( + skus_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + skus_ = null; + } + return skusBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve 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; + } + } + /** + * + * + *
+     * A token to retrieve 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; + } + } + /** + * + * + *
+     * A token to retrieve 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; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve 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.cloud.channel.v1.ListSkusResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListSkusResponse) + private static final com.google.cloud.channel.v1.ListSkusResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListSkusResponse(); + } + + public static com.google.cloud.channel.v1.ListSkusResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListSkusResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListSkusResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListSkusResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusResponseOrBuilder.java new file mode 100644 index 00000000..0af82b1b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListSkusResponseOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListSkusResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListSkusResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + java.util.List getSkusList(); + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + com.google.cloud.channel.v1.Sku getSkus(int index); + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + int getSkusCount(); + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + java.util.List getSkusOrBuilderList(); + /** + * + * + *
+   * The list of SKUs requested.
+   * 
+ * + * repeated .google.cloud.channel.v1.Sku skus = 1; + */ + com.google.cloud.channel.v1.SkuOrBuilder getSkusOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve 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-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersRequest.java new file mode 100644 index 00000000..26b4341f --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersRequest.java @@ -0,0 +1,1806 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers]
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListTransferableOffersRequest} + */ +public final class ListTransferableOffersRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListTransferableOffersRequest) + ListTransferableOffersRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTransferableOffersRequest.newBuilder() to construct. + private ListTransferableOffersRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTransferableOffersRequest() { + parent_ = ""; + pageToken_ = ""; + sku_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTransferableOffersRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTransferableOffersRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + transferredCustomerIdentityCase_ = 4; + transferredCustomerIdentity_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + transferredCustomerIdentityCase_ = 5; + transferredCustomerIdentity_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + sku_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableOffersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableOffersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListTransferableOffersRequest.class, + com.google.cloud.channel.v1.ListTransferableOffersRequest.Builder.class); + } + + private int transferredCustomerIdentityCase_ = 0; + private java.lang.Object transferredCustomerIdentity_; + + public enum TransferredCustomerIdentityCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_IDENTITY_ID(4), + CUSTOMER_NAME(5), + TRANSFERREDCUSTOMERIDENTITY_NOT_SET(0); + private final int value; + + private TransferredCustomerIdentityCase(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 TransferredCustomerIdentityCase valueOf(int value) { + return forNumber(value); + } + + public static TransferredCustomerIdentityCase forNumber(int value) { + switch (value) { + case 4: + return CLOUD_IDENTITY_ID; + case 5: + return CUSTOMER_NAME; + case 0: + return TRANSFERREDCUSTOMERIDENTITY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TransferredCustomerIdentityCase getTransferredCustomerIdentityCase() { + return TransferredCustomerIdentityCase.forNumber(transferredCustomerIdentityCase_); + } + + public static final int CLOUD_IDENTITY_ID_FIELD_NUMBER = 4; + /** + * + * + *
+   * Customer's Cloud Identity ID
+   * 
+ * + * string cloud_identity_id = 4; + * + * @return The cloudIdentityId. + */ + public java.lang.String getCloudIdentityId() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 4) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (transferredCustomerIdentityCase_ == 4) { + transferredCustomerIdentity_ = s; + } + return s; + } + } + /** + * + * + *
+   * Customer's Cloud Identity ID
+   * 
+ * + * string cloud_identity_id = 4; + * + * @return The bytes for cloudIdentityId. + */ + public com.google.protobuf.ByteString getCloudIdentityIdBytes() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 4) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (transferredCustomerIdentityCase_ == 4) { + transferredCustomerIdentity_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOMER_NAME_FIELD_NUMBER = 5; + /** + * + * + *
+   * A reseller should create a customer and use the resource name of
+   * the created customer here.
+   * 
+ * + * string customer_name = 5; + * + * @return The customerName. + */ + public java.lang.String getCustomerName() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 5) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (transferredCustomerIdentityCase_ == 5) { + transferredCustomerIdentity_ = s; + } + return s; + } + } + /** + * + * + *
+   * A reseller should create a customer and use the resource name of
+   * the created customer here.
+   * 
+ * + * string customer_name = 5; + * + * @return The bytes for customerName. + */ + public com.google.protobuf.ByteString getCustomerNameBytes() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 5) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (transferredCustomerIdentityCase_ == 5) { + transferredCustomerIdentity_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the reseller's account.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the reseller's account.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 Offers will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous
+   * [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous
+   * [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SKU_FIELD_NUMBER = 6; + private volatile java.lang.Object sku_; + /** + * + * + *
+   * Required. SKU for which the Offers are being looked up.
+   * 
+ * + * string sku = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sku. + */ + @java.lang.Override + public java.lang.String getSku() { + java.lang.Object ref = sku_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sku_ = s; + return s; + } + } + /** + * + * + *
+   * Required. SKU for which the Offers are being looked up.
+   * 
+ * + * string sku = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sku. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSkuBytes() { + java.lang.Object ref = sku_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sku_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 7; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 7; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 7; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (transferredCustomerIdentityCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, transferredCustomerIdentity_); + } + if (transferredCustomerIdentityCase_ == 5) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, transferredCustomerIdentity_); + } + if (!getSkuBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, sku_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, languageCode_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (transferredCustomerIdentityCase_ == 4) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(4, transferredCustomerIdentity_); + } + if (transferredCustomerIdentityCase_ == 5) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(5, transferredCustomerIdentity_); + } + if (!getSkuBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, sku_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, languageCode_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListTransferableOffersRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListTransferableOffersRequest other = + (com.google.cloud.channel.v1.ListTransferableOffersRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getSku().equals(other.getSku())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getTransferredCustomerIdentityCase().equals(other.getTransferredCustomerIdentityCase())) + return false; + switch (transferredCustomerIdentityCase_) { + case 4: + if (!getCloudIdentityId().equals(other.getCloudIdentityId())) return false; + break; + case 5: + if (!getCustomerName().equals(other.getCustomerName())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + SKU_FIELD_NUMBER; + hash = (53 * hash) + getSku().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + switch (transferredCustomerIdentityCase_) { + case 4: + hash = (37 * hash) + CLOUD_IDENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getCloudIdentityId().hashCode(); + break; + case 5: + hash = (37 * hash) + CUSTOMER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCustomerName().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListTransferableOffersRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers]
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListTransferableOffersRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListTransferableOffersRequest) + com.google.cloud.channel.v1.ListTransferableOffersRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableOffersRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableOffersRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListTransferableOffersRequest.class, + com.google.cloud.channel.v1.ListTransferableOffersRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListTransferableOffersRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + sku_ = ""; + + languageCode_ = ""; + + transferredCustomerIdentityCase_ = 0; + transferredCustomerIdentity_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableOffersRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableOffersRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListTransferableOffersRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableOffersRequest build() { + com.google.cloud.channel.v1.ListTransferableOffersRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableOffersRequest buildPartial() { + com.google.cloud.channel.v1.ListTransferableOffersRequest result = + new com.google.cloud.channel.v1.ListTransferableOffersRequest(this); + if (transferredCustomerIdentityCase_ == 4) { + result.transferredCustomerIdentity_ = transferredCustomerIdentity_; + } + if (transferredCustomerIdentityCase_ == 5) { + result.transferredCustomerIdentity_ = transferredCustomerIdentity_; + } + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.sku_ = sku_; + result.languageCode_ = languageCode_; + result.transferredCustomerIdentityCase_ = transferredCustomerIdentityCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListTransferableOffersRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListTransferableOffersRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListTransferableOffersRequest other) { + if (other == com.google.cloud.channel.v1.ListTransferableOffersRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getSku().isEmpty()) { + sku_ = other.sku_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + switch (other.getTransferredCustomerIdentityCase()) { + case CLOUD_IDENTITY_ID: + { + transferredCustomerIdentityCase_ = 4; + transferredCustomerIdentity_ = other.transferredCustomerIdentity_; + onChanged(); + break; + } + case CUSTOMER_NAME: + { + transferredCustomerIdentityCase_ = 5; + transferredCustomerIdentity_ = other.transferredCustomerIdentity_; + onChanged(); + break; + } + case TRANSFERREDCUSTOMERIDENTITY_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListTransferableOffersRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListTransferableOffersRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int transferredCustomerIdentityCase_ = 0; + private java.lang.Object transferredCustomerIdentity_; + + public TransferredCustomerIdentityCase getTransferredCustomerIdentityCase() { + return TransferredCustomerIdentityCase.forNumber(transferredCustomerIdentityCase_); + } + + public Builder clearTransferredCustomerIdentity() { + transferredCustomerIdentityCase_ = 0; + transferredCustomerIdentity_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Customer's Cloud Identity ID
+     * 
+ * + * string cloud_identity_id = 4; + * + * @return The cloudIdentityId. + */ + @java.lang.Override + public java.lang.String getCloudIdentityId() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 4) { + ref = transferredCustomerIdentity_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (transferredCustomerIdentityCase_ == 4) { + transferredCustomerIdentity_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Customer's Cloud Identity ID
+     * 
+ * + * string cloud_identity_id = 4; + * + * @return The bytes for cloudIdentityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudIdentityIdBytes() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 4) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (transferredCustomerIdentityCase_ == 4) { + transferredCustomerIdentity_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Customer's Cloud Identity ID
+     * 
+ * + * string cloud_identity_id = 4; + * + * @param value The cloudIdentityId to set. + * @return This builder for chaining. + */ + public Builder setCloudIdentityId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + transferredCustomerIdentityCase_ = 4; + transferredCustomerIdentity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer's Cloud Identity ID
+     * 
+ * + * string cloud_identity_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearCloudIdentityId() { + if (transferredCustomerIdentityCase_ == 4) { + transferredCustomerIdentityCase_ = 0; + transferredCustomerIdentity_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Customer's Cloud Identity ID
+     * 
+ * + * string cloud_identity_id = 4; + * + * @param value The bytes for cloudIdentityId to set. + * @return This builder for chaining. + */ + public Builder setCloudIdentityIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + transferredCustomerIdentityCase_ = 4; + transferredCustomerIdentity_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * A reseller should create a customer and use the resource name of
+     * the created customer here.
+     * 
+ * + * string customer_name = 5; + * + * @return The customerName. + */ + @java.lang.Override + public java.lang.String getCustomerName() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 5) { + ref = transferredCustomerIdentity_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (transferredCustomerIdentityCase_ == 5) { + transferredCustomerIdentity_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A reseller should create a customer and use the resource name of
+     * the created customer here.
+     * 
+ * + * string customer_name = 5; + * + * @return The bytes for customerName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomerNameBytes() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 5) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (transferredCustomerIdentityCase_ == 5) { + transferredCustomerIdentity_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A reseller should create a customer and use the resource name of
+     * the created customer here.
+     * 
+ * + * string customer_name = 5; + * + * @param value The customerName to set. + * @return This builder for chaining. + */ + public Builder setCustomerName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + transferredCustomerIdentityCase_ = 5; + transferredCustomerIdentity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A reseller should create a customer and use the resource name of
+     * the created customer here.
+     * 
+ * + * string customer_name = 5; + * + * @return This builder for chaining. + */ + public Builder clearCustomerName() { + if (transferredCustomerIdentityCase_ == 5) { + transferredCustomerIdentityCase_ = 0; + transferredCustomerIdentity_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * A reseller should create a customer and use the resource name of
+     * the created customer here.
+     * 
+ * + * string customer_name = 5; + * + * @param value The bytes for customerName to set. + * @return This builder for chaining. + */ + public Builder setCustomerNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + transferredCustomerIdentityCase_ = 5; + transferredCustomerIdentity_ = value; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the reseller's account.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller's account.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller's account.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller's account.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller's account.
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 Offers will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 Offers will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 Offers will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous
+     * [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous
+     * [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous
+     * [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous
+     * [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous
+     * [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object sku_ = ""; + /** + * + * + *
+     * Required. SKU for which the Offers are being looked up.
+     * 
+ * + * string sku = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sku. + */ + public java.lang.String getSku() { + java.lang.Object ref = sku_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + sku_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. SKU for which the Offers are being looked up.
+     * 
+ * + * string sku = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sku. + */ + public com.google.protobuf.ByteString getSkuBytes() { + java.lang.Object ref = sku_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + sku_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. SKU for which the Offers are being looked up.
+     * 
+ * + * string sku = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The sku to set. + * @return This builder for chaining. + */ + public Builder setSku(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + sku_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. SKU for which the Offers are being looked up.
+     * 
+ * + * string sku = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearSku() { + + sku_ = getDefaultInstance().getSku(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. SKU for which the Offers are being looked up.
+     * 
+ * + * string sku = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for sku to set. + * @return This builder for chaining. + */ + public Builder setSkuBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + sku_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 7; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 7; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 7; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 7; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * 
+ * + * string language_code = 7; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListTransferableOffersRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListTransferableOffersRequest) + private static final com.google.cloud.channel.v1.ListTransferableOffersRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListTransferableOffersRequest(); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTransferableOffersRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTransferableOffersRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableOffersRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersRequestOrBuilder.java new file mode 100644 index 00000000..7b6442bb --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersRequestOrBuilder.java @@ -0,0 +1,205 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListTransferableOffersRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListTransferableOffersRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Customer's Cloud Identity ID
+   * 
+ * + * string cloud_identity_id = 4; + * + * @return The cloudIdentityId. + */ + java.lang.String getCloudIdentityId(); + /** + * + * + *
+   * Customer's Cloud Identity ID
+   * 
+ * + * string cloud_identity_id = 4; + * + * @return The bytes for cloudIdentityId. + */ + com.google.protobuf.ByteString getCloudIdentityIdBytes(); + + /** + * + * + *
+   * A reseller should create a customer and use the resource name of
+   * the created customer here.
+   * 
+ * + * string customer_name = 5; + * + * @return The customerName. + */ + java.lang.String getCustomerName(); + /** + * + * + *
+   * A reseller should create a customer and use the resource name of
+   * the created customer here.
+   * 
+ * + * string customer_name = 5; + * + * @return The bytes for customerName. + */ + com.google.protobuf.ByteString getCustomerNameBytes(); + + /** + * + * + *
+   * Required. The resource name of the reseller's account.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the reseller's account.
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 Offers will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous
+   * [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous
+   * [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * Required. SKU for which the Offers are being looked up.
+   * 
+ * + * string sku = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The sku. + */ + java.lang.String getSku(); + /** + * + * + *
+   * Required. SKU for which the Offers are being looked up.
+   * 
+ * + * string sku = 6 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for sku. + */ + com.google.protobuf.ByteString getSkuBytes(); + + /** + * + * + *
+   * The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 7; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * 
+ * + * string language_code = 7; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + public com.google.cloud.channel.v1.ListTransferableOffersRequest.TransferredCustomerIdentityCase + getTransferredCustomerIdentityCase(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersResponse.java new file mode 100644 index 00000000..5b3c497a --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersResponse.java @@ -0,0 +1,1182 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListTransferableOffersResponse} + */ +public final class ListTransferableOffersResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListTransferableOffersResponse) + ListTransferableOffersResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTransferableOffersResponse.newBuilder() to construct. + private ListTransferableOffersResponse( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTransferableOffersResponse() { + transferableOffers_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTransferableOffersResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTransferableOffersResponse( + 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)) { + transferableOffers_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + transferableOffers_.add( + input.readMessage( + com.google.cloud.channel.v1.TransferableOffer.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)) { + transferableOffers_ = java.util.Collections.unmodifiableList(transferableOffers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableOffersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableOffersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListTransferableOffersResponse.class, + com.google.cloud.channel.v1.ListTransferableOffersResponse.Builder.class); + } + + public static final int TRANSFERABLE_OFFERS_FIELD_NUMBER = 1; + private java.util.List transferableOffers_; + /** + * + * + *
+   * Information about Offers for a customer that can be used for
+   * transfer.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + @java.lang.Override + public java.util.List getTransferableOffersList() { + return transferableOffers_; + } + /** + * + * + *
+   * Information about Offers for a customer that can be used for
+   * transfer.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + @java.lang.Override + public java.util.List + getTransferableOffersOrBuilderList() { + return transferableOffers_; + } + /** + * + * + *
+   * Information about Offers for a customer that can be used for
+   * transfer.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + @java.lang.Override + public int getTransferableOffersCount() { + return transferableOffers_.size(); + } + /** + * + * + *
+   * Information about Offers for a customer that can be used for
+   * transfer.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.TransferableOffer getTransferableOffers(int index) { + return transferableOffers_.get(index); + } + /** + * + * + *
+   * Information about Offers for a customer that can be used for
+   * transfer.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.TransferableOfferOrBuilder getTransferableOffersOrBuilder( + int index) { + return transferableOffers_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain
+   * that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain
+   * that page.
+   * 
+ * + * 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 < transferableOffers_.size(); i++) { + output.writeMessage(1, transferableOffers_.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 < transferableOffers_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(1, transferableOffers_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListTransferableOffersResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListTransferableOffersResponse other = + (com.google.cloud.channel.v1.ListTransferableOffersResponse) obj; + + if (!getTransferableOffersList().equals(other.getTransferableOffersList())) 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 (getTransferableOffersCount() > 0) { + hash = (37 * hash) + TRANSFERABLE_OFFERS_FIELD_NUMBER; + hash = (53 * hash) + getTransferableOffersList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListTransferableOffersResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListTransferableOffersResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListTransferableOffersResponse) + com.google.cloud.channel.v1.ListTransferableOffersResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableOffersResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableOffersResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListTransferableOffersResponse.class, + com.google.cloud.channel.v1.ListTransferableOffersResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListTransferableOffersResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTransferableOffersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (transferableOffersBuilder_ == null) { + transferableOffers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transferableOffersBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableOffersResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableOffersResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListTransferableOffersResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableOffersResponse build() { + com.google.cloud.channel.v1.ListTransferableOffersResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableOffersResponse buildPartial() { + com.google.cloud.channel.v1.ListTransferableOffersResponse result = + new com.google.cloud.channel.v1.ListTransferableOffersResponse(this); + int from_bitField0_ = bitField0_; + if (transferableOffersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transferableOffers_ = java.util.Collections.unmodifiableList(transferableOffers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transferableOffers_ = transferableOffers_; + } else { + result.transferableOffers_ = transferableOffersBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListTransferableOffersResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListTransferableOffersResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListTransferableOffersResponse other) { + if (other == com.google.cloud.channel.v1.ListTransferableOffersResponse.getDefaultInstance()) + return this; + if (transferableOffersBuilder_ == null) { + if (!other.transferableOffers_.isEmpty()) { + if (transferableOffers_.isEmpty()) { + transferableOffers_ = other.transferableOffers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransferableOffersIsMutable(); + transferableOffers_.addAll(other.transferableOffers_); + } + onChanged(); + } + } else { + if (!other.transferableOffers_.isEmpty()) { + if (transferableOffersBuilder_.isEmpty()) { + transferableOffersBuilder_.dispose(); + transferableOffersBuilder_ = null; + transferableOffers_ = other.transferableOffers_; + bitField0_ = (bitField0_ & ~0x00000001); + transferableOffersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTransferableOffersFieldBuilder() + : null; + } else { + transferableOffersBuilder_.addAllMessages(other.transferableOffers_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListTransferableOffersResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListTransferableOffersResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List transferableOffers_ = + java.util.Collections.emptyList(); + + private void ensureTransferableOffersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transferableOffers_ = + new java.util.ArrayList( + transferableOffers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.TransferableOffer, + com.google.cloud.channel.v1.TransferableOffer.Builder, + com.google.cloud.channel.v1.TransferableOfferOrBuilder> + transferableOffersBuilder_; + + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public java.util.List + getTransferableOffersList() { + if (transferableOffersBuilder_ == null) { + return java.util.Collections.unmodifiableList(transferableOffers_); + } else { + return transferableOffersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public int getTransferableOffersCount() { + if (transferableOffersBuilder_ == null) { + return transferableOffers_.size(); + } else { + return transferableOffersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public com.google.cloud.channel.v1.TransferableOffer getTransferableOffers(int index) { + if (transferableOffersBuilder_ == null) { + return transferableOffers_.get(index); + } else { + return transferableOffersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public Builder setTransferableOffers( + int index, com.google.cloud.channel.v1.TransferableOffer value) { + if (transferableOffersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransferableOffersIsMutable(); + transferableOffers_.set(index, value); + onChanged(); + } else { + transferableOffersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public Builder setTransferableOffers( + int index, com.google.cloud.channel.v1.TransferableOffer.Builder builderForValue) { + if (transferableOffersBuilder_ == null) { + ensureTransferableOffersIsMutable(); + transferableOffers_.set(index, builderForValue.build()); + onChanged(); + } else { + transferableOffersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public Builder addTransferableOffers(com.google.cloud.channel.v1.TransferableOffer value) { + if (transferableOffersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransferableOffersIsMutable(); + transferableOffers_.add(value); + onChanged(); + } else { + transferableOffersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public Builder addTransferableOffers( + int index, com.google.cloud.channel.v1.TransferableOffer value) { + if (transferableOffersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransferableOffersIsMutable(); + transferableOffers_.add(index, value); + onChanged(); + } else { + transferableOffersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public Builder addTransferableOffers( + com.google.cloud.channel.v1.TransferableOffer.Builder builderForValue) { + if (transferableOffersBuilder_ == null) { + ensureTransferableOffersIsMutable(); + transferableOffers_.add(builderForValue.build()); + onChanged(); + } else { + transferableOffersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public Builder addTransferableOffers( + int index, com.google.cloud.channel.v1.TransferableOffer.Builder builderForValue) { + if (transferableOffersBuilder_ == null) { + ensureTransferableOffersIsMutable(); + transferableOffers_.add(index, builderForValue.build()); + onChanged(); + } else { + transferableOffersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public Builder addAllTransferableOffers( + java.lang.Iterable values) { + if (transferableOffersBuilder_ == null) { + ensureTransferableOffersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transferableOffers_); + onChanged(); + } else { + transferableOffersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public Builder clearTransferableOffers() { + if (transferableOffersBuilder_ == null) { + transferableOffers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transferableOffersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public Builder removeTransferableOffers(int index) { + if (transferableOffersBuilder_ == null) { + ensureTransferableOffersIsMutable(); + transferableOffers_.remove(index); + onChanged(); + } else { + transferableOffersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public com.google.cloud.channel.v1.TransferableOffer.Builder getTransferableOffersBuilder( + int index) { + return getTransferableOffersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public com.google.cloud.channel.v1.TransferableOfferOrBuilder getTransferableOffersOrBuilder( + int index) { + if (transferableOffersBuilder_ == null) { + return transferableOffers_.get(index); + } else { + return transferableOffersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public java.util.List + getTransferableOffersOrBuilderList() { + if (transferableOffersBuilder_ != null) { + return transferableOffersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transferableOffers_); + } + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public com.google.cloud.channel.v1.TransferableOffer.Builder addTransferableOffersBuilder() { + return getTransferableOffersFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.TransferableOffer.getDefaultInstance()); + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public com.google.cloud.channel.v1.TransferableOffer.Builder addTransferableOffersBuilder( + int index) { + return getTransferableOffersFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.TransferableOffer.getDefaultInstance()); + } + /** + * + * + *
+     * Information about Offers for a customer that can be used for
+     * transfer.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + public java.util.List + getTransferableOffersBuilderList() { + return getTransferableOffersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.TransferableOffer, + com.google.cloud.channel.v1.TransferableOffer.Builder, + com.google.cloud.channel.v1.TransferableOfferOrBuilder> + getTransferableOffersFieldBuilder() { + if (transferableOffersBuilder_ == null) { + transferableOffersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.TransferableOffer, + com.google.cloud.channel.v1.TransferableOffer.Builder, + com.google.cloud.channel.v1.TransferableOfferOrBuilder>( + transferableOffers_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transferableOffers_ = null; + } + return transferableOffersBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain
+     * that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain
+     * that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain
+     * that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain
+     * that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain
+     * that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListTransferableOffersResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListTransferableOffersResponse) + private static final com.google.cloud.channel.v1.ListTransferableOffersResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListTransferableOffersResponse(); + } + + public static com.google.cloud.channel.v1.ListTransferableOffersResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTransferableOffersResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTransferableOffersResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableOffersResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersResponseOrBuilder.java new file mode 100644 index 00000000..36f0dddb --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableOffersResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListTransferableOffersResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListTransferableOffersResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Information about Offers for a customer that can be used for
+   * transfer.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + java.util.List getTransferableOffersList(); + /** + * + * + *
+   * Information about Offers for a customer that can be used for
+   * transfer.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + com.google.cloud.channel.v1.TransferableOffer getTransferableOffers(int index); + /** + * + * + *
+   * Information about Offers for a customer that can be used for
+   * transfer.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + int getTransferableOffersCount(); + /** + * + * + *
+   * Information about Offers for a customer that can be used for
+   * transfer.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + java.util.List + getTransferableOffersOrBuilderList(); + /** + * + * + *
+   * Information about Offers for a customer that can be used for
+   * transfer.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableOffer transferable_offers = 1; + */ + com.google.cloud.channel.v1.TransferableOfferOrBuilder getTransferableOffersOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain
+   * that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain
+   * that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusRequest.java new file mode 100644 index 00000000..3706bf2d --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusRequest.java @@ -0,0 +1,1873 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus]
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListTransferableSkusRequest} + */ +public final class ListTransferableSkusRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListTransferableSkusRequest) + ListTransferableSkusRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTransferableSkusRequest.newBuilder() to construct. + private ListTransferableSkusRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTransferableSkusRequest() { + parent_ = ""; + pageToken_ = ""; + authToken_ = ""; + languageCode_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTransferableSkusRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTransferableSkusRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + parent_ = s; + break; + } + case 16: + { + pageSize_ = input.readInt32(); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + pageToken_ = s; + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + transferredCustomerIdentityCase_ = 4; + transferredCustomerIdentity_ = s; + break; + } + case 42: + { + java.lang.String s = input.readStringRequireUtf8(); + + authToken_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + languageCode_ = s; + break; + } + case 58: + { + java.lang.String s = input.readStringRequireUtf8(); + transferredCustomerIdentityCase_ = 7; + transferredCustomerIdentity_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableSkusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableSkusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListTransferableSkusRequest.class, + com.google.cloud.channel.v1.ListTransferableSkusRequest.Builder.class); + } + + private int transferredCustomerIdentityCase_ = 0; + private java.lang.Object transferredCustomerIdentity_; + + public enum TransferredCustomerIdentityCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + CLOUD_IDENTITY_ID(4), + CUSTOMER_NAME(7), + TRANSFERREDCUSTOMERIDENTITY_NOT_SET(0); + private final int value; + + private TransferredCustomerIdentityCase(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 TransferredCustomerIdentityCase valueOf(int value) { + return forNumber(value); + } + + public static TransferredCustomerIdentityCase forNumber(int value) { + switch (value) { + case 4: + return CLOUD_IDENTITY_ID; + case 7: + return CUSTOMER_NAME; + case 0: + return TRANSFERREDCUSTOMERIDENTITY_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public TransferredCustomerIdentityCase getTransferredCustomerIdentityCase() { + return TransferredCustomerIdentityCase.forNumber(transferredCustomerIdentityCase_); + } + + public static final int CLOUD_IDENTITY_ID_FIELD_NUMBER = 4; + /** + * + * + *
+   * Customer's Cloud Identity ID
+   * 
+ * + * string cloud_identity_id = 4; + * + * @return The cloudIdentityId. + */ + public java.lang.String getCloudIdentityId() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 4) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (transferredCustomerIdentityCase_ == 4) { + transferredCustomerIdentity_ = s; + } + return s; + } + } + /** + * + * + *
+   * Customer's Cloud Identity ID
+   * 
+ * + * string cloud_identity_id = 4; + * + * @return The bytes for cloudIdentityId. + */ + public com.google.protobuf.ByteString getCloudIdentityIdBytes() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 4) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (transferredCustomerIdentityCase_ == 4) { + transferredCustomerIdentity_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CUSTOMER_NAME_FIELD_NUMBER = 7; + /** + * + * + *
+   * A reseller is required to create a customer and use the resource name of
+   * the created customer here.
+   * The customer_name takes the format:
+   * accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string customer_name = 7; + * + * @return The customerName. + */ + public java.lang.String getCustomerName() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 7) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (transferredCustomerIdentityCase_ == 7) { + transferredCustomerIdentity_ = s; + } + return s; + } + } + /** + * + * + *
+   * A reseller is required to create a customer and use the resource name of
+   * the created customer here.
+   * The customer_name takes the format:
+   * accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string customer_name = 7; + * + * @return The bytes for customerName. + */ + public com.google.protobuf.ByteString getCustomerNameBytes() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 7) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (transferredCustomerIdentityCase_ == 7) { + transferredCustomerIdentity_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of the reseller's account.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the reseller's account.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PAGE_SIZE_FIELD_NUMBER = 2; + private int pageSize_; + /** + * + * + *
+   * Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 SKUs will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * Optional.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + + public static final int PAGE_TOKEN_FIELD_NUMBER = 3; + private volatile java.lang.Object pageToken_; + /** + * + * + *
+   * A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous
+   * [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call.
+   * Optional.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + @java.lang.Override + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous
+   * [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call.
+   * Optional.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int AUTH_TOKEN_FIELD_NUMBER = 5; + private volatile java.lang.Object authToken_; + /** + * + * + *
+   * This token is generated by the Super Admin of the resold customer to
+   * authorize a reseller to access their Cloud Identity and purchase
+   * entitlements on their behalf. This token can be omitted once the
+   * authorization is generated. See https://support.google.com/a/answer/7643790
+   * for more details.
+   * 
+ * + * string auth_token = 5; + * + * @return The authToken. + */ + @java.lang.Override + public java.lang.String getAuthToken() { + java.lang.Object ref = authToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authToken_ = s; + return s; + } + } + /** + * + * + *
+   * This token is generated by the Super Admin of the resold customer to
+   * authorize a reseller to access their Cloud Identity and purchase
+   * entitlements on their behalf. This token can be omitted once the
+   * authorization is generated. See https://support.google.com/a/answer/7643790
+   * for more details.
+   * 
+ * + * string auth_token = 5; + * + * @return The bytes for authToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthTokenBytes() { + java.lang.Object ref = authToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int LANGUAGE_CODE_FIELD_NUMBER = 6; + private volatile java.lang.Object languageCode_; + /** + * + * + *
+   * The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * Optional.
+   * 
+ * + * string language_code = 6; + * + * @return The languageCode. + */ + @java.lang.Override + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } + } + /** + * + * + *
+   * The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * Optional.
+   * 
+ * + * string language_code = 6; + * + * @return The bytes for languageCode. + */ + @java.lang.Override + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + if (pageSize_ != 0) { + output.writeInt32(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_); + } + if (transferredCustomerIdentityCase_ == 4) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, transferredCustomerIdentity_); + } + if (!getAuthTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 5, authToken_); + } + if (!getLanguageCodeBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, languageCode_); + } + if (transferredCustomerIdentityCase_ == 7) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 7, transferredCustomerIdentity_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + if (pageSize_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, pageSize_); + } + if (!getPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_); + } + if (transferredCustomerIdentityCase_ == 4) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(4, transferredCustomerIdentity_); + } + if (!getAuthTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, authToken_); + } + if (!getLanguageCodeBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, languageCode_); + } + if (transferredCustomerIdentityCase_ == 7) { + size += + com.google.protobuf.GeneratedMessageV3.computeStringSize(7, transferredCustomerIdentity_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListTransferableSkusRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListTransferableSkusRequest other = + (com.google.cloud.channel.v1.ListTransferableSkusRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (getPageSize() != other.getPageSize()) return false; + if (!getPageToken().equals(other.getPageToken())) return false; + if (!getAuthToken().equals(other.getAuthToken())) return false; + if (!getLanguageCode().equals(other.getLanguageCode())) return false; + if (!getTransferredCustomerIdentityCase().equals(other.getTransferredCustomerIdentityCase())) + return false; + switch (transferredCustomerIdentityCase_) { + case 4: + if (!getCloudIdentityId().equals(other.getCloudIdentityId())) return false; + break; + case 7: + if (!getCustomerName().equals(other.getCustomerName())) 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) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER; + hash = (53 * hash) + getPageSize(); + hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getPageToken().hashCode(); + hash = (37 * hash) + AUTH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAuthToken().hashCode(); + hash = (37 * hash) + LANGUAGE_CODE_FIELD_NUMBER; + hash = (53 * hash) + getLanguageCode().hashCode(); + switch (transferredCustomerIdentityCase_) { + case 4: + hash = (37 * hash) + CLOUD_IDENTITY_ID_FIELD_NUMBER; + hash = (53 * hash) + getCloudIdentityId().hashCode(); + break; + case 7: + hash = (37 * hash) + CUSTOMER_NAME_FIELD_NUMBER; + hash = (53 * hash) + getCustomerName().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListTransferableSkusRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus]
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListTransferableSkusRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListTransferableSkusRequest) + com.google.cloud.channel.v1.ListTransferableSkusRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableSkusRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableSkusRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListTransferableSkusRequest.class, + com.google.cloud.channel.v1.ListTransferableSkusRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListTransferableSkusRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + pageSize_ = 0; + + pageToken_ = ""; + + authToken_ = ""; + + languageCode_ = ""; + + transferredCustomerIdentityCase_ = 0; + transferredCustomerIdentity_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableSkusRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableSkusRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListTransferableSkusRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableSkusRequest build() { + com.google.cloud.channel.v1.ListTransferableSkusRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableSkusRequest buildPartial() { + com.google.cloud.channel.v1.ListTransferableSkusRequest result = + new com.google.cloud.channel.v1.ListTransferableSkusRequest(this); + if (transferredCustomerIdentityCase_ == 4) { + result.transferredCustomerIdentity_ = transferredCustomerIdentity_; + } + if (transferredCustomerIdentityCase_ == 7) { + result.transferredCustomerIdentity_ = transferredCustomerIdentity_; + } + result.parent_ = parent_; + result.pageSize_ = pageSize_; + result.pageToken_ = pageToken_; + result.authToken_ = authToken_; + result.languageCode_ = languageCode_; + result.transferredCustomerIdentityCase_ = transferredCustomerIdentityCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListTransferableSkusRequest) { + return mergeFrom((com.google.cloud.channel.v1.ListTransferableSkusRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListTransferableSkusRequest other) { + if (other == com.google.cloud.channel.v1.ListTransferableSkusRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (other.getPageSize() != 0) { + setPageSize(other.getPageSize()); + } + if (!other.getPageToken().isEmpty()) { + pageToken_ = other.pageToken_; + onChanged(); + } + if (!other.getAuthToken().isEmpty()) { + authToken_ = other.authToken_; + onChanged(); + } + if (!other.getLanguageCode().isEmpty()) { + languageCode_ = other.languageCode_; + onChanged(); + } + switch (other.getTransferredCustomerIdentityCase()) { + case CLOUD_IDENTITY_ID: + { + transferredCustomerIdentityCase_ = 4; + transferredCustomerIdentity_ = other.transferredCustomerIdentity_; + onChanged(); + break; + } + case CUSTOMER_NAME: + { + transferredCustomerIdentityCase_ = 7; + transferredCustomerIdentity_ = other.transferredCustomerIdentity_; + onChanged(); + break; + } + case TRANSFERREDCUSTOMERIDENTITY_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListTransferableSkusRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListTransferableSkusRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int transferredCustomerIdentityCase_ = 0; + private java.lang.Object transferredCustomerIdentity_; + + public TransferredCustomerIdentityCase getTransferredCustomerIdentityCase() { + return TransferredCustomerIdentityCase.forNumber(transferredCustomerIdentityCase_); + } + + public Builder clearTransferredCustomerIdentity() { + transferredCustomerIdentityCase_ = 0; + transferredCustomerIdentity_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Customer's Cloud Identity ID
+     * 
+ * + * string cloud_identity_id = 4; + * + * @return The cloudIdentityId. + */ + @java.lang.Override + public java.lang.String getCloudIdentityId() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 4) { + ref = transferredCustomerIdentity_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (transferredCustomerIdentityCase_ == 4) { + transferredCustomerIdentity_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Customer's Cloud Identity ID
+     * 
+ * + * string cloud_identity_id = 4; + * + * @return The bytes for cloudIdentityId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCloudIdentityIdBytes() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 4) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (transferredCustomerIdentityCase_ == 4) { + transferredCustomerIdentity_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Customer's Cloud Identity ID
+     * 
+ * + * string cloud_identity_id = 4; + * + * @param value The cloudIdentityId to set. + * @return This builder for chaining. + */ + public Builder setCloudIdentityId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + transferredCustomerIdentityCase_ = 4; + transferredCustomerIdentity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Customer's Cloud Identity ID
+     * 
+ * + * string cloud_identity_id = 4; + * + * @return This builder for chaining. + */ + public Builder clearCloudIdentityId() { + if (transferredCustomerIdentityCase_ == 4) { + transferredCustomerIdentityCase_ = 0; + transferredCustomerIdentity_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Customer's Cloud Identity ID
+     * 
+ * + * string cloud_identity_id = 4; + * + * @param value The bytes for cloudIdentityId to set. + * @return This builder for chaining. + */ + public Builder setCloudIdentityIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + transferredCustomerIdentityCase_ = 4; + transferredCustomerIdentity_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * A reseller is required to create a customer and use the resource name of
+     * the created customer here.
+     * The customer_name takes the format:
+     * accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string customer_name = 7; + * + * @return The customerName. + */ + @java.lang.Override + public java.lang.String getCustomerName() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 7) { + ref = transferredCustomerIdentity_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (transferredCustomerIdentityCase_ == 7) { + transferredCustomerIdentity_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A reseller is required to create a customer and use the resource name of
+     * the created customer here.
+     * The customer_name takes the format:
+     * accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string customer_name = 7; + * + * @return The bytes for customerName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomerNameBytes() { + java.lang.Object ref = ""; + if (transferredCustomerIdentityCase_ == 7) { + ref = transferredCustomerIdentity_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (transferredCustomerIdentityCase_ == 7) { + transferredCustomerIdentity_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A reseller is required to create a customer and use the resource name of
+     * the created customer here.
+     * The customer_name takes the format:
+     * accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string customer_name = 7; + * + * @param value The customerName to set. + * @return This builder for chaining. + */ + public Builder setCustomerName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + transferredCustomerIdentityCase_ = 7; + transferredCustomerIdentity_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A reseller is required to create a customer and use the resource name of
+     * the created customer here.
+     * The customer_name takes the format:
+     * accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string customer_name = 7; + * + * @return This builder for chaining. + */ + public Builder clearCustomerName() { + if (transferredCustomerIdentityCase_ == 7) { + transferredCustomerIdentityCase_ = 0; + transferredCustomerIdentity_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * A reseller is required to create a customer and use the resource name of
+     * the created customer here.
+     * The customer_name takes the format:
+     * accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string customer_name = 7; + * + * @param value The bytes for customerName to set. + * @return This builder for chaining. + */ + public Builder setCustomerNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + transferredCustomerIdentityCase_ = 7; + transferredCustomerIdentity_ = value; + onChanged(); + return this; + } + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of the reseller's account.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller's account.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the reseller's account.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller's account.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the reseller's account.
+     * The parent takes the format: accounts/{account_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private int pageSize_; + /** + * + * + *
+     * Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 SKUs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * Optional.
+     * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + @java.lang.Override + public int getPageSize() { + return pageSize_; + } + /** + * + * + *
+     * Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 SKUs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * Optional.
+     * 
+ * + * int32 page_size = 2; + * + * @param value The pageSize to set. + * @return This builder for chaining. + */ + public Builder setPageSize(int value) { + + pageSize_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Requested page size. Server might return fewer results than requested.
+     * If unspecified, at most 100 SKUs will be returned.
+     * The maximum value is 1000; values above 1000 will be coerced to 1000.
+     * Optional.
+     * 
+ * + * int32 page_size = 2; + * + * @return This builder for chaining. + */ + public Builder clearPageSize() { + + pageSize_ = 0; + onChanged(); + return this; + } + + private java.lang.Object pageToken_ = ""; + /** + * + * + *
+     * A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous
+     * [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call.
+     * Optional.
+     * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + public java.lang.String getPageToken() { + java.lang.Object ref = pageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + pageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous
+     * [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call.
+     * Optional.
+     * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + public com.google.protobuf.ByteString getPageTokenBytes() { + java.lang.Object ref = pageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + pageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous
+     * [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call.
+     * Optional.
+     * 
+ * + * string page_token = 3; + * + * @param value The pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + pageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous
+     * [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call.
+     * Optional.
+     * 
+ * + * string page_token = 3; + * + * @return This builder for chaining. + */ + public Builder clearPageToken() { + + pageToken_ = getDefaultInstance().getPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token identifying a page of results, if other than the first one.
+     * Typically obtained via
+     * [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous
+     * [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call.
+     * Optional.
+     * 
+ * + * string page_token = 3; + * + * @param value The bytes for pageToken to set. + * @return This builder for chaining. + */ + public Builder setPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + pageToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object authToken_ = ""; + /** + * + * + *
+     * This token is generated by the Super Admin of the resold customer to
+     * authorize a reseller to access their Cloud Identity and purchase
+     * entitlements on their behalf. This token can be omitted once the
+     * authorization is generated. See https://support.google.com/a/answer/7643790
+     * for more details.
+     * 
+ * + * string auth_token = 5; + * + * @return The authToken. + */ + public java.lang.String getAuthToken() { + java.lang.Object ref = authToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This token is generated by the Super Admin of the resold customer to
+     * authorize a reseller to access their Cloud Identity and purchase
+     * entitlements on their behalf. This token can be omitted once the
+     * authorization is generated. See https://support.google.com/a/answer/7643790
+     * for more details.
+     * 
+ * + * string auth_token = 5; + * + * @return The bytes for authToken. + */ + public com.google.protobuf.ByteString getAuthTokenBytes() { + java.lang.Object ref = authToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This token is generated by the Super Admin of the resold customer to
+     * authorize a reseller to access their Cloud Identity and purchase
+     * entitlements on their behalf. This token can be omitted once the
+     * authorization is generated. See https://support.google.com/a/answer/7643790
+     * for more details.
+     * 
+ * + * string auth_token = 5; + * + * @param value The authToken to set. + * @return This builder for chaining. + */ + public Builder setAuthToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + authToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This token is generated by the Super Admin of the resold customer to
+     * authorize a reseller to access their Cloud Identity and purchase
+     * entitlements on their behalf. This token can be omitted once the
+     * authorization is generated. See https://support.google.com/a/answer/7643790
+     * for more details.
+     * 
+ * + * string auth_token = 5; + * + * @return This builder for chaining. + */ + public Builder clearAuthToken() { + + authToken_ = getDefaultInstance().getAuthToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * This token is generated by the Super Admin of the resold customer to
+     * authorize a reseller to access their Cloud Identity and purchase
+     * entitlements on their behalf. This token can be omitted once the
+     * authorization is generated. See https://support.google.com/a/answer/7643790
+     * for more details.
+     * 
+ * + * string auth_token = 5; + * + * @param value The bytes for authToken to set. + * @return This builder for chaining. + */ + public Builder setAuthTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + authToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object languageCode_ = ""; + /** + * + * + *
+     * The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * Optional.
+     * 
+ * + * string language_code = 6; + * + * @return The languageCode. + */ + public java.lang.String getLanguageCode() { + java.lang.Object ref = languageCode_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + languageCode_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * Optional.
+     * 
+ * + * string language_code = 6; + * + * @return The bytes for languageCode. + */ + public com.google.protobuf.ByteString getLanguageCodeBytes() { + java.lang.Object ref = languageCode_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + languageCode_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * Optional.
+     * 
+ * + * string language_code = 6; + * + * @param value The languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCode(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + languageCode_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * Optional.
+     * 
+ * + * string language_code = 6; + * + * @return This builder for chaining. + */ + public Builder clearLanguageCode() { + + languageCode_ = getDefaultInstance().getLanguageCode(); + onChanged(); + return this; + } + /** + * + * + *
+     * The BCP-47 language code, such as "en-US".  If specified, the
+     * response will be localized to the corresponding language code. Default is
+     * "en-US".
+     * Optional.
+     * 
+ * + * string language_code = 6; + * + * @param value The bytes for languageCode to set. + * @return This builder for chaining. + */ + public Builder setLanguageCodeBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + languageCode_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListTransferableSkusRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListTransferableSkusRequest) + private static final com.google.cloud.channel.v1.ListTransferableSkusRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListTransferableSkusRequest(); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTransferableSkusRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTransferableSkusRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableSkusRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusRequestOrBuilder.java new file mode 100644 index 00000000..ca3484b2 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusRequestOrBuilder.java @@ -0,0 +1,224 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListTransferableSkusRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListTransferableSkusRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Customer's Cloud Identity ID
+   * 
+ * + * string cloud_identity_id = 4; + * + * @return The cloudIdentityId. + */ + java.lang.String getCloudIdentityId(); + /** + * + * + *
+   * Customer's Cloud Identity ID
+   * 
+ * + * string cloud_identity_id = 4; + * + * @return The bytes for cloudIdentityId. + */ + com.google.protobuf.ByteString getCloudIdentityIdBytes(); + + /** + * + * + *
+   * A reseller is required to create a customer and use the resource name of
+   * the created customer here.
+   * The customer_name takes the format:
+   * accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string customer_name = 7; + * + * @return The customerName. + */ + java.lang.String getCustomerName(); + /** + * + * + *
+   * A reseller is required to create a customer and use the resource name of
+   * the created customer here.
+   * The customer_name takes the format:
+   * accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string customer_name = 7; + * + * @return The bytes for customerName. + */ + com.google.protobuf.ByteString getCustomerNameBytes(); + + /** + * + * + *
+   * Required. The resource name of the reseller's account.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of the reseller's account.
+   * The parent takes the format: accounts/{account_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Requested page size. Server might return fewer results than requested.
+   * If unspecified, at most 100 SKUs will be returned.
+   * The maximum value is 1000; values above 1000 will be coerced to 1000.
+   * Optional.
+   * 
+ * + * int32 page_size = 2; + * + * @return The pageSize. + */ + int getPageSize(); + + /** + * + * + *
+   * A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous
+   * [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call.
+   * Optional.
+   * 
+ * + * string page_token = 3; + * + * @return The pageToken. + */ + java.lang.String getPageToken(); + /** + * + * + *
+   * A token identifying a page of results, if other than the first one.
+   * Typically obtained via
+   * [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous
+   * [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call.
+   * Optional.
+   * 
+ * + * string page_token = 3; + * + * @return The bytes for pageToken. + */ + com.google.protobuf.ByteString getPageTokenBytes(); + + /** + * + * + *
+   * This token is generated by the Super Admin of the resold customer to
+   * authorize a reseller to access their Cloud Identity and purchase
+   * entitlements on their behalf. This token can be omitted once the
+   * authorization is generated. See https://support.google.com/a/answer/7643790
+   * for more details.
+   * 
+ * + * string auth_token = 5; + * + * @return The authToken. + */ + java.lang.String getAuthToken(); + /** + * + * + *
+   * This token is generated by the Super Admin of the resold customer to
+   * authorize a reseller to access their Cloud Identity and purchase
+   * entitlements on their behalf. This token can be omitted once the
+   * authorization is generated. See https://support.google.com/a/answer/7643790
+   * for more details.
+   * 
+ * + * string auth_token = 5; + * + * @return The bytes for authToken. + */ + com.google.protobuf.ByteString getAuthTokenBytes(); + + /** + * + * + *
+   * The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * Optional.
+   * 
+ * + * string language_code = 6; + * + * @return The languageCode. + */ + java.lang.String getLanguageCode(); + /** + * + * + *
+   * The BCP-47 language code, such as "en-US".  If specified, the
+   * response will be localized to the corresponding language code. Default is
+   * "en-US".
+   * Optional.
+   * 
+ * + * string language_code = 6; + * + * @return The bytes for languageCode. + */ + com.google.protobuf.ByteString getLanguageCodeBytes(); + + public com.google.cloud.channel.v1.ListTransferableSkusRequest.TransferredCustomerIdentityCase + getTransferredCustomerIdentityCase(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusResponse.java new file mode 100644 index 00000000..e0f21e11 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusResponse.java @@ -0,0 +1,1178 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListTransferableSkusResponse} + */ +public final class ListTransferableSkusResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ListTransferableSkusResponse) + ListTransferableSkusResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use ListTransferableSkusResponse.newBuilder() to construct. + private ListTransferableSkusResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ListTransferableSkusResponse() { + transferableSkus_ = java.util.Collections.emptyList(); + nextPageToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ListTransferableSkusResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ListTransferableSkusResponse( + 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)) { + transferableSkus_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + transferableSkus_.add( + input.readMessage( + com.google.cloud.channel.v1.TransferableSku.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)) { + transferableSkus_ = java.util.Collections.unmodifiableList(transferableSkus_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableSkusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableSkusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListTransferableSkusResponse.class, + com.google.cloud.channel.v1.ListTransferableSkusResponse.Builder.class); + } + + public static final int TRANSFERABLE_SKUS_FIELD_NUMBER = 1; + private java.util.List transferableSkus_; + /** + * + * + *
+   * Information about existing SKUs for a customer that would need to be
+   * transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + @java.lang.Override + public java.util.List getTransferableSkusList() { + return transferableSkus_; + } + /** + * + * + *
+   * Information about existing SKUs for a customer that would need to be
+   * transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + @java.lang.Override + public java.util.List + getTransferableSkusOrBuilderList() { + return transferableSkus_; + } + /** + * + * + *
+   * Information about existing SKUs for a customer that would need to be
+   * transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + @java.lang.Override + public int getTransferableSkusCount() { + return transferableSkus_.size(); + } + /** + * + * + *
+   * Information about existing SKUs for a customer that would need to be
+   * transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.TransferableSku getTransferableSkus(int index) { + return transferableSkus_.get(index); + } + /** + * + * + *
+   * Information about existing SKUs for a customer that would need to be
+   * transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.TransferableSkuOrBuilder getTransferableSkusOrBuilder( + int index) { + return transferableSkus_.get(index); + } + + public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2; + private volatile java.lang.Object nextPageToken_; + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain
+   * that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + @java.lang.Override + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } + } + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain
+   * that page.
+   * 
+ * + * 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 < transferableSkus_.size(); i++) { + output.writeMessage(1, transferableSkus_.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 < transferableSkus_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, transferableSkus_.get(i)); + } + if (!getNextPageTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ListTransferableSkusResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ListTransferableSkusResponse other = + (com.google.cloud.channel.v1.ListTransferableSkusResponse) obj; + + if (!getTransferableSkusList().equals(other.getTransferableSkusList())) 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 (getTransferableSkusCount() > 0) { + hash = (37 * hash) + TRANSFERABLE_SKUS_FIELD_NUMBER; + hash = (53 * hash) + getTransferableSkusList().hashCode(); + } + hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getNextPageToken().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ListTransferableSkusResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ListTransferableSkusResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ListTransferableSkusResponse) + com.google.cloud.channel.v1.ListTransferableSkusResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableSkusResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableSkusResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ListTransferableSkusResponse.class, + com.google.cloud.channel.v1.ListTransferableSkusResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ListTransferableSkusResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getTransferableSkusFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (transferableSkusBuilder_ == null) { + transferableSkus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + transferableSkusBuilder_.clear(); + } + nextPageToken_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ListTransferableSkusResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableSkusResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ListTransferableSkusResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableSkusResponse build() { + com.google.cloud.channel.v1.ListTransferableSkusResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableSkusResponse buildPartial() { + com.google.cloud.channel.v1.ListTransferableSkusResponse result = + new com.google.cloud.channel.v1.ListTransferableSkusResponse(this); + int from_bitField0_ = bitField0_; + if (transferableSkusBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + transferableSkus_ = java.util.Collections.unmodifiableList(transferableSkus_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.transferableSkus_ = transferableSkus_; + } else { + result.transferableSkus_ = transferableSkusBuilder_.build(); + } + result.nextPageToken_ = nextPageToken_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ListTransferableSkusResponse) { + return mergeFrom((com.google.cloud.channel.v1.ListTransferableSkusResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ListTransferableSkusResponse other) { + if (other == com.google.cloud.channel.v1.ListTransferableSkusResponse.getDefaultInstance()) + return this; + if (transferableSkusBuilder_ == null) { + if (!other.transferableSkus_.isEmpty()) { + if (transferableSkus_.isEmpty()) { + transferableSkus_ = other.transferableSkus_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureTransferableSkusIsMutable(); + transferableSkus_.addAll(other.transferableSkus_); + } + onChanged(); + } + } else { + if (!other.transferableSkus_.isEmpty()) { + if (transferableSkusBuilder_.isEmpty()) { + transferableSkusBuilder_.dispose(); + transferableSkusBuilder_ = null; + transferableSkus_ = other.transferableSkus_; + bitField0_ = (bitField0_ & ~0x00000001); + transferableSkusBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getTransferableSkusFieldBuilder() + : null; + } else { + transferableSkusBuilder_.addAllMessages(other.transferableSkus_); + } + } + } + if (!other.getNextPageToken().isEmpty()) { + nextPageToken_ = other.nextPageToken_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ListTransferableSkusResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ListTransferableSkusResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List transferableSkus_ = + java.util.Collections.emptyList(); + + private void ensureTransferableSkusIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + transferableSkus_ = + new java.util.ArrayList(transferableSkus_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.TransferableSku, + com.google.cloud.channel.v1.TransferableSku.Builder, + com.google.cloud.channel.v1.TransferableSkuOrBuilder> + transferableSkusBuilder_; + + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public java.util.List getTransferableSkusList() { + if (transferableSkusBuilder_ == null) { + return java.util.Collections.unmodifiableList(transferableSkus_); + } else { + return transferableSkusBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public int getTransferableSkusCount() { + if (transferableSkusBuilder_ == null) { + return transferableSkus_.size(); + } else { + return transferableSkusBuilder_.getCount(); + } + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public com.google.cloud.channel.v1.TransferableSku getTransferableSkus(int index) { + if (transferableSkusBuilder_ == null) { + return transferableSkus_.get(index); + } else { + return transferableSkusBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public Builder setTransferableSkus( + int index, com.google.cloud.channel.v1.TransferableSku value) { + if (transferableSkusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransferableSkusIsMutable(); + transferableSkus_.set(index, value); + onChanged(); + } else { + transferableSkusBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public Builder setTransferableSkus( + int index, com.google.cloud.channel.v1.TransferableSku.Builder builderForValue) { + if (transferableSkusBuilder_ == null) { + ensureTransferableSkusIsMutable(); + transferableSkus_.set(index, builderForValue.build()); + onChanged(); + } else { + transferableSkusBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public Builder addTransferableSkus(com.google.cloud.channel.v1.TransferableSku value) { + if (transferableSkusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransferableSkusIsMutable(); + transferableSkus_.add(value); + onChanged(); + } else { + transferableSkusBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public Builder addTransferableSkus( + int index, com.google.cloud.channel.v1.TransferableSku value) { + if (transferableSkusBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureTransferableSkusIsMutable(); + transferableSkus_.add(index, value); + onChanged(); + } else { + transferableSkusBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public Builder addTransferableSkus( + com.google.cloud.channel.v1.TransferableSku.Builder builderForValue) { + if (transferableSkusBuilder_ == null) { + ensureTransferableSkusIsMutable(); + transferableSkus_.add(builderForValue.build()); + onChanged(); + } else { + transferableSkusBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public Builder addTransferableSkus( + int index, com.google.cloud.channel.v1.TransferableSku.Builder builderForValue) { + if (transferableSkusBuilder_ == null) { + ensureTransferableSkusIsMutable(); + transferableSkus_.add(index, builderForValue.build()); + onChanged(); + } else { + transferableSkusBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public Builder addAllTransferableSkus( + java.lang.Iterable values) { + if (transferableSkusBuilder_ == null) { + ensureTransferableSkusIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, transferableSkus_); + onChanged(); + } else { + transferableSkusBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public Builder clearTransferableSkus() { + if (transferableSkusBuilder_ == null) { + transferableSkus_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + transferableSkusBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public Builder removeTransferableSkus(int index) { + if (transferableSkusBuilder_ == null) { + ensureTransferableSkusIsMutable(); + transferableSkus_.remove(index); + onChanged(); + } else { + transferableSkusBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public com.google.cloud.channel.v1.TransferableSku.Builder getTransferableSkusBuilder( + int index) { + return getTransferableSkusFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public com.google.cloud.channel.v1.TransferableSkuOrBuilder getTransferableSkusOrBuilder( + int index) { + if (transferableSkusBuilder_ == null) { + return transferableSkus_.get(index); + } else { + return transferableSkusBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public java.util.List + getTransferableSkusOrBuilderList() { + if (transferableSkusBuilder_ != null) { + return transferableSkusBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(transferableSkus_); + } + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public com.google.cloud.channel.v1.TransferableSku.Builder addTransferableSkusBuilder() { + return getTransferableSkusFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.TransferableSku.getDefaultInstance()); + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public com.google.cloud.channel.v1.TransferableSku.Builder addTransferableSkusBuilder( + int index) { + return getTransferableSkusFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.TransferableSku.getDefaultInstance()); + } + /** + * + * + *
+     * Information about existing SKUs for a customer that would need to be
+     * transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + public java.util.List + getTransferableSkusBuilderList() { + return getTransferableSkusFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.TransferableSku, + com.google.cloud.channel.v1.TransferableSku.Builder, + com.google.cloud.channel.v1.TransferableSkuOrBuilder> + getTransferableSkusFieldBuilder() { + if (transferableSkusBuilder_ == null) { + transferableSkusBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.TransferableSku, + com.google.cloud.channel.v1.TransferableSku.Builder, + com.google.cloud.channel.v1.TransferableSkuOrBuilder>( + transferableSkus_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + transferableSkus_ = null; + } + return transferableSkusBuilder_; + } + + private java.lang.Object nextPageToken_ = ""; + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain
+     * that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + public java.lang.String getNextPageToken() { + java.lang.Object ref = nextPageToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + nextPageToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain
+     * that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + public com.google.protobuf.ByteString getNextPageTokenBytes() { + java.lang.Object ref = nextPageToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + nextPageToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain
+     * that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + nextPageToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain
+     * that page.
+     * 
+ * + * string next_page_token = 2; + * + * @return This builder for chaining. + */ + public Builder clearNextPageToken() { + + nextPageToken_ = getDefaultInstance().getNextPageToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * A token to retrieve the next page of results.
+     * Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain
+     * that page.
+     * 
+ * + * string next_page_token = 2; + * + * @param value The bytes for nextPageToken to set. + * @return This builder for chaining. + */ + public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + nextPageToken_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ListTransferableSkusResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ListTransferableSkusResponse) + private static final com.google.cloud.channel.v1.ListTransferableSkusResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ListTransferableSkusResponse(); + } + + public static com.google.cloud.channel.v1.ListTransferableSkusResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ListTransferableSkusResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ListTransferableSkusResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ListTransferableSkusResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusResponseOrBuilder.java new file mode 100644 index 00000000..8da32efd --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ListTransferableSkusResponseOrBuilder.java @@ -0,0 +1,111 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ListTransferableSkusResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ListTransferableSkusResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Information about existing SKUs for a customer that would need to be
+   * transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + java.util.List getTransferableSkusList(); + /** + * + * + *
+   * Information about existing SKUs for a customer that would need to be
+   * transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + com.google.cloud.channel.v1.TransferableSku getTransferableSkus(int index); + /** + * + * + *
+   * Information about existing SKUs for a customer that would need to be
+   * transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + int getTransferableSkusCount(); + /** + * + * + *
+   * Information about existing SKUs for a customer that would need to be
+   * transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + java.util.List + getTransferableSkusOrBuilderList(); + /** + * + * + *
+   * Information about existing SKUs for a customer that would need to be
+   * transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.TransferableSku transferable_skus = 1; + */ + com.google.cloud.channel.v1.TransferableSkuOrBuilder getTransferableSkusOrBuilder(int index); + + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain
+   * that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The nextPageToken. + */ + java.lang.String getNextPageToken(); + /** + * + * + *
+   * A token to retrieve the next page of results.
+   * Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain
+   * that page.
+   * 
+ * + * string next_page_token = 2; + * + * @return The bytes for nextPageToken. + */ + com.google.protobuf.ByteString getNextPageTokenBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MarketingInfo.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MarketingInfo.java new file mode 100644 index 00000000..a781a32c --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MarketingInfo.java @@ -0,0 +1,1089 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/products.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Represents the marketing information for a Product, SKU or Offer.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.MarketingInfo} + */ +public final class MarketingInfo extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.MarketingInfo) + MarketingInfoOrBuilder { + private static final long serialVersionUID = 0L; + // Use MarketingInfo.newBuilder() to construct. + private MarketingInfo(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private MarketingInfo() { + displayName_ = ""; + description_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MarketingInfo(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private MarketingInfo( + 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(); + + displayName_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 26: + { + com.google.cloud.channel.v1.Media.Builder subBuilder = null; + if (defaultLogo_ != null) { + subBuilder = defaultLogo_.toBuilder(); + } + defaultLogo_ = + input.readMessage(com.google.cloud.channel.v1.Media.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(defaultLogo_); + defaultLogo_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_MarketingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_MarketingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.MarketingInfo.class, + com.google.cloud.channel.v1.MarketingInfo.Builder.class); + } + + public static final int DISPLAY_NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object displayName_; + /** + * + * + *
+   * Human readable name.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + @java.lang.Override + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } + } + /** + * + * + *
+   * Human readable name.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + @java.lang.Override + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Human readable description. Description can contain HTML.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Human readable description. Description can contain HTML.
+   * 
+ * + * 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 DEFAULT_LOGO_FIELD_NUMBER = 3; + private com.google.cloud.channel.v1.Media defaultLogo_; + /** + * + * + *
+   * Default logo.
+   * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + * + * @return Whether the defaultLogo field is set. + */ + @java.lang.Override + public boolean hasDefaultLogo() { + return defaultLogo_ != null; + } + /** + * + * + *
+   * Default logo.
+   * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + * + * @return The defaultLogo. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Media getDefaultLogo() { + return defaultLogo_ == null + ? com.google.cloud.channel.v1.Media.getDefaultInstance() + : defaultLogo_; + } + /** + * + * + *
+   * Default logo.
+   * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + */ + @java.lang.Override + public com.google.cloud.channel.v1.MediaOrBuilder getDefaultLogoOrBuilder() { + return getDefaultLogo(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getDisplayNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (defaultLogo_ != null) { + output.writeMessage(3, getDefaultLogo()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getDisplayNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, displayName_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (defaultLogo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getDefaultLogo()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.MarketingInfo)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.MarketingInfo other = + (com.google.cloud.channel.v1.MarketingInfo) obj; + + if (!getDisplayName().equals(other.getDisplayName())) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (hasDefaultLogo() != other.hasDefaultLogo()) return false; + if (hasDefaultLogo()) { + if (!getDefaultLogo().equals(other.getDefaultLogo())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DISPLAY_NAME_FIELD_NUMBER; + hash = (53 * hash) + getDisplayName().hashCode(); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + if (hasDefaultLogo()) { + hash = (37 * hash) + DEFAULT_LOGO_FIELD_NUMBER; + hash = (53 * hash) + getDefaultLogo().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.MarketingInfo parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.MarketingInfo parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.MarketingInfo parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.MarketingInfo parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.MarketingInfo parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.MarketingInfo parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.MarketingInfo parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.MarketingInfo parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.MarketingInfo parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.MarketingInfo parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.MarketingInfo parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.MarketingInfo parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.MarketingInfo prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 marketing information for a Product, SKU or Offer.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.MarketingInfo} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.MarketingInfo) + com.google.cloud.channel.v1.MarketingInfoOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_MarketingInfo_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_MarketingInfo_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.MarketingInfo.class, + com.google.cloud.channel.v1.MarketingInfo.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.MarketingInfo.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + displayName_ = ""; + + description_ = ""; + + if (defaultLogoBuilder_ == null) { + defaultLogo_ = null; + } else { + defaultLogo_ = null; + defaultLogoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_MarketingInfo_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.MarketingInfo getDefaultInstanceForType() { + return com.google.cloud.channel.v1.MarketingInfo.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.MarketingInfo build() { + com.google.cloud.channel.v1.MarketingInfo result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.MarketingInfo buildPartial() { + com.google.cloud.channel.v1.MarketingInfo result = + new com.google.cloud.channel.v1.MarketingInfo(this); + result.displayName_ = displayName_; + result.description_ = description_; + if (defaultLogoBuilder_ == null) { + result.defaultLogo_ = defaultLogo_; + } else { + result.defaultLogo_ = defaultLogoBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.MarketingInfo) { + return mergeFrom((com.google.cloud.channel.v1.MarketingInfo) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.MarketingInfo other) { + if (other == com.google.cloud.channel.v1.MarketingInfo.getDefaultInstance()) return this; + if (!other.getDisplayName().isEmpty()) { + displayName_ = other.displayName_; + onChanged(); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.hasDefaultLogo()) { + mergeDefaultLogo(other.getDefaultLogo()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.MarketingInfo parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.MarketingInfo) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object displayName_ = ""; + /** + * + * + *
+     * Human readable name.
+     * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + public java.lang.String getDisplayName() { + java.lang.Object ref = displayName_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + displayName_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Human readable name.
+     * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + public com.google.protobuf.ByteString getDisplayNameBytes() { + java.lang.Object ref = displayName_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + displayName_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Human readable name.
+     * 
+ * + * string display_name = 1; + * + * @param value The displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + displayName_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Human readable name.
+     * 
+ * + * string display_name = 1; + * + * @return This builder for chaining. + */ + public Builder clearDisplayName() { + + displayName_ = getDefaultInstance().getDisplayName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Human readable name.
+     * 
+ * + * string display_name = 1; + * + * @param value The bytes for displayName to set. + * @return This builder for chaining. + */ + public Builder setDisplayNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + displayName_ = value; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Human readable description. Description can contain HTML.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Human readable description. Description can contain HTML.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Human readable description. Description can contain HTML.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Human readable description. Description can contain HTML.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Human readable description. Description can contain HTML.
+     * 
+ * + * 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 com.google.cloud.channel.v1.Media defaultLogo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Media, + com.google.cloud.channel.v1.Media.Builder, + com.google.cloud.channel.v1.MediaOrBuilder> + defaultLogoBuilder_; + /** + * + * + *
+     * Default logo.
+     * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + * + * @return Whether the defaultLogo field is set. + */ + public boolean hasDefaultLogo() { + return defaultLogoBuilder_ != null || defaultLogo_ != null; + } + /** + * + * + *
+     * Default logo.
+     * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + * + * @return The defaultLogo. + */ + public com.google.cloud.channel.v1.Media getDefaultLogo() { + if (defaultLogoBuilder_ == null) { + return defaultLogo_ == null + ? com.google.cloud.channel.v1.Media.getDefaultInstance() + : defaultLogo_; + } else { + return defaultLogoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Default logo.
+     * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + */ + public Builder setDefaultLogo(com.google.cloud.channel.v1.Media value) { + if (defaultLogoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + defaultLogo_ = value; + onChanged(); + } else { + defaultLogoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Default logo.
+     * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + */ + public Builder setDefaultLogo(com.google.cloud.channel.v1.Media.Builder builderForValue) { + if (defaultLogoBuilder_ == null) { + defaultLogo_ = builderForValue.build(); + onChanged(); + } else { + defaultLogoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Default logo.
+     * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + */ + public Builder mergeDefaultLogo(com.google.cloud.channel.v1.Media value) { + if (defaultLogoBuilder_ == null) { + if (defaultLogo_ != null) { + defaultLogo_ = + com.google.cloud.channel.v1.Media.newBuilder(defaultLogo_) + .mergeFrom(value) + .buildPartial(); + } else { + defaultLogo_ = value; + } + onChanged(); + } else { + defaultLogoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Default logo.
+     * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + */ + public Builder clearDefaultLogo() { + if (defaultLogoBuilder_ == null) { + defaultLogo_ = null; + onChanged(); + } else { + defaultLogo_ = null; + defaultLogoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Default logo.
+     * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + */ + public com.google.cloud.channel.v1.Media.Builder getDefaultLogoBuilder() { + + onChanged(); + return getDefaultLogoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Default logo.
+     * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + */ + public com.google.cloud.channel.v1.MediaOrBuilder getDefaultLogoOrBuilder() { + if (defaultLogoBuilder_ != null) { + return defaultLogoBuilder_.getMessageOrBuilder(); + } else { + return defaultLogo_ == null + ? com.google.cloud.channel.v1.Media.getDefaultInstance() + : defaultLogo_; + } + } + /** + * + * + *
+     * Default logo.
+     * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Media, + com.google.cloud.channel.v1.Media.Builder, + com.google.cloud.channel.v1.MediaOrBuilder> + getDefaultLogoFieldBuilder() { + if (defaultLogoBuilder_ == null) { + defaultLogoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Media, + com.google.cloud.channel.v1.Media.Builder, + com.google.cloud.channel.v1.MediaOrBuilder>( + getDefaultLogo(), getParentForChildren(), isClean()); + defaultLogo_ = null; + } + return defaultLogoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.MarketingInfo) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.MarketingInfo) + private static final com.google.cloud.channel.v1.MarketingInfo DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.MarketingInfo(); + } + + public static com.google.cloud.channel.v1.MarketingInfo getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public MarketingInfo parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new MarketingInfo(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.MarketingInfo getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MarketingInfoOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MarketingInfoOrBuilder.java new file mode 100644 index 00000000..43db2fbd --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MarketingInfoOrBuilder.java @@ -0,0 +1,110 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/products.proto + +package com.google.cloud.channel.v1; + +public interface MarketingInfoOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.MarketingInfo) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Human readable name.
+   * 
+ * + * string display_name = 1; + * + * @return The displayName. + */ + java.lang.String getDisplayName(); + /** + * + * + *
+   * Human readable name.
+   * 
+ * + * string display_name = 1; + * + * @return The bytes for displayName. + */ + com.google.protobuf.ByteString getDisplayNameBytes(); + + /** + * + * + *
+   * Human readable description. Description can contain HTML.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Human readable description. Description can contain HTML.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Default logo.
+   * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + * + * @return Whether the defaultLogo field is set. + */ + boolean hasDefaultLogo(); + /** + * + * + *
+   * Default logo.
+   * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + * + * @return The defaultLogo. + */ + com.google.cloud.channel.v1.Media getDefaultLogo(); + /** + * + * + *
+   * Default logo.
+   * 
+ * + * .google.cloud.channel.v1.Media default_logo = 3; + */ + com.google.cloud.channel.v1.MediaOrBuilder getDefaultLogoOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Media.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Media.java new file mode 100644 index 00000000..8028b316 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Media.java @@ -0,0 +1,960 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/products.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Represents media information.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Media} + */ +public final class Media extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Media) + MediaOrBuilder { + private static final long serialVersionUID = 0L; + // Use Media.newBuilder() to construct. + private Media(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Media() { + title_ = ""; + content_ = ""; + type_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Media(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Media( + 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(); + + title_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + content_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + type_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Media_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Media_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Media.class, + com.google.cloud.channel.v1.Media.Builder.class); + } + + public static final int TITLE_FIELD_NUMBER = 1; + private volatile java.lang.Object title_; + /** + * + * + *
+   * Title of the media.
+   * 
+ * + * string title = 1; + * + * @return The title. + */ + @java.lang.Override + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } + } + /** + * + * + *
+   * Title of the media.
+   * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + @java.lang.Override + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CONTENT_FIELD_NUMBER = 2; + private volatile java.lang.Object content_; + /** + * + * + *
+   * URL of the media.
+   * 
+ * + * string content = 2; + * + * @return The content. + */ + @java.lang.Override + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } + } + /** + * + * + *
+   * URL of the media.
+   * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + @java.lang.Override + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int TYPE_FIELD_NUMBER = 3; + private int type_; + /** + * + * + *
+   * Type of the media.
+   * 
+ * + * .google.cloud.channel.v1.MediaType type = 3; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+   * Type of the media.
+   * 
+ * + * .google.cloud.channel.v1.MediaType type = 3; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.channel.v1.MediaType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.MediaType result = + com.google.cloud.channel.v1.MediaType.valueOf(type_); + return result == null ? com.google.cloud.channel.v1.MediaType.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 (!getTitleBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, title_); + } + if (!getContentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, content_); + } + if (type_ != com.google.cloud.channel.v1.MediaType.MEDIA_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(3, type_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getTitleBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, title_); + } + if (!getContentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, content_); + } + if (type_ != com.google.cloud.channel.v1.MediaType.MEDIA_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, type_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Media)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Media other = (com.google.cloud.channel.v1.Media) obj; + + if (!getTitle().equals(other.getTitle())) return false; + if (!getContent().equals(other.getContent())) return false; + if (type_ != other.type_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TITLE_FIELD_NUMBER; + hash = (53 * hash) + getTitle().hashCode(); + hash = (37 * hash) + CONTENT_FIELD_NUMBER; + hash = (53 * hash) + getContent().hashCode(); + hash = (37 * hash) + TYPE_FIELD_NUMBER; + hash = (53 * hash) + type_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Media parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Media parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Media parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Media parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Media parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Media parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Media parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Media parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Media parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Media parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Media parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Media parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Media prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 media information.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Media} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Media) + com.google.cloud.channel.v1.MediaOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Media_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Media_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Media.class, + com.google.cloud.channel.v1.Media.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Media.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + title_ = ""; + + content_ = ""; + + type_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Media_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Media getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Media.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Media build() { + com.google.cloud.channel.v1.Media result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Media buildPartial() { + com.google.cloud.channel.v1.Media result = new com.google.cloud.channel.v1.Media(this); + result.title_ = title_; + result.content_ = content_; + result.type_ = type_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Media) { + return mergeFrom((com.google.cloud.channel.v1.Media) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Media other) { + if (other == com.google.cloud.channel.v1.Media.getDefaultInstance()) return this; + if (!other.getTitle().isEmpty()) { + title_ = other.title_; + onChanged(); + } + if (!other.getContent().isEmpty()) { + content_ = other.content_; + onChanged(); + } + if (other.type_ != 0) { + setTypeValue(other.getTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Media parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Media) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object title_ = ""; + /** + * + * + *
+     * Title of the media.
+     * 
+ * + * string title = 1; + * + * @return The title. + */ + public java.lang.String getTitle() { + java.lang.Object ref = title_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + title_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Title of the media.
+     * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + public com.google.protobuf.ByteString getTitleBytes() { + java.lang.Object ref = title_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + title_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Title of the media.
+     * 
+ * + * string title = 1; + * + * @param value The title to set. + * @return This builder for chaining. + */ + public Builder setTitle(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + title_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Title of the media.
+     * 
+ * + * string title = 1; + * + * @return This builder for chaining. + */ + public Builder clearTitle() { + + title_ = getDefaultInstance().getTitle(); + onChanged(); + return this; + } + /** + * + * + *
+     * Title of the media.
+     * 
+ * + * string title = 1; + * + * @param value The bytes for title to set. + * @return This builder for chaining. + */ + public Builder setTitleBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + title_ = value; + onChanged(); + return this; + } + + private java.lang.Object content_ = ""; + /** + * + * + *
+     * URL of the media.
+     * 
+ * + * string content = 2; + * + * @return The content. + */ + public java.lang.String getContent() { + java.lang.Object ref = content_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + content_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * URL of the media.
+     * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + public com.google.protobuf.ByteString getContentBytes() { + java.lang.Object ref = content_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + content_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * URL of the media.
+     * 
+ * + * string content = 2; + * + * @param value The content to set. + * @return This builder for chaining. + */ + public Builder setContent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + content_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * URL of the media.
+     * 
+ * + * string content = 2; + * + * @return This builder for chaining. + */ + public Builder clearContent() { + + content_ = getDefaultInstance().getContent(); + onChanged(); + return this; + } + /** + * + * + *
+     * URL of the media.
+     * 
+ * + * string content = 2; + * + * @param value The bytes for content to set. + * @return This builder for chaining. + */ + public Builder setContentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + content_ = value; + onChanged(); + return this; + } + + private int type_ = 0; + /** + * + * + *
+     * Type of the media.
+     * 
+ * + * .google.cloud.channel.v1.MediaType type = 3; + * + * @return The enum numeric value on the wire for type. + */ + @java.lang.Override + public int getTypeValue() { + return type_; + } + /** + * + * + *
+     * Type of the media.
+     * 
+ * + * .google.cloud.channel.v1.MediaType type = 3; + * + * @param value The enum numeric value on the wire for type to set. + * @return This builder for chaining. + */ + public Builder setTypeValue(int value) { + + type_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the media.
+     * 
+ * + * .google.cloud.channel.v1.MediaType type = 3; + * + * @return The type. + */ + @java.lang.Override + public com.google.cloud.channel.v1.MediaType getType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.MediaType result = + com.google.cloud.channel.v1.MediaType.valueOf(type_); + return result == null ? com.google.cloud.channel.v1.MediaType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Type of the media.
+     * 
+ * + * .google.cloud.channel.v1.MediaType type = 3; + * + * @param value The type to set. + * @return This builder for chaining. + */ + public Builder setType(com.google.cloud.channel.v1.MediaType value) { + if (value == null) { + throw new NullPointerException(); + } + + type_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Type of the media.
+     * 
+ * + * .google.cloud.channel.v1.MediaType type = 3; + * + * @return This builder for chaining. + */ + public Builder clearType() { + + type_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Media) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Media) + private static final com.google.cloud.channel.v1.Media DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Media(); + } + + public static com.google.cloud.channel.v1.Media getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Media parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Media(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Media getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MediaOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MediaOrBuilder.java new file mode 100644 index 00000000..8c8622d8 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MediaOrBuilder.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/cloud/channel/v1/products.proto + +package com.google.cloud.channel.v1; + +public interface MediaOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Media) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Title of the media.
+   * 
+ * + * string title = 1; + * + * @return The title. + */ + java.lang.String getTitle(); + /** + * + * + *
+   * Title of the media.
+   * 
+ * + * string title = 1; + * + * @return The bytes for title. + */ + com.google.protobuf.ByteString getTitleBytes(); + + /** + * + * + *
+   * URL of the media.
+   * 
+ * + * string content = 2; + * + * @return The content. + */ + java.lang.String getContent(); + /** + * + * + *
+   * URL of the media.
+   * 
+ * + * string content = 2; + * + * @return The bytes for content. + */ + com.google.protobuf.ByteString getContentBytes(); + + /** + * + * + *
+   * Type of the media.
+   * 
+ * + * .google.cloud.channel.v1.MediaType type = 3; + * + * @return The enum numeric value on the wire for type. + */ + int getTypeValue(); + /** + * + * + *
+   * Type of the media.
+   * 
+ * + * .google.cloud.channel.v1.MediaType type = 3; + * + * @return The type. + */ + com.google.cloud.channel.v1.MediaType getType(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MediaType.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MediaType.java new file mode 100644 index 00000000..81c8e6fe --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/MediaType.java @@ -0,0 +1,154 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/products.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Type of media used.
+ * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.MediaType} + */ +public enum MediaType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not used.
+   * 
+ * + * MEDIA_TYPE_UNSPECIFIED = 0; + */ + MEDIA_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Type of image.
+   * 
+ * + * MEDIA_TYPE_IMAGE = 1; + */ + MEDIA_TYPE_IMAGE(1), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not used.
+   * 
+ * + * MEDIA_TYPE_UNSPECIFIED = 0; + */ + public static final int MEDIA_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Type of image.
+   * 
+ * + * MEDIA_TYPE_IMAGE = 1; + */ + public static final int MEDIA_TYPE_IMAGE_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 MediaType 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 MediaType forNumber(int value) { + switch (value) { + case 0: + return MEDIA_TYPE_UNSPECIFIED; + case 1: + return MEDIA_TYPE_IMAGE; + 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 MediaType findValueByNumber(int number) { + return MediaType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.ProductsProto.getDescriptor().getEnumTypes().get(0); + } + + private static final MediaType[] VALUES = values(); + + public static MediaType 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 MediaType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.MediaType) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Offer.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Offer.java new file mode 100644 index 00000000..fe27ebea --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Offer.java @@ -0,0 +1,3287 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Represents an offer made to resellers for purchase.
+ * An offer is associated with a [Sku][google.cloud.channel.v1.Sku], has a plan for payment, a price, and
+ * defines the constraints for buying.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Offer} + */ +public final class Offer extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Offer) + OfferOrBuilder { + private static final long serialVersionUID = 0L; + // Use Offer.newBuilder() to construct. + private Offer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Offer() { + name_ = ""; + priceByResources_ = java.util.Collections.emptyList(); + parameterDefinitions_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Offer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Offer( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.channel.v1.MarketingInfo.Builder subBuilder = null; + if (marketingInfo_ != null) { + subBuilder = marketingInfo_.toBuilder(); + } + marketingInfo_ = + input.readMessage( + com.google.cloud.channel.v1.MarketingInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(marketingInfo_); + marketingInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.channel.v1.Sku.Builder subBuilder = null; + if (sku_ != null) { + subBuilder = sku_.toBuilder(); + } + sku_ = input.readMessage(com.google.cloud.channel.v1.Sku.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sku_); + sku_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.channel.v1.Plan.Builder subBuilder = null; + if (plan_ != null) { + subBuilder = plan_.toBuilder(); + } + plan_ = + input.readMessage(com.google.cloud.channel.v1.Plan.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(plan_); + plan_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + com.google.cloud.channel.v1.Constraints.Builder subBuilder = null; + if (constraints_ != null) { + subBuilder = constraints_.toBuilder(); + } + constraints_ = + input.readMessage( + com.google.cloud.channel.v1.Constraints.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(constraints_); + constraints_ = subBuilder.buildPartial(); + } + + break; + } + case 50: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + priceByResources_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + priceByResources_.add( + input.readMessage( + com.google.cloud.channel.v1.PriceByResource.parser(), extensionRegistry)); + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (startTime_ != null) { + subBuilder = startTime_.toBuilder(); + } + startTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(startTime_); + startTime_ = subBuilder.buildPartial(); + } + + break; + } + case 66: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + parameterDefinitions_ = + new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000002; + } + parameterDefinitions_.add( + input.readMessage( + com.google.cloud.channel.v1.ParameterDefinition.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)) { + priceByResources_ = java.util.Collections.unmodifiableList(priceByResources_); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + parameterDefinitions_ = java.util.Collections.unmodifiableList(parameterDefinitions_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Offer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Offer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Offer.class, + com.google.cloud.channel.v1.Offer.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource Name of the Offer.
+   * Format: accounts/{account_id}/offers/{offer_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 the Offer.
+   * Format: accounts/{account_id}/offers/{offer_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; + } + } + + public static final int MARKETING_INFO_FIELD_NUMBER = 2; + private com.google.cloud.channel.v1.MarketingInfo marketingInfo_; + /** + * + * + *
+   * Marketing information for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return Whether the marketingInfo field is set. + */ + @java.lang.Override + public boolean hasMarketingInfo() { + return marketingInfo_ != null; + } + /** + * + * + *
+   * Marketing information for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return The marketingInfo. + */ + @java.lang.Override + public com.google.cloud.channel.v1.MarketingInfo getMarketingInfo() { + return marketingInfo_ == null + ? com.google.cloud.channel.v1.MarketingInfo.getDefaultInstance() + : marketingInfo_; + } + /** + * + * + *
+   * Marketing information for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + @java.lang.Override + public com.google.cloud.channel.v1.MarketingInfoOrBuilder getMarketingInfoOrBuilder() { + return getMarketingInfo(); + } + + public static final int SKU_FIELD_NUMBER = 3; + private com.google.cloud.channel.v1.Sku sku_; + /** + * + * + *
+   * SKU the offer is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + * + * @return Whether the sku field is set. + */ + @java.lang.Override + public boolean hasSku() { + return sku_ != null; + } + /** + * + * + *
+   * SKU the offer is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + * + * @return The sku. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Sku getSku() { + return sku_ == null ? com.google.cloud.channel.v1.Sku.getDefaultInstance() : sku_; + } + /** + * + * + *
+   * SKU the offer is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + */ + @java.lang.Override + public com.google.cloud.channel.v1.SkuOrBuilder getSkuOrBuilder() { + return getSku(); + } + + public static final int PLAN_FIELD_NUMBER = 4; + private com.google.cloud.channel.v1.Plan plan_; + /** + * + * + *
+   * Describes the payment plan for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + * + * @return Whether the plan field is set. + */ + @java.lang.Override + public boolean hasPlan() { + return plan_ != null; + } + /** + * + * + *
+   * Describes the payment plan for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + * + * @return The plan. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Plan getPlan() { + return plan_ == null ? com.google.cloud.channel.v1.Plan.getDefaultInstance() : plan_; + } + /** + * + * + *
+   * Describes the payment plan for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PlanOrBuilder getPlanOrBuilder() { + return getPlan(); + } + + public static final int CONSTRAINTS_FIELD_NUMBER = 5; + private com.google.cloud.channel.v1.Constraints constraints_; + /** + * + * + *
+   * Constraints on transacting the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + * + * @return Whether the constraints field is set. + */ + @java.lang.Override + public boolean hasConstraints() { + return constraints_ != null; + } + /** + * + * + *
+   * Constraints on transacting the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + * + * @return The constraints. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Constraints getConstraints() { + return constraints_ == null + ? com.google.cloud.channel.v1.Constraints.getDefaultInstance() + : constraints_; + } + /** + * + * + *
+   * Constraints on transacting the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ConstraintsOrBuilder getConstraintsOrBuilder() { + return getConstraints(); + } + + public static final int PRICE_BY_RESOURCES_FIELD_NUMBER = 6; + private java.util.List priceByResources_; + /** + * + * + *
+   * Price for each monetizable resource type.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + @java.lang.Override + public java.util.List getPriceByResourcesList() { + return priceByResources_; + } + /** + * + * + *
+   * Price for each monetizable resource type.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + @java.lang.Override + public java.util.List + getPriceByResourcesOrBuilderList() { + return priceByResources_; + } + /** + * + * + *
+   * Price for each monetizable resource type.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + @java.lang.Override + public int getPriceByResourcesCount() { + return priceByResources_.size(); + } + /** + * + * + *
+   * Price for each monetizable resource type.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PriceByResource getPriceByResources(int index) { + return priceByResources_.get(index); + } + /** + * + * + *
+   * Price for each monetizable resource type.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PriceByResourceOrBuilder getPriceByResourcesOrBuilder( + int index) { + return priceByResources_.get(index); + } + + public static final int START_TIME_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp startTime_; + /** + * + * + *
+   * Start of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * + * @return Whether the startTime field is set. + */ + @java.lang.Override + public boolean hasStartTime() { + return startTime_ != null; + } + /** + * + * + *
+   * Start of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * + * @return The startTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getStartTime() { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + /** + * + * + *
+   * Start of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + return getStartTime(); + } + + public static final int END_TIME_FIELD_NUMBER = 8; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Output only. End of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Output only. End of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Output only. End of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + public static final int PARAMETER_DEFINITIONS_FIELD_NUMBER = 9; + private java.util.List parameterDefinitions_; + /** + * + * + *
+   * Parameters required to use current Offer to purchase.
+   * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + @java.lang.Override + public java.util.List + getParameterDefinitionsList() { + return parameterDefinitions_; + } + /** + * + * + *
+   * Parameters required to use current Offer to purchase.
+   * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + @java.lang.Override + public java.util.List + getParameterDefinitionsOrBuilderList() { + return parameterDefinitions_; + } + /** + * + * + *
+   * Parameters required to use current Offer to purchase.
+   * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + @java.lang.Override + public int getParameterDefinitionsCount() { + return parameterDefinitions_.size(); + } + /** + * + * + *
+   * Parameters required to use current Offer to purchase.
+   * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ParameterDefinition getParameterDefinitions(int index) { + return parameterDefinitions_.get(index); + } + /** + * + * + *
+   * Parameters required to use current Offer to purchase.
+   * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ParameterDefinitionOrBuilder getParameterDefinitionsOrBuilder( + int index) { + return parameterDefinitions_.get(index); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (marketingInfo_ != null) { + output.writeMessage(2, getMarketingInfo()); + } + if (sku_ != null) { + output.writeMessage(3, getSku()); + } + if (plan_ != null) { + output.writeMessage(4, getPlan()); + } + if (constraints_ != null) { + output.writeMessage(5, getConstraints()); + } + for (int i = 0; i < priceByResources_.size(); i++) { + output.writeMessage(6, priceByResources_.get(i)); + } + if (startTime_ != null) { + output.writeMessage(7, getStartTime()); + } + if (endTime_ != null) { + output.writeMessage(8, getEndTime()); + } + for (int i = 0; i < parameterDefinitions_.size(); i++) { + output.writeMessage(9, parameterDefinitions_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (marketingInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMarketingInfo()); + } + if (sku_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getSku()); + } + if (plan_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPlan()); + } + if (constraints_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, getConstraints()); + } + for (int i = 0; i < priceByResources_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, priceByResources_.get(i)); + } + if (startTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getStartTime()); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, getEndTime()); + } + for (int i = 0; i < parameterDefinitions_.size(); i++) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(9, parameterDefinitions_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Offer)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Offer other = (com.google.cloud.channel.v1.Offer) obj; + + if (!getName().equals(other.getName())) return false; + if (hasMarketingInfo() != other.hasMarketingInfo()) return false; + if (hasMarketingInfo()) { + if (!getMarketingInfo().equals(other.getMarketingInfo())) return false; + } + if (hasSku() != other.hasSku()) return false; + if (hasSku()) { + if (!getSku().equals(other.getSku())) return false; + } + if (hasPlan() != other.hasPlan()) return false; + if (hasPlan()) { + if (!getPlan().equals(other.getPlan())) return false; + } + if (hasConstraints() != other.hasConstraints()) return false; + if (hasConstraints()) { + if (!getConstraints().equals(other.getConstraints())) return false; + } + if (!getPriceByResourcesList().equals(other.getPriceByResourcesList())) return false; + if (hasStartTime() != other.hasStartTime()) return false; + if (hasStartTime()) { + if (!getStartTime().equals(other.getStartTime())) return false; + } + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!getParameterDefinitionsList().equals(other.getParameterDefinitionsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasMarketingInfo()) { + hash = (37 * hash) + MARKETING_INFO_FIELD_NUMBER; + hash = (53 * hash) + getMarketingInfo().hashCode(); + } + if (hasSku()) { + hash = (37 * hash) + SKU_FIELD_NUMBER; + hash = (53 * hash) + getSku().hashCode(); + } + if (hasPlan()) { + hash = (37 * hash) + PLAN_FIELD_NUMBER; + hash = (53 * hash) + getPlan().hashCode(); + } + if (hasConstraints()) { + hash = (37 * hash) + CONSTRAINTS_FIELD_NUMBER; + hash = (53 * hash) + getConstraints().hashCode(); + } + if (getPriceByResourcesCount() > 0) { + hash = (37 * hash) + PRICE_BY_RESOURCES_FIELD_NUMBER; + hash = (53 * hash) + getPriceByResourcesList().hashCode(); + } + if (hasStartTime()) { + hash = (37 * hash) + START_TIME_FIELD_NUMBER; + hash = (53 * hash) + getStartTime().hashCode(); + } + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + if (getParameterDefinitionsCount() > 0) { + hash = (37 * hash) + PARAMETER_DEFINITIONS_FIELD_NUMBER; + hash = (53 * hash) + getParameterDefinitionsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Offer parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Offer parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Offer parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Offer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Offer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Offer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Offer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Offer parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Offer parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Offer parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Offer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Offer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Offer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 an offer made to resellers for purchase.
+   * An offer is associated with a [Sku][google.cloud.channel.v1.Sku], has a plan for payment, a price, and
+   * defines the constraints for buying.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Offer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Offer) + com.google.cloud.channel.v1.OfferOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Offer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Offer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Offer.class, + com.google.cloud.channel.v1.Offer.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Offer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPriceByResourcesFieldBuilder(); + getParameterDefinitionsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (marketingInfoBuilder_ == null) { + marketingInfo_ = null; + } else { + marketingInfo_ = null; + marketingInfoBuilder_ = null; + } + if (skuBuilder_ == null) { + sku_ = null; + } else { + sku_ = null; + skuBuilder_ = null; + } + if (planBuilder_ == null) { + plan_ = null; + } else { + plan_ = null; + planBuilder_ = null; + } + if (constraintsBuilder_ == null) { + constraints_ = null; + } else { + constraints_ = null; + constraintsBuilder_ = null; + } + if (priceByResourcesBuilder_ == null) { + priceByResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + priceByResourcesBuilder_.clear(); + } + if (startTimeBuilder_ == null) { + startTime_ = null; + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + if (parameterDefinitionsBuilder_ == null) { + parameterDefinitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + } else { + parameterDefinitionsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Offer_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Offer getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Offer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Offer build() { + com.google.cloud.channel.v1.Offer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Offer buildPartial() { + com.google.cloud.channel.v1.Offer result = new com.google.cloud.channel.v1.Offer(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + if (marketingInfoBuilder_ == null) { + result.marketingInfo_ = marketingInfo_; + } else { + result.marketingInfo_ = marketingInfoBuilder_.build(); + } + if (skuBuilder_ == null) { + result.sku_ = sku_; + } else { + result.sku_ = skuBuilder_.build(); + } + if (planBuilder_ == null) { + result.plan_ = plan_; + } else { + result.plan_ = planBuilder_.build(); + } + if (constraintsBuilder_ == null) { + result.constraints_ = constraints_; + } else { + result.constraints_ = constraintsBuilder_.build(); + } + if (priceByResourcesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + priceByResources_ = java.util.Collections.unmodifiableList(priceByResources_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.priceByResources_ = priceByResources_; + } else { + result.priceByResources_ = priceByResourcesBuilder_.build(); + } + if (startTimeBuilder_ == null) { + result.startTime_ = startTime_; + } else { + result.startTime_ = startTimeBuilder_.build(); + } + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + if (parameterDefinitionsBuilder_ == null) { + if (((bitField0_ & 0x00000002) != 0)) { + parameterDefinitions_ = java.util.Collections.unmodifiableList(parameterDefinitions_); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.parameterDefinitions_ = parameterDefinitions_; + } else { + result.parameterDefinitions_ = parameterDefinitionsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Offer) { + return mergeFrom((com.google.cloud.channel.v1.Offer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Offer other) { + if (other == com.google.cloud.channel.v1.Offer.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasMarketingInfo()) { + mergeMarketingInfo(other.getMarketingInfo()); + } + if (other.hasSku()) { + mergeSku(other.getSku()); + } + if (other.hasPlan()) { + mergePlan(other.getPlan()); + } + if (other.hasConstraints()) { + mergeConstraints(other.getConstraints()); + } + if (priceByResourcesBuilder_ == null) { + if (!other.priceByResources_.isEmpty()) { + if (priceByResources_.isEmpty()) { + priceByResources_ = other.priceByResources_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePriceByResourcesIsMutable(); + priceByResources_.addAll(other.priceByResources_); + } + onChanged(); + } + } else { + if (!other.priceByResources_.isEmpty()) { + if (priceByResourcesBuilder_.isEmpty()) { + priceByResourcesBuilder_.dispose(); + priceByResourcesBuilder_ = null; + priceByResources_ = other.priceByResources_; + bitField0_ = (bitField0_ & ~0x00000001); + priceByResourcesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPriceByResourcesFieldBuilder() + : null; + } else { + priceByResourcesBuilder_.addAllMessages(other.priceByResources_); + } + } + } + if (other.hasStartTime()) { + mergeStartTime(other.getStartTime()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + if (parameterDefinitionsBuilder_ == null) { + if (!other.parameterDefinitions_.isEmpty()) { + if (parameterDefinitions_.isEmpty()) { + parameterDefinitions_ = other.parameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureParameterDefinitionsIsMutable(); + parameterDefinitions_.addAll(other.parameterDefinitions_); + } + onChanged(); + } + } else { + if (!other.parameterDefinitions_.isEmpty()) { + if (parameterDefinitionsBuilder_.isEmpty()) { + parameterDefinitionsBuilder_.dispose(); + parameterDefinitionsBuilder_ = null; + parameterDefinitions_ = other.parameterDefinitions_; + bitField0_ = (bitField0_ & ~0x00000002); + parameterDefinitionsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getParameterDefinitionsFieldBuilder() + : null; + } else { + parameterDefinitionsBuilder_.addAllMessages(other.parameterDefinitions_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Offer parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Offer) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource Name of the Offer.
+     * Format: accounts/{account_id}/offers/{offer_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 the Offer.
+     * Format: accounts/{account_id}/offers/{offer_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 the Offer.
+     * Format: accounts/{account_id}/offers/{offer_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 the Offer.
+     * Format: accounts/{account_id}/offers/{offer_id}
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource Name of the Offer.
+     * Format: accounts/{account_id}/offers/{offer_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; + } + + private com.google.cloud.channel.v1.MarketingInfo marketingInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.MarketingInfo, + com.google.cloud.channel.v1.MarketingInfo.Builder, + com.google.cloud.channel.v1.MarketingInfoOrBuilder> + marketingInfoBuilder_; + /** + * + * + *
+     * Marketing information for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return Whether the marketingInfo field is set. + */ + public boolean hasMarketingInfo() { + return marketingInfoBuilder_ != null || marketingInfo_ != null; + } + /** + * + * + *
+     * Marketing information for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return The marketingInfo. + */ + public com.google.cloud.channel.v1.MarketingInfo getMarketingInfo() { + if (marketingInfoBuilder_ == null) { + return marketingInfo_ == null + ? com.google.cloud.channel.v1.MarketingInfo.getDefaultInstance() + : marketingInfo_; + } else { + return marketingInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Marketing information for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder setMarketingInfo(com.google.cloud.channel.v1.MarketingInfo value) { + if (marketingInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + marketingInfo_ = value; + onChanged(); + } else { + marketingInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Marketing information for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder setMarketingInfo( + com.google.cloud.channel.v1.MarketingInfo.Builder builderForValue) { + if (marketingInfoBuilder_ == null) { + marketingInfo_ = builderForValue.build(); + onChanged(); + } else { + marketingInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Marketing information for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder mergeMarketingInfo(com.google.cloud.channel.v1.MarketingInfo value) { + if (marketingInfoBuilder_ == null) { + if (marketingInfo_ != null) { + marketingInfo_ = + com.google.cloud.channel.v1.MarketingInfo.newBuilder(marketingInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + marketingInfo_ = value; + } + onChanged(); + } else { + marketingInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Marketing information for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder clearMarketingInfo() { + if (marketingInfoBuilder_ == null) { + marketingInfo_ = null; + onChanged(); + } else { + marketingInfo_ = null; + marketingInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Marketing information for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public com.google.cloud.channel.v1.MarketingInfo.Builder getMarketingInfoBuilder() { + + onChanged(); + return getMarketingInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Marketing information for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public com.google.cloud.channel.v1.MarketingInfoOrBuilder getMarketingInfoOrBuilder() { + if (marketingInfoBuilder_ != null) { + return marketingInfoBuilder_.getMessageOrBuilder(); + } else { + return marketingInfo_ == null + ? com.google.cloud.channel.v1.MarketingInfo.getDefaultInstance() + : marketingInfo_; + } + } + /** + * + * + *
+     * Marketing information for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.MarketingInfo, + com.google.cloud.channel.v1.MarketingInfo.Builder, + com.google.cloud.channel.v1.MarketingInfoOrBuilder> + getMarketingInfoFieldBuilder() { + if (marketingInfoBuilder_ == null) { + marketingInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.MarketingInfo, + com.google.cloud.channel.v1.MarketingInfo.Builder, + com.google.cloud.channel.v1.MarketingInfoOrBuilder>( + getMarketingInfo(), getParentForChildren(), isClean()); + marketingInfo_ = null; + } + return marketingInfoBuilder_; + } + + private com.google.cloud.channel.v1.Sku sku_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder> + skuBuilder_; + /** + * + * + *
+     * SKU the offer is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + * + * @return Whether the sku field is set. + */ + public boolean hasSku() { + return skuBuilder_ != null || sku_ != null; + } + /** + * + * + *
+     * SKU the offer is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + * + * @return The sku. + */ + public com.google.cloud.channel.v1.Sku getSku() { + if (skuBuilder_ == null) { + return sku_ == null ? com.google.cloud.channel.v1.Sku.getDefaultInstance() : sku_; + } else { + return skuBuilder_.getMessage(); + } + } + /** + * + * + *
+     * SKU the offer is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + */ + public Builder setSku(com.google.cloud.channel.v1.Sku value) { + if (skuBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sku_ = value; + onChanged(); + } else { + skuBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * SKU the offer is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + */ + public Builder setSku(com.google.cloud.channel.v1.Sku.Builder builderForValue) { + if (skuBuilder_ == null) { + sku_ = builderForValue.build(); + onChanged(); + } else { + skuBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * SKU the offer is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + */ + public Builder mergeSku(com.google.cloud.channel.v1.Sku value) { + if (skuBuilder_ == null) { + if (sku_ != null) { + sku_ = com.google.cloud.channel.v1.Sku.newBuilder(sku_).mergeFrom(value).buildPartial(); + } else { + sku_ = value; + } + onChanged(); + } else { + skuBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * SKU the offer is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + */ + public Builder clearSku() { + if (skuBuilder_ == null) { + sku_ = null; + onChanged(); + } else { + sku_ = null; + skuBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * SKU the offer is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + */ + public com.google.cloud.channel.v1.Sku.Builder getSkuBuilder() { + + onChanged(); + return getSkuFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * SKU the offer is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + */ + public com.google.cloud.channel.v1.SkuOrBuilder getSkuOrBuilder() { + if (skuBuilder_ != null) { + return skuBuilder_.getMessageOrBuilder(); + } else { + return sku_ == null ? com.google.cloud.channel.v1.Sku.getDefaultInstance() : sku_; + } + } + /** + * + * + *
+     * SKU the offer is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder> + getSkuFieldBuilder() { + if (skuBuilder_ == null) { + skuBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder>( + getSku(), getParentForChildren(), isClean()); + sku_ = null; + } + return skuBuilder_; + } + + private com.google.cloud.channel.v1.Plan plan_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Plan, + com.google.cloud.channel.v1.Plan.Builder, + com.google.cloud.channel.v1.PlanOrBuilder> + planBuilder_; + /** + * + * + *
+     * Describes the payment plan for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + * + * @return Whether the plan field is set. + */ + public boolean hasPlan() { + return planBuilder_ != null || plan_ != null; + } + /** + * + * + *
+     * Describes the payment plan for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + * + * @return The plan. + */ + public com.google.cloud.channel.v1.Plan getPlan() { + if (planBuilder_ == null) { + return plan_ == null ? com.google.cloud.channel.v1.Plan.getDefaultInstance() : plan_; + } else { + return planBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Describes the payment plan for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + */ + public Builder setPlan(com.google.cloud.channel.v1.Plan value) { + if (planBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + plan_ = value; + onChanged(); + } else { + planBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Describes the payment plan for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + */ + public Builder setPlan(com.google.cloud.channel.v1.Plan.Builder builderForValue) { + if (planBuilder_ == null) { + plan_ = builderForValue.build(); + onChanged(); + } else { + planBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Describes the payment plan for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + */ + public Builder mergePlan(com.google.cloud.channel.v1.Plan value) { + if (planBuilder_ == null) { + if (plan_ != null) { + plan_ = + com.google.cloud.channel.v1.Plan.newBuilder(plan_).mergeFrom(value).buildPartial(); + } else { + plan_ = value; + } + onChanged(); + } else { + planBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Describes the payment plan for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + */ + public Builder clearPlan() { + if (planBuilder_ == null) { + plan_ = null; + onChanged(); + } else { + plan_ = null; + planBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Describes the payment plan for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + */ + public com.google.cloud.channel.v1.Plan.Builder getPlanBuilder() { + + onChanged(); + return getPlanFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Describes the payment plan for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + */ + public com.google.cloud.channel.v1.PlanOrBuilder getPlanOrBuilder() { + if (planBuilder_ != null) { + return planBuilder_.getMessageOrBuilder(); + } else { + return plan_ == null ? com.google.cloud.channel.v1.Plan.getDefaultInstance() : plan_; + } + } + /** + * + * + *
+     * Describes the payment plan for the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Plan, + com.google.cloud.channel.v1.Plan.Builder, + com.google.cloud.channel.v1.PlanOrBuilder> + getPlanFieldBuilder() { + if (planBuilder_ == null) { + planBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Plan, + com.google.cloud.channel.v1.Plan.Builder, + com.google.cloud.channel.v1.PlanOrBuilder>( + getPlan(), getParentForChildren(), isClean()); + plan_ = null; + } + return planBuilder_; + } + + private com.google.cloud.channel.v1.Constraints constraints_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Constraints, + com.google.cloud.channel.v1.Constraints.Builder, + com.google.cloud.channel.v1.ConstraintsOrBuilder> + constraintsBuilder_; + /** + * + * + *
+     * Constraints on transacting the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + * + * @return Whether the constraints field is set. + */ + public boolean hasConstraints() { + return constraintsBuilder_ != null || constraints_ != null; + } + /** + * + * + *
+     * Constraints on transacting the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + * + * @return The constraints. + */ + public com.google.cloud.channel.v1.Constraints getConstraints() { + if (constraintsBuilder_ == null) { + return constraints_ == null + ? com.google.cloud.channel.v1.Constraints.getDefaultInstance() + : constraints_; + } else { + return constraintsBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Constraints on transacting the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + */ + public Builder setConstraints(com.google.cloud.channel.v1.Constraints value) { + if (constraintsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + constraints_ = value; + onChanged(); + } else { + constraintsBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Constraints on transacting the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + */ + public Builder setConstraints(com.google.cloud.channel.v1.Constraints.Builder builderForValue) { + if (constraintsBuilder_ == null) { + constraints_ = builderForValue.build(); + onChanged(); + } else { + constraintsBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Constraints on transacting the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + */ + public Builder mergeConstraints(com.google.cloud.channel.v1.Constraints value) { + if (constraintsBuilder_ == null) { + if (constraints_ != null) { + constraints_ = + com.google.cloud.channel.v1.Constraints.newBuilder(constraints_) + .mergeFrom(value) + .buildPartial(); + } else { + constraints_ = value; + } + onChanged(); + } else { + constraintsBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Constraints on transacting the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + */ + public Builder clearConstraints() { + if (constraintsBuilder_ == null) { + constraints_ = null; + onChanged(); + } else { + constraints_ = null; + constraintsBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Constraints on transacting the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + */ + public com.google.cloud.channel.v1.Constraints.Builder getConstraintsBuilder() { + + onChanged(); + return getConstraintsFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Constraints on transacting the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + */ + public com.google.cloud.channel.v1.ConstraintsOrBuilder getConstraintsOrBuilder() { + if (constraintsBuilder_ != null) { + return constraintsBuilder_.getMessageOrBuilder(); + } else { + return constraints_ == null + ? com.google.cloud.channel.v1.Constraints.getDefaultInstance() + : constraints_; + } + } + /** + * + * + *
+     * Constraints on transacting the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Constraints, + com.google.cloud.channel.v1.Constraints.Builder, + com.google.cloud.channel.v1.ConstraintsOrBuilder> + getConstraintsFieldBuilder() { + if (constraintsBuilder_ == null) { + constraintsBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Constraints, + com.google.cloud.channel.v1.Constraints.Builder, + com.google.cloud.channel.v1.ConstraintsOrBuilder>( + getConstraints(), getParentForChildren(), isClean()); + constraints_ = null; + } + return constraintsBuilder_; + } + + private java.util.List priceByResources_ = + java.util.Collections.emptyList(); + + private void ensurePriceByResourcesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + priceByResources_ = + new java.util.ArrayList(priceByResources_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PriceByResource, + com.google.cloud.channel.v1.PriceByResource.Builder, + com.google.cloud.channel.v1.PriceByResourceOrBuilder> + priceByResourcesBuilder_; + + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public java.util.List getPriceByResourcesList() { + if (priceByResourcesBuilder_ == null) { + return java.util.Collections.unmodifiableList(priceByResources_); + } else { + return priceByResourcesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public int getPriceByResourcesCount() { + if (priceByResourcesBuilder_ == null) { + return priceByResources_.size(); + } else { + return priceByResourcesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public com.google.cloud.channel.v1.PriceByResource getPriceByResources(int index) { + if (priceByResourcesBuilder_ == null) { + return priceByResources_.get(index); + } else { + return priceByResourcesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public Builder setPriceByResources( + int index, com.google.cloud.channel.v1.PriceByResource value) { + if (priceByResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePriceByResourcesIsMutable(); + priceByResources_.set(index, value); + onChanged(); + } else { + priceByResourcesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public Builder setPriceByResources( + int index, com.google.cloud.channel.v1.PriceByResource.Builder builderForValue) { + if (priceByResourcesBuilder_ == null) { + ensurePriceByResourcesIsMutable(); + priceByResources_.set(index, builderForValue.build()); + onChanged(); + } else { + priceByResourcesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public Builder addPriceByResources(com.google.cloud.channel.v1.PriceByResource value) { + if (priceByResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePriceByResourcesIsMutable(); + priceByResources_.add(value); + onChanged(); + } else { + priceByResourcesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public Builder addPriceByResources( + int index, com.google.cloud.channel.v1.PriceByResource value) { + if (priceByResourcesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePriceByResourcesIsMutable(); + priceByResources_.add(index, value); + onChanged(); + } else { + priceByResourcesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public Builder addPriceByResources( + com.google.cloud.channel.v1.PriceByResource.Builder builderForValue) { + if (priceByResourcesBuilder_ == null) { + ensurePriceByResourcesIsMutable(); + priceByResources_.add(builderForValue.build()); + onChanged(); + } else { + priceByResourcesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public Builder addPriceByResources( + int index, com.google.cloud.channel.v1.PriceByResource.Builder builderForValue) { + if (priceByResourcesBuilder_ == null) { + ensurePriceByResourcesIsMutable(); + priceByResources_.add(index, builderForValue.build()); + onChanged(); + } else { + priceByResourcesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public Builder addAllPriceByResources( + java.lang.Iterable values) { + if (priceByResourcesBuilder_ == null) { + ensurePriceByResourcesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, priceByResources_); + onChanged(); + } else { + priceByResourcesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public Builder clearPriceByResources() { + if (priceByResourcesBuilder_ == null) { + priceByResources_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + priceByResourcesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public Builder removePriceByResources(int index) { + if (priceByResourcesBuilder_ == null) { + ensurePriceByResourcesIsMutable(); + priceByResources_.remove(index); + onChanged(); + } else { + priceByResourcesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public com.google.cloud.channel.v1.PriceByResource.Builder getPriceByResourcesBuilder( + int index) { + return getPriceByResourcesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public com.google.cloud.channel.v1.PriceByResourceOrBuilder getPriceByResourcesOrBuilder( + int index) { + if (priceByResourcesBuilder_ == null) { + return priceByResources_.get(index); + } else { + return priceByResourcesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public java.util.List + getPriceByResourcesOrBuilderList() { + if (priceByResourcesBuilder_ != null) { + return priceByResourcesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(priceByResources_); + } + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public com.google.cloud.channel.v1.PriceByResource.Builder addPriceByResourcesBuilder() { + return getPriceByResourcesFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.PriceByResource.getDefaultInstance()); + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public com.google.cloud.channel.v1.PriceByResource.Builder addPriceByResourcesBuilder( + int index) { + return getPriceByResourcesFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.PriceByResource.getDefaultInstance()); + } + /** + * + * + *
+     * Price for each monetizable resource type.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + public java.util.List + getPriceByResourcesBuilderList() { + return getPriceByResourcesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PriceByResource, + com.google.cloud.channel.v1.PriceByResource.Builder, + com.google.cloud.channel.v1.PriceByResourceOrBuilder> + getPriceByResourcesFieldBuilder() { + if (priceByResourcesBuilder_ == null) { + priceByResourcesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PriceByResource, + com.google.cloud.channel.v1.PriceByResource.Builder, + com.google.cloud.channel.v1.PriceByResourceOrBuilder>( + priceByResources_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + priceByResources_ = null; + } + return priceByResourcesBuilder_; + } + + 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_; + /** + * + * + *
+     * Start of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * + * @return Whether the startTime field is set. + */ + public boolean hasStartTime() { + return startTimeBuilder_ != null || startTime_ != null; + } + /** + * + * + *
+     * Start of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * + * @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(); + } + } + /** + * + * + *
+     * Start of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + 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; + } + /** + * + * + *
+     * Start of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + public Builder setStartTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (startTimeBuilder_ == null) { + startTime_ = builderForValue.build(); + onChanged(); + } else { + startTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Start of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + 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; + } + /** + * + * + *
+     * Start of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + public Builder clearStartTime() { + if (startTimeBuilder_ == null) { + startTime_ = null; + onChanged(); + } else { + startTime_ = null; + startTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Start of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + public com.google.protobuf.Timestamp.Builder getStartTimeBuilder() { + + onChanged(); + return getStartTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Start of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + public com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder() { + if (startTimeBuilder_ != null) { + return startTimeBuilder_.getMessageOrBuilder(); + } else { + return startTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : startTime_; + } + } + /** + * + * + *
+     * Start of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getStartTimeFieldBuilder() { + if (startTimeBuilder_ == null) { + startTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getStartTime(), getParentForChildren(), isClean()); + startTime_ = null; + } + return startTimeBuilder_; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Output only. End of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Output only. End of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Output only. End of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Output only. End of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Output only. End of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Output only. End of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Output only. End of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Output only. End of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Output only. End of the Offer validity time.
+     * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + private java.util.List parameterDefinitions_ = + java.util.Collections.emptyList(); + + private void ensureParameterDefinitionsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + parameterDefinitions_ = + new java.util.ArrayList( + parameterDefinitions_); + bitField0_ |= 0x00000002; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.ParameterDefinition, + com.google.cloud.channel.v1.ParameterDefinition.Builder, + com.google.cloud.channel.v1.ParameterDefinitionOrBuilder> + parameterDefinitionsBuilder_; + + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public java.util.List + getParameterDefinitionsList() { + if (parameterDefinitionsBuilder_ == null) { + return java.util.Collections.unmodifiableList(parameterDefinitions_); + } else { + return parameterDefinitionsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public int getParameterDefinitionsCount() { + if (parameterDefinitionsBuilder_ == null) { + return parameterDefinitions_.size(); + } else { + return parameterDefinitionsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public com.google.cloud.channel.v1.ParameterDefinition getParameterDefinitions(int index) { + if (parameterDefinitionsBuilder_ == null) { + return parameterDefinitions_.get(index); + } else { + return parameterDefinitionsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public Builder setParameterDefinitions( + int index, com.google.cloud.channel.v1.ParameterDefinition value) { + if (parameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParameterDefinitionsIsMutable(); + parameterDefinitions_.set(index, value); + onChanged(); + } else { + parameterDefinitionsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public Builder setParameterDefinitions( + int index, com.google.cloud.channel.v1.ParameterDefinition.Builder builderForValue) { + if (parameterDefinitionsBuilder_ == null) { + ensureParameterDefinitionsIsMutable(); + parameterDefinitions_.set(index, builderForValue.build()); + onChanged(); + } else { + parameterDefinitionsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public Builder addParameterDefinitions(com.google.cloud.channel.v1.ParameterDefinition value) { + if (parameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParameterDefinitionsIsMutable(); + parameterDefinitions_.add(value); + onChanged(); + } else { + parameterDefinitionsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public Builder addParameterDefinitions( + int index, com.google.cloud.channel.v1.ParameterDefinition value) { + if (parameterDefinitionsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureParameterDefinitionsIsMutable(); + parameterDefinitions_.add(index, value); + onChanged(); + } else { + parameterDefinitionsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public Builder addParameterDefinitions( + com.google.cloud.channel.v1.ParameterDefinition.Builder builderForValue) { + if (parameterDefinitionsBuilder_ == null) { + ensureParameterDefinitionsIsMutable(); + parameterDefinitions_.add(builderForValue.build()); + onChanged(); + } else { + parameterDefinitionsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public Builder addParameterDefinitions( + int index, com.google.cloud.channel.v1.ParameterDefinition.Builder builderForValue) { + if (parameterDefinitionsBuilder_ == null) { + ensureParameterDefinitionsIsMutable(); + parameterDefinitions_.add(index, builderForValue.build()); + onChanged(); + } else { + parameterDefinitionsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public Builder addAllParameterDefinitions( + java.lang.Iterable values) { + if (parameterDefinitionsBuilder_ == null) { + ensureParameterDefinitionsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, parameterDefinitions_); + onChanged(); + } else { + parameterDefinitionsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public Builder clearParameterDefinitions() { + if (parameterDefinitionsBuilder_ == null) { + parameterDefinitions_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + } else { + parameterDefinitionsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public Builder removeParameterDefinitions(int index) { + if (parameterDefinitionsBuilder_ == null) { + ensureParameterDefinitionsIsMutable(); + parameterDefinitions_.remove(index); + onChanged(); + } else { + parameterDefinitionsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public com.google.cloud.channel.v1.ParameterDefinition.Builder getParameterDefinitionsBuilder( + int index) { + return getParameterDefinitionsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public com.google.cloud.channel.v1.ParameterDefinitionOrBuilder + getParameterDefinitionsOrBuilder(int index) { + if (parameterDefinitionsBuilder_ == null) { + return parameterDefinitions_.get(index); + } else { + return parameterDefinitionsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public java.util.List + getParameterDefinitionsOrBuilderList() { + if (parameterDefinitionsBuilder_ != null) { + return parameterDefinitionsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(parameterDefinitions_); + } + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public com.google.cloud.channel.v1.ParameterDefinition.Builder + addParameterDefinitionsBuilder() { + return getParameterDefinitionsFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.ParameterDefinition.getDefaultInstance()); + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public com.google.cloud.channel.v1.ParameterDefinition.Builder addParameterDefinitionsBuilder( + int index) { + return getParameterDefinitionsFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.ParameterDefinition.getDefaultInstance()); + } + /** + * + * + *
+     * Parameters required to use current Offer to purchase.
+     * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + public java.util.List + getParameterDefinitionsBuilderList() { + return getParameterDefinitionsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.ParameterDefinition, + com.google.cloud.channel.v1.ParameterDefinition.Builder, + com.google.cloud.channel.v1.ParameterDefinitionOrBuilder> + getParameterDefinitionsFieldBuilder() { + if (parameterDefinitionsBuilder_ == null) { + parameterDefinitionsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.ParameterDefinition, + com.google.cloud.channel.v1.ParameterDefinition.Builder, + com.google.cloud.channel.v1.ParameterDefinitionOrBuilder>( + parameterDefinitions_, + ((bitField0_ & 0x00000002) != 0), + getParentForChildren(), + isClean()); + parameterDefinitions_ = null; + } + return parameterDefinitionsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Offer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Offer) + private static final com.google.cloud.channel.v1.Offer DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Offer(); + } + + public static com.google.cloud.channel.v1.Offer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Offer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Offer(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Offer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OfferName.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OfferName.java new file mode 100644 index 00000000..55e2505b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OfferName.java @@ -0,0 +1,191 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class OfferName implements ResourceName { + private static final PathTemplate ACCOUNT_OFFER = + PathTemplate.createWithoutUrlEncoding("accounts/{account}/offers/{offer}"); + private volatile Map fieldValuesMap; + private final String account; + private final String offer; + + @Deprecated + protected OfferName() { + account = null; + offer = null; + } + + private OfferName(Builder builder) { + account = Preconditions.checkNotNull(builder.getAccount()); + offer = Preconditions.checkNotNull(builder.getOffer()); + } + + public String getAccount() { + return account; + } + + public String getOffer() { + return offer; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static OfferName of(String account, String offer) { + return newBuilder().setAccount(account).setOffer(offer).build(); + } + + public static String format(String account, String offer) { + return newBuilder().setAccount(account).setOffer(offer).build().toString(); + } + + public static OfferName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + ACCOUNT_OFFER.validatedMatch( + formattedString, "OfferName.parse: formattedString not in valid format"); + return of(matchMap.get("account"), matchMap.get("offer")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (OfferName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return ACCOUNT_OFFER.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (account != null) { + fieldMapBuilder.put("account", account); + } + if (offer != null) { + fieldMapBuilder.put("offer", offer); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return ACCOUNT_OFFER.instantiate("account", account, "offer", offer); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + OfferName that = ((OfferName) o); + return Objects.equals(this.account, that.account) && Objects.equals(this.offer, that.offer); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(account); + h *= 1000003; + h ^= Objects.hashCode(offer); + return h; + } + + /** Builder for accounts/{account}/offers/{offer}. */ + public static class Builder { + private String account; + private String offer; + + protected Builder() {} + + public String getAccount() { + return account; + } + + public String getOffer() { + return offer; + } + + public Builder setAccount(String account) { + this.account = account; + return this; + } + + public Builder setOffer(String offer) { + this.offer = offer; + return this; + } + + private Builder(OfferName offerName) { + account = offerName.account; + offer = offerName.offer; + } + + public OfferName build() { + return new OfferName(this); + } + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OfferOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OfferOrBuilder.java new file mode 100644 index 00000000..90f25a6d --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OfferOrBuilder.java @@ -0,0 +1,370 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +public interface OfferOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Offer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource Name of the Offer.
+   * Format: accounts/{account_id}/offers/{offer_id}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource Name of the Offer.
+   * Format: accounts/{account_id}/offers/{offer_id}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Marketing information for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return Whether the marketingInfo field is set. + */ + boolean hasMarketingInfo(); + /** + * + * + *
+   * Marketing information for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return The marketingInfo. + */ + com.google.cloud.channel.v1.MarketingInfo getMarketingInfo(); + /** + * + * + *
+   * Marketing information for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + com.google.cloud.channel.v1.MarketingInfoOrBuilder getMarketingInfoOrBuilder(); + + /** + * + * + *
+   * SKU the offer is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + * + * @return Whether the sku field is set. + */ + boolean hasSku(); + /** + * + * + *
+   * SKU the offer is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + * + * @return The sku. + */ + com.google.cloud.channel.v1.Sku getSku(); + /** + * + * + *
+   * SKU the offer is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 3; + */ + com.google.cloud.channel.v1.SkuOrBuilder getSkuOrBuilder(); + + /** + * + * + *
+   * Describes the payment plan for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + * + * @return Whether the plan field is set. + */ + boolean hasPlan(); + /** + * + * + *
+   * Describes the payment plan for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + * + * @return The plan. + */ + com.google.cloud.channel.v1.Plan getPlan(); + /** + * + * + *
+   * Describes the payment plan for the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Plan plan = 4; + */ + com.google.cloud.channel.v1.PlanOrBuilder getPlanOrBuilder(); + + /** + * + * + *
+   * Constraints on transacting the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + * + * @return Whether the constraints field is set. + */ + boolean hasConstraints(); + /** + * + * + *
+   * Constraints on transacting the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + * + * @return The constraints. + */ + com.google.cloud.channel.v1.Constraints getConstraints(); + /** + * + * + *
+   * Constraints on transacting the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Constraints constraints = 5; + */ + com.google.cloud.channel.v1.ConstraintsOrBuilder getConstraintsOrBuilder(); + + /** + * + * + *
+   * Price for each monetizable resource type.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + java.util.List getPriceByResourcesList(); + /** + * + * + *
+   * Price for each monetizable resource type.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + com.google.cloud.channel.v1.PriceByResource getPriceByResources(int index); + /** + * + * + *
+   * Price for each monetizable resource type.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + int getPriceByResourcesCount(); + /** + * + * + *
+   * Price for each monetizable resource type.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + java.util.List + getPriceByResourcesOrBuilderList(); + /** + * + * + *
+   * Price for each monetizable resource type.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceByResource price_by_resources = 6; + */ + com.google.cloud.channel.v1.PriceByResourceOrBuilder getPriceByResourcesOrBuilder(int index); + + /** + * + * + *
+   * Start of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * + * @return Whether the startTime field is set. + */ + boolean hasStartTime(); + /** + * + * + *
+   * Start of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + * + * @return The startTime. + */ + com.google.protobuf.Timestamp getStartTime(); + /** + * + * + *
+   * Start of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp start_time = 7; + */ + com.google.protobuf.TimestampOrBuilder getStartTimeOrBuilder(); + + /** + * + * + *
+   * Output only. End of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Output only. End of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Output only. End of the Offer validity time.
+   * 
+ * + * .google.protobuf.Timestamp end_time = 8 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); + + /** + * + * + *
+   * Parameters required to use current Offer to purchase.
+   * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + java.util.List getParameterDefinitionsList(); + /** + * + * + *
+   * Parameters required to use current Offer to purchase.
+   * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + com.google.cloud.channel.v1.ParameterDefinition getParameterDefinitions(int index); + /** + * + * + *
+   * Parameters required to use current Offer to purchase.
+   * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + int getParameterDefinitionsCount(); + /** + * + * + *
+   * Parameters required to use current Offer to purchase.
+   * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + java.util.List + getParameterDefinitionsOrBuilderList(); + /** + * + * + *
+   * Parameters required to use current Offer to purchase.
+   * 
+ * + * repeated .google.cloud.channel.v1.ParameterDefinition parameter_definitions = 9; + */ + com.google.cloud.channel.v1.ParameterDefinitionOrBuilder getParameterDefinitionsOrBuilder( + int index); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OffersProto.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OffersProto.java new file mode 100644 index 00000000..8bcdfcd5 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OffersProto.java @@ -0,0 +1,275 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +public final class OffersProto { + private OffersProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Offer_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Offer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ParameterDefinition_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ParameterDefinition_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Constraints_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Constraints_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_CustomerConstraints_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_CustomerConstraints_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Plan_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Plan_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_PriceByResource_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_PriceByResource_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Price_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Price_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_PricePhase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_PricePhase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_PriceTier_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_PriceTier_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Period_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Period_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n$google/cloud/channel/v1/offers.proto\022\027" + + "google.cloud.channel.v1\032\037google/api/fiel" + + "d_behavior.proto\032\031google/api/resource.pr" + + "oto\032$google/cloud/channel/v1/common.prot" + + "o\032&google/cloud/channel/v1/products.prot" + + "o\032\037google/protobuf/timestamp.proto\032\027goog" + + "le/type/money.proto\032\034google/api/annotati" + + "ons.proto\"\251\004\n\005Offer\022\014\n\004name\030\001 \001(\t\022>\n\016mar" + + "keting_info\030\002 \001(\0132&.google.cloud.channel" + + ".v1.MarketingInfo\022)\n\003sku\030\003 \001(\0132\034.google." + + "cloud.channel.v1.Sku\022+\n\004plan\030\004 \001(\0132\035.goo" + + "gle.cloud.channel.v1.Plan\0229\n\013constraints" + + "\030\005 \001(\0132$.google.cloud.channel.v1.Constra" + + "ints\022D\n\022price_by_resources\030\006 \003(\0132(.googl" + + "e.cloud.channel.v1.PriceByResource\022.\n\nst" + + "art_time\030\007 \001(\0132\032.google.protobuf.Timesta" + + "mp\0221\n\010end_time\030\010 \001(\0132\032.google.protobuf.T" + + "imestampB\003\340A\003\022K\n\025parameter_definitions\030\t" + + " \003(\0132,.google.cloud.channel.v1.Parameter" + + "Definition:I\352AF\n!cloudchannel.googleapis" + + ".com/Offer\022!accounts/{account}/offers/{o" + + "ffer}\"\373\002\n\023ParameterDefinition\022\014\n\004name\030\001 " + + "\001(\t\022R\n\016parameter_type\030\002 \001(\0162:.google.clo" + + "ud.channel.v1.ParameterDefinition.Parame" + + "terType\0221\n\tmin_value\030\003 \001(\0132\036.google.clou" + + "d.channel.v1.Value\0221\n\tmax_value\030\004 \001(\0132\036." + + "google.cloud.channel.v1.Value\0226\n\016allowed" + + "_values\030\005 \003(\0132\036.google.cloud.channel.v1." + + "Value\022\020\n\010optional\030\006 \001(\010\"R\n\rParameterType" + + "\022\036\n\032PARAMETER_TYPE_UNSPECIFIED\020\000\022\t\n\005INT6" + + "4\020\001\022\n\n\006STRING\020\002\022\n\n\006DOUBLE\020\003\"Y\n\013Constrain" + + "ts\022J\n\024customer_constraints\030\001 \001(\0132,.googl" + + "e.cloud.channel.v1.CustomerConstraints\"\327" + + "\001\n\023CustomerConstraints\022\027\n\017allowed_region" + + "s\030\001 \003(\t\022W\n\026allowed_customer_types\030\002 \003(\0162" + + "7.google.cloud.channel.v1.CloudIdentityI" + + "nfo.CustomerType\022N\n\027promotional_order_ty" + + "pes\030\003 \003(\0162-.google.cloud.channel.v1.Prom" + + "otionalOrderType\"\355\001\n\004Plan\022:\n\014payment_pla" + + "n\030\001 \001(\0162$.google.cloud.channel.v1.Paymen" + + "tPlan\022:\n\014payment_type\030\002 \001(\0162$.google.clo" + + "ud.channel.v1.PaymentType\0226\n\rpayment_cyc" + + "le\030\003 \001(\0132\037.google.cloud.channel.v1.Perio" + + "d\0225\n\014trial_period\030\004 \001(\0132\037.google.cloud.c" + + "hannel.v1.Period\"\271\001\n\017PriceByResource\022<\n\r" + + "resource_type\030\001 \001(\0162%.google.cloud.chann" + + "el.v1.ResourceType\022-\n\005price\030\002 \001(\0132\036.goog" + + "le.cloud.channel.v1.Price\0229\n\014price_phase" + + "s\030\003 \003(\0132#.google.cloud.channel.v1.PriceP" + + "hase\"\212\001\n\005Price\022&\n\nbase_price\030\001 \001(\0132\022.goo" + + "gle.type.Money\022\020\n\010discount\030\002 \001(\001\022+\n\017effe" + + "ctive_price\030\003 \001(\0132\022.google.type.Money\022\032\n" + + "\022external_price_uri\030\004 \001(\t\"\331\001\n\nPricePhase" + + "\0228\n\013period_type\030\001 \001(\0162#.google.cloud.cha" + + "nnel.v1.PeriodType\022\024\n\014first_period\030\002 \001(\005" + + "\022\023\n\013last_period\030\003 \001(\005\022-\n\005price\030\004 \001(\0132\036.g" + + "oogle.cloud.channel.v1.Price\0227\n\013price_ti" + + "ers\030\005 \003(\0132\".google.cloud.channel.v1.Pric" + + "eTier\"i\n\tPriceTier\022\026\n\016first_resource\030\001 \001" + + "(\005\022\025\n\rlast_resource\030\002 \001(\005\022-\n\005price\030\003 \001(\013" + + "2\036.google.cloud.channel.v1.Price\"T\n\006Peri" + + "od\022\020\n\010duration\030\001 \001(\005\0228\n\013period_type\030\002 \001(" + + "\0162#.google.cloud.channel.v1.PeriodType*m" + + "\n\024PromotionalOrderType\022 \n\034PROMOTIONAL_TY" + + "PE_UNSPECIFIED\020\000\022\017\n\013NEW_UPGRADE\020\001\022\014\n\010TRA" + + "NSFER\020\002\022\024\n\020PROMOTION_SWITCH\020\003*k\n\013Payment" + + "Plan\022\034\n\030PAYMENT_PLAN_UNSPECIFIED\020\000\022\016\n\nCO" + + "MMITMENT\020\001\022\014\n\010FLEXIBLE\020\002\022\010\n\004FREE\020\003\022\t\n\005TR" + + "IAL\020\004\022\013\n\007OFFLINE\020\005*D\n\013PaymentType\022\034\n\030PAY" + + "MENT_TYPE_UNSPECIFIED\020\000\022\n\n\006PREPAY\020\001\022\013\n\007P" + + "OSTPAY\020\002*\212\001\n\014ResourceType\022\035\n\031RESOURCE_TY" + + "PE_UNSPECIFIED\020\000\022\010\n\004SEAT\020\001\022\007\n\003MAU\020\002\022\006\n\002G" + + "B\020\003\022\021\n\rLICENSED_USER\020\004\022\013\n\007MINUTES\020\005\022\016\n\nI" + + "AAS_USAGE\020\006\022\020\n\014SUBSCRIPTION\020\007*G\n\nPeriodT" + + "ype\022\033\n\027PERIOD_TYPE_UNSPECIFIED\020\000\022\007\n\003DAY\020" + + "\001\022\t\n\005MONTH\020\002\022\010\n\004YEAR\020\003Bl\n\033com.google.clo" + + "ud.channel.v1B\013OffersProtoP\001Z>google.gol" + + "ang.org/genproto/googleapis/cloud/channe" + + "l/v1;channelb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.channel.v1.CommonProto.getDescriptor(), + com.google.cloud.channel.v1.ProductsProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.type.MoneyProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_channel_v1_Offer_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_channel_v1_Offer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Offer_descriptor, + new java.lang.String[] { + "Name", + "MarketingInfo", + "Sku", + "Plan", + "Constraints", + "PriceByResources", + "StartTime", + "EndTime", + "ParameterDefinitions", + }); + internal_static_google_cloud_channel_v1_ParameterDefinition_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_channel_v1_ParameterDefinition_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ParameterDefinition_descriptor, + new java.lang.String[] { + "Name", "ParameterType", "MinValue", "MaxValue", "AllowedValues", "Optional", + }); + internal_static_google_cloud_channel_v1_Constraints_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_channel_v1_Constraints_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Constraints_descriptor, + new java.lang.String[] { + "CustomerConstraints", + }); + internal_static_google_cloud_channel_v1_CustomerConstraints_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_channel_v1_CustomerConstraints_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_CustomerConstraints_descriptor, + new java.lang.String[] { + "AllowedRegions", "AllowedCustomerTypes", "PromotionalOrderTypes", + }); + internal_static_google_cloud_channel_v1_Plan_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_channel_v1_Plan_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Plan_descriptor, + new java.lang.String[] { + "PaymentPlan", "PaymentType", "PaymentCycle", "TrialPeriod", + }); + internal_static_google_cloud_channel_v1_PriceByResource_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_channel_v1_PriceByResource_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_PriceByResource_descriptor, + new java.lang.String[] { + "ResourceType", "Price", "PricePhases", + }); + internal_static_google_cloud_channel_v1_Price_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_channel_v1_Price_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Price_descriptor, + new java.lang.String[] { + "BasePrice", "Discount", "EffectivePrice", "ExternalPriceUri", + }); + internal_static_google_cloud_channel_v1_PricePhase_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_channel_v1_PricePhase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_PricePhase_descriptor, + new java.lang.String[] { + "PeriodType", "FirstPeriod", "LastPeriod", "Price", "PriceTiers", + }); + internal_static_google_cloud_channel_v1_PriceTier_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_channel_v1_PriceTier_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_PriceTier_descriptor, + new java.lang.String[] { + "FirstResource", "LastResource", "Price", + }); + internal_static_google_cloud_channel_v1_Period_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_channel_v1_Period_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Period_descriptor, + new java.lang.String[] { + "Duration", "PeriodType", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.channel.v1.CommonProto.getDescriptor(); + com.google.cloud.channel.v1.ProductsProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.type.MoneyProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OperationMetadata.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OperationMetadata.java new file mode 100644 index 00000000..a7cd327f --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OperationMetadata.java @@ -0,0 +1,969 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/operations.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Provides contextual information about a [google.longrunning.Operation][google.longrunning.Operation].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.OperationMetadata} + */ +public final class OperationMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.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() { + operationType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new OperationMetadata(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private OperationMetadata( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + operationType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OperationsProto + .internal_static_google_cloud_channel_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OperationsProto + .internal_static_google_cloud_channel_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.OperationMetadata.class, + com.google.cloud.channel.v1.OperationMetadata.Builder.class); + } + + /** + * + * + *
+   * RPCs that return a Long Running Operation.
+   * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.OperationMetadata.OperationType} + */ + public enum OperationType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Default value. This state doesn't show unless an error occurs.
+     * 
+ * + * OPERATION_TYPE_UNSPECIFIED = 0; + */ + OPERATION_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Long Running Operation was triggered by CreateEntitlement.
+     * 
+ * + * CREATE_ENTITLEMENT = 1; + */ + CREATE_ENTITLEMENT(1), + /** + * + * + *
+     * Long Running Operation was triggered by ChangeRenewalSettings.
+     * 
+ * + * CHANGE_RENEWAL_SETTINGS = 3; + */ + CHANGE_RENEWAL_SETTINGS(3), + /** + * + * + *
+     * Long Running Operation was triggered by StartPaidService.
+     * 
+ * + * START_PAID_SERVICE = 5; + */ + START_PAID_SERVICE(5), + /** + * + * + *
+     * Long Running Operation was triggered by ActivateEntitlement.
+     * 
+ * + * ACTIVATE_ENTITLEMENT = 7; + */ + ACTIVATE_ENTITLEMENT(7), + /** + * + * + *
+     * Long Running Operation was triggered by SuspendEntitlement.
+     * 
+ * + * SUSPEND_ENTITLEMENT = 8; + */ + SUSPEND_ENTITLEMENT(8), + /** + * + * + *
+     * Long Running Operation was triggered by CancelEntitlement.
+     * 
+ * + * CANCEL_ENTITLEMENT = 9; + */ + CANCEL_ENTITLEMENT(9), + /** + * + * + *
+     * Long Running Operation was triggered by TransferEntitlements.
+     * 
+ * + * TRANSFER_ENTITLEMENTS = 10; + */ + TRANSFER_ENTITLEMENTS(10), + /** + * + * + *
+     * Long Running Operation was triggered by TransferEntitlementsToGoogle.
+     * 
+ * + * TRANSFER_ENTITLEMENTS_TO_GOOGLE = 11; + */ + TRANSFER_ENTITLEMENTS_TO_GOOGLE(11), + /** + * + * + *
+     * Long Running Operation was triggered by ChangeOffer.
+     * 
+ * + * CHANGE_OFFER = 14; + */ + CHANGE_OFFER(14), + /** + * + * + *
+     * Long Running Operation was triggered by ChangeParameters.
+     * 
+ * + * CHANGE_PARAMETERS = 15; + */ + CHANGE_PARAMETERS(15), + /** + * + * + *
+     * Long Running Operation was triggered by ProvisionCloudIdentity.
+     * 
+ * + * PROVISION_CLOUD_IDENTITY = 16; + */ + PROVISION_CLOUD_IDENTITY(16), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Default value. This state doesn't show unless an error occurs.
+     * 
+ * + * OPERATION_TYPE_UNSPECIFIED = 0; + */ + public static final int OPERATION_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Long Running Operation was triggered by CreateEntitlement.
+     * 
+ * + * CREATE_ENTITLEMENT = 1; + */ + public static final int CREATE_ENTITLEMENT_VALUE = 1; + /** + * + * + *
+     * Long Running Operation was triggered by ChangeRenewalSettings.
+     * 
+ * + * CHANGE_RENEWAL_SETTINGS = 3; + */ + public static final int CHANGE_RENEWAL_SETTINGS_VALUE = 3; + /** + * + * + *
+     * Long Running Operation was triggered by StartPaidService.
+     * 
+ * + * START_PAID_SERVICE = 5; + */ + public static final int START_PAID_SERVICE_VALUE = 5; + /** + * + * + *
+     * Long Running Operation was triggered by ActivateEntitlement.
+     * 
+ * + * ACTIVATE_ENTITLEMENT = 7; + */ + public static final int ACTIVATE_ENTITLEMENT_VALUE = 7; + /** + * + * + *
+     * Long Running Operation was triggered by SuspendEntitlement.
+     * 
+ * + * SUSPEND_ENTITLEMENT = 8; + */ + public static final int SUSPEND_ENTITLEMENT_VALUE = 8; + /** + * + * + *
+     * Long Running Operation was triggered by CancelEntitlement.
+     * 
+ * + * CANCEL_ENTITLEMENT = 9; + */ + public static final int CANCEL_ENTITLEMENT_VALUE = 9; + /** + * + * + *
+     * Long Running Operation was triggered by TransferEntitlements.
+     * 
+ * + * TRANSFER_ENTITLEMENTS = 10; + */ + public static final int TRANSFER_ENTITLEMENTS_VALUE = 10; + /** + * + * + *
+     * Long Running Operation was triggered by TransferEntitlementsToGoogle.
+     * 
+ * + * TRANSFER_ENTITLEMENTS_TO_GOOGLE = 11; + */ + public static final int TRANSFER_ENTITLEMENTS_TO_GOOGLE_VALUE = 11; + /** + * + * + *
+     * Long Running Operation was triggered by ChangeOffer.
+     * 
+ * + * CHANGE_OFFER = 14; + */ + public static final int CHANGE_OFFER_VALUE = 14; + /** + * + * + *
+     * Long Running Operation was triggered by ChangeParameters.
+     * 
+ * + * CHANGE_PARAMETERS = 15; + */ + public static final int CHANGE_PARAMETERS_VALUE = 15; + /** + * + * + *
+     * Long Running Operation was triggered by ProvisionCloudIdentity.
+     * 
+ * + * PROVISION_CLOUD_IDENTITY = 16; + */ + public static final int PROVISION_CLOUD_IDENTITY_VALUE = 16; + + 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 OperationType 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 OperationType forNumber(int value) { + switch (value) { + case 0: + return OPERATION_TYPE_UNSPECIFIED; + case 1: + return CREATE_ENTITLEMENT; + case 3: + return CHANGE_RENEWAL_SETTINGS; + case 5: + return START_PAID_SERVICE; + case 7: + return ACTIVATE_ENTITLEMENT; + case 8: + return SUSPEND_ENTITLEMENT; + case 9: + return CANCEL_ENTITLEMENT; + case 10: + return TRANSFER_ENTITLEMENTS; + case 11: + return TRANSFER_ENTITLEMENTS_TO_GOOGLE; + case 14: + return CHANGE_OFFER; + case 15: + return CHANGE_PARAMETERS; + case 16: + return PROVISION_CLOUD_IDENTITY; + 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 OperationType findValueByNumber(int number) { + return OperationType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.OperationMetadata.getDescriptor().getEnumTypes().get(0); + } + + private static final OperationType[] VALUES = values(); + + public static OperationType 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 OperationType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.OperationMetadata.OperationType) + } + + public static final int OPERATION_TYPE_FIELD_NUMBER = 1; + private int operationType_; + /** + * + * + *
+   * The RPC that initiated this Long Running Operation.
+   * 
+ * + * .google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1; + * + * @return The enum numeric value on the wire for operationType. + */ + @java.lang.Override + public int getOperationTypeValue() { + return operationType_; + } + /** + * + * + *
+   * The RPC that initiated this Long Running Operation.
+   * 
+ * + * .google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1; + * + * @return The operationType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.OperationMetadata.OperationType getOperationType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.OperationMetadata.OperationType result = + com.google.cloud.channel.v1.OperationMetadata.OperationType.valueOf(operationType_); + return result == null + ? com.google.cloud.channel.v1.OperationMetadata.OperationType.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 (operationType_ + != com.google.cloud.channel.v1.OperationMetadata.OperationType.OPERATION_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(1, operationType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (operationType_ + != com.google.cloud.channel.v1.OperationMetadata.OperationType.OPERATION_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, operationType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.OperationMetadata)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.OperationMetadata other = + (com.google.cloud.channel.v1.OperationMetadata) obj; + + if (operationType_ != other.operationType_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + OPERATION_TYPE_FIELD_NUMBER; + hash = (53 * hash) + operationType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.OperationMetadata parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.OperationMetadata parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.OperationMetadata parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.OperationMetadata parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.OperationMetadata parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.OperationMetadata parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.OperationMetadata parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.OperationMetadata parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.OperationMetadata parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.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; + } + /** + * + * + *
+   * Provides contextual information about a [google.longrunning.Operation][google.longrunning.Operation].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.OperationMetadata} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.OperationMetadata) + com.google.cloud.channel.v1.OperationMetadataOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OperationsProto + .internal_static_google_cloud_channel_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OperationsProto + .internal_static_google_cloud_channel_v1_OperationMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.OperationMetadata.class, + com.google.cloud.channel.v1.OperationMetadata.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.OperationMetadata.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + operationType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.OperationsProto + .internal_static_google_cloud_channel_v1_OperationMetadata_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.OperationMetadata getDefaultInstanceForType() { + return com.google.cloud.channel.v1.OperationMetadata.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.OperationMetadata build() { + com.google.cloud.channel.v1.OperationMetadata result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.OperationMetadata buildPartial() { + com.google.cloud.channel.v1.OperationMetadata result = + new com.google.cloud.channel.v1.OperationMetadata(this); + result.operationType_ = operationType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.OperationMetadata) { + return mergeFrom((com.google.cloud.channel.v1.OperationMetadata) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.OperationMetadata other) { + if (other == com.google.cloud.channel.v1.OperationMetadata.getDefaultInstance()) return this; + if (other.operationType_ != 0) { + setOperationTypeValue(other.getOperationTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.OperationMetadata parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.OperationMetadata) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int operationType_ = 0; + /** + * + * + *
+     * The RPC that initiated this Long Running Operation.
+     * 
+ * + * .google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1; + * + * @return The enum numeric value on the wire for operationType. + */ + @java.lang.Override + public int getOperationTypeValue() { + return operationType_; + } + /** + * + * + *
+     * The RPC that initiated this Long Running Operation.
+     * 
+ * + * .google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1; + * + * @param value The enum numeric value on the wire for operationType to set. + * @return This builder for chaining. + */ + public Builder setOperationTypeValue(int value) { + + operationType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * The RPC that initiated this Long Running Operation.
+     * 
+ * + * .google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1; + * + * @return The operationType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.OperationMetadata.OperationType getOperationType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.OperationMetadata.OperationType result = + com.google.cloud.channel.v1.OperationMetadata.OperationType.valueOf(operationType_); + return result == null + ? com.google.cloud.channel.v1.OperationMetadata.OperationType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * The RPC that initiated this Long Running Operation.
+     * 
+ * + * .google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1; + * + * @param value The operationType to set. + * @return This builder for chaining. + */ + public Builder setOperationType( + com.google.cloud.channel.v1.OperationMetadata.OperationType value) { + if (value == null) { + throw new NullPointerException(); + } + + operationType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * The RPC that initiated this Long Running Operation.
+     * 
+ * + * .google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearOperationType() { + + operationType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.OperationMetadata) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.OperationMetadata) + private static final com.google.cloud.channel.v1.OperationMetadata DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.OperationMetadata(); + } + + public static com.google.cloud.channel.v1.OperationMetadata getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public OperationMetadata parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new OperationMetadata(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.OperationMetadata getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OperationMetadataOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OperationMetadataOrBuilder.java new file mode 100644 index 00000000..02e241df --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OperationMetadataOrBuilder.java @@ -0,0 +1,50 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/operations.proto + +package com.google.cloud.channel.v1; + +public interface OperationMetadataOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.OperationMetadata) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The RPC that initiated this Long Running Operation.
+   * 
+ * + * .google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1; + * + * @return The enum numeric value on the wire for operationType. + */ + int getOperationTypeValue(); + /** + * + * + *
+   * The RPC that initiated this Long Running Operation.
+   * 
+ * + * .google.cloud.channel.v1.OperationMetadata.OperationType operation_type = 1; + * + * @return The operationType. + */ + com.google.cloud.channel.v1.OperationMetadata.OperationType getOperationType(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OperationsProto.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OperationsProto.java new file mode 100644 index 00000000..09f7eca4 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/OperationsProto.java @@ -0,0 +1,79 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/operations.proto + +package com.google.cloud.channel.v1; + +public final class OperationsProto { + private OperationsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_OperationMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_OperationMetadata_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n(google/cloud/channel/v1/operations.pro" + + "to\022\027google.cloud.channel.v1\032\034google/api/" + + "annotations.proto\"\266\003\n\021OperationMetadata\022" + + "P\n\016operation_type\030\001 \001(\01628.google.cloud.c" + + "hannel.v1.OperationMetadata.OperationTyp" + + "e\"\316\002\n\rOperationType\022\036\n\032OPERATION_TYPE_UN" + + "SPECIFIED\020\000\022\026\n\022CREATE_ENTITLEMENT\020\001\022\033\n\027C" + + "HANGE_RENEWAL_SETTINGS\020\003\022\026\n\022START_PAID_S" + + "ERVICE\020\005\022\030\n\024ACTIVATE_ENTITLEMENT\020\007\022\027\n\023SU" + + "SPEND_ENTITLEMENT\020\010\022\026\n\022CANCEL_ENTITLEMEN" + + "T\020\t\022\031\n\025TRANSFER_ENTITLEMENTS\020\n\022#\n\037TRANSF" + + "ER_ENTITLEMENTS_TO_GOOGLE\020\013\022\020\n\014CHANGE_OF" + + "FER\020\016\022\025\n\021CHANGE_PARAMETERS\020\017\022\034\n\030PROVISIO" + + "N_CLOUD_IDENTITY\020\020Bp\n\033com.google.cloud.c" + + "hannel.v1B\017OperationsProtoP\001Z>google.gol" + + "ang.org/genproto/googleapis/cloud/channe" + + "l/v1;channelb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_channel_v1_OperationMetadata_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_channel_v1_OperationMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_OperationMetadata_descriptor, + new java.lang.String[] { + "OperationType", + }); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Parameter.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Parameter.java new file mode 100644 index 00000000..9e70fa3e --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Parameter.java @@ -0,0 +1,998 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Definition for extended entitlement parameters.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Parameter} + */ +public final class Parameter extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Parameter) + ParameterOrBuilder { + private static final long serialVersionUID = 0L; + // Use Parameter.newBuilder() to construct. + private Parameter(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Parameter() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Parameter(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Parameter( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.channel.v1.Value.Builder subBuilder = null; + if (value_ != null) { + subBuilder = value_.toBuilder(); + } + value_ = + input.readMessage(com.google.cloud.channel.v1.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(value_); + value_ = subBuilder.buildPartial(); + } + + break; + } + case 24: + { + editable_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_Parameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_Parameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Parameter.class, + com.google.cloud.channel.v1.Parameter.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the parameter.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Name of the parameter.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int VALUE_FIELD_NUMBER = 2; + private com.google.cloud.channel.v1.Value value_; + /** + * + * + *
+   * Value of the parameter.
+   * 
+ * + * .google.cloud.channel.v1.Value value = 2; + * + * @return Whether the value field is set. + */ + @java.lang.Override + public boolean hasValue() { + return value_ != null; + } + /** + * + * + *
+   * Value of the parameter.
+   * 
+ * + * .google.cloud.channel.v1.Value value = 2; + * + * @return The value. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Value getValue() { + return value_ == null ? com.google.cloud.channel.v1.Value.getDefaultInstance() : value_; + } + /** + * + * + *
+   * Value of the parameter.
+   * 
+ * + * .google.cloud.channel.v1.Value value = 2; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ValueOrBuilder getValueOrBuilder() { + return getValue(); + } + + public static final int EDITABLE_FIELD_NUMBER = 3; + private boolean editable_; + /** + * + * + *
+   * Output only. Specifies whether this parameter is allowed to be changed. For example, for
+   * a Google Workspace Business Starter entitlement in commitment plan,
+   * num_units is editable when entitlement is active.
+   * 
+ * + * bool editable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The editable. + */ + @java.lang.Override + public boolean getEditable() { + return editable_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (value_ != null) { + output.writeMessage(2, getValue()); + } + if (editable_ != false) { + output.writeBool(3, editable_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (value_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValue()); + } + if (editable_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, editable_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Parameter)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Parameter other = (com.google.cloud.channel.v1.Parameter) obj; + + if (!getName().equals(other.getName())) return false; + if (hasValue() != other.hasValue()) return false; + if (hasValue()) { + if (!getValue().equals(other.getValue())) return false; + } + if (getEditable() != other.getEditable()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasValue()) { + hash = (37 * hash) + VALUE_FIELD_NUMBER; + hash = (53 * hash) + getValue().hashCode(); + } + hash = (37 * hash) + EDITABLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEditable()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Parameter parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Parameter parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Parameter parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Parameter parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Parameter parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Parameter parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Parameter parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Parameter parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Parameter parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Parameter parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Parameter parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Parameter parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Parameter prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Definition for extended entitlement parameters.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Parameter} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Parameter) + com.google.cloud.channel.v1.ParameterOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_Parameter_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_Parameter_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Parameter.class, + com.google.cloud.channel.v1.Parameter.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Parameter.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (valueBuilder_ == null) { + value_ = null; + } else { + value_ = null; + valueBuilder_ = null; + } + editable_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_Parameter_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Parameter getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Parameter.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Parameter build() { + com.google.cloud.channel.v1.Parameter result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Parameter buildPartial() { + com.google.cloud.channel.v1.Parameter result = + new com.google.cloud.channel.v1.Parameter(this); + result.name_ = name_; + if (valueBuilder_ == null) { + result.value_ = value_; + } else { + result.value_ = valueBuilder_.build(); + } + result.editable_ = editable_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Parameter) { + return mergeFrom((com.google.cloud.channel.v1.Parameter) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Parameter other) { + if (other == com.google.cloud.channel.v1.Parameter.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasValue()) { + mergeValue(other.getValue()); + } + if (other.getEditable() != false) { + setEditable(other.getEditable()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Parameter parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Parameter) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the parameter.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the parameter.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the parameter.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Name of the parameter.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parameter.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.Value value_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder> + valueBuilder_; + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.cloud.channel.v1.Value value = 2; + * + * @return Whether the value field is set. + */ + public boolean hasValue() { + return valueBuilder_ != null || value_ != null; + } + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.cloud.channel.v1.Value value = 2; + * + * @return The value. + */ + public com.google.cloud.channel.v1.Value getValue() { + if (valueBuilder_ == null) { + return value_ == null ? com.google.cloud.channel.v1.Value.getDefaultInstance() : value_; + } else { + return valueBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.cloud.channel.v1.Value value = 2; + */ + public Builder setValue(com.google.cloud.channel.v1.Value value) { + if (valueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + value_ = value; + onChanged(); + } else { + valueBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.cloud.channel.v1.Value value = 2; + */ + public Builder setValue(com.google.cloud.channel.v1.Value.Builder builderForValue) { + if (valueBuilder_ == null) { + value_ = builderForValue.build(); + onChanged(); + } else { + valueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.cloud.channel.v1.Value value = 2; + */ + public Builder mergeValue(com.google.cloud.channel.v1.Value value) { + if (valueBuilder_ == null) { + if (value_ != null) { + value_ = + com.google.cloud.channel.v1.Value.newBuilder(value_).mergeFrom(value).buildPartial(); + } else { + value_ = value; + } + onChanged(); + } else { + valueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.cloud.channel.v1.Value value = 2; + */ + public Builder clearValue() { + if (valueBuilder_ == null) { + value_ = null; + onChanged(); + } else { + value_ = null; + valueBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.cloud.channel.v1.Value value = 2; + */ + public com.google.cloud.channel.v1.Value.Builder getValueBuilder() { + + onChanged(); + return getValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.cloud.channel.v1.Value value = 2; + */ + public com.google.cloud.channel.v1.ValueOrBuilder getValueOrBuilder() { + if (valueBuilder_ != null) { + return valueBuilder_.getMessageOrBuilder(); + } else { + return value_ == null ? com.google.cloud.channel.v1.Value.getDefaultInstance() : value_; + } + } + /** + * + * + *
+     * Value of the parameter.
+     * 
+ * + * .google.cloud.channel.v1.Value value = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder> + getValueFieldBuilder() { + if (valueBuilder_ == null) { + valueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder>( + getValue(), getParentForChildren(), isClean()); + value_ = null; + } + return valueBuilder_; + } + + private boolean editable_; + /** + * + * + *
+     * Output only. Specifies whether this parameter is allowed to be changed. For example, for
+     * a Google Workspace Business Starter entitlement in commitment plan,
+     * num_units is editable when entitlement is active.
+     * 
+ * + * bool editable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The editable. + */ + @java.lang.Override + public boolean getEditable() { + return editable_; + } + /** + * + * + *
+     * Output only. Specifies whether this parameter is allowed to be changed. For example, for
+     * a Google Workspace Business Starter entitlement in commitment plan,
+     * num_units is editable when entitlement is active.
+     * 
+ * + * bool editable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The editable to set. + * @return This builder for chaining. + */ + public Builder setEditable(boolean value) { + + editable_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Specifies whether this parameter is allowed to be changed. For example, for
+     * a Google Workspace Business Starter entitlement in commitment plan,
+     * num_units is editable when entitlement is active.
+     * 
+ * + * bool editable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearEditable() { + + editable_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Parameter) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Parameter) + private static final com.google.cloud.channel.v1.Parameter DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Parameter(); + } + + public static com.google.cloud.channel.v1.Parameter getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Parameter parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Parameter(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Parameter getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ParameterDefinition.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ParameterDefinition.java new file mode 100644 index 00000000..1b104490 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ParameterDefinition.java @@ -0,0 +1,2207 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Parameter's definition. Specifies what parameter is required to use the
+ * current Offer to purchase.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ParameterDefinition} + */ +public final class ParameterDefinition extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ParameterDefinition) + ParameterDefinitionOrBuilder { + private static final long serialVersionUID = 0L; + // Use ParameterDefinition.newBuilder() to construct. + private ParameterDefinition(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ParameterDefinition() { + name_ = ""; + parameterType_ = 0; + allowedValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ParameterDefinition(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ParameterDefinition( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + parameterType_ = rawValue; + break; + } + case 26: + { + com.google.cloud.channel.v1.Value.Builder subBuilder = null; + if (minValue_ != null) { + subBuilder = minValue_.toBuilder(); + } + minValue_ = + input.readMessage(com.google.cloud.channel.v1.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(minValue_); + minValue_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.channel.v1.Value.Builder subBuilder = null; + if (maxValue_ != null) { + subBuilder = maxValue_.toBuilder(); + } + maxValue_ = + input.readMessage(com.google.cloud.channel.v1.Value.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(maxValue_); + maxValue_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + allowedValues_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + allowedValues_.add( + input.readMessage(com.google.cloud.channel.v1.Value.parser(), extensionRegistry)); + break; + } + case 48: + { + optional_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + allowedValues_ = java.util.Collections.unmodifiableList(allowedValues_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_ParameterDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_ParameterDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ParameterDefinition.class, + com.google.cloud.channel.v1.ParameterDefinition.Builder.class); + } + + /** + * + * + *
+   * Data type of the parameter.
+   * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.ParameterDefinition.ParameterType} + */ + public enum ParameterType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Not used.
+     * 
+ * + * PARAMETER_TYPE_UNSPECIFIED = 0; + */ + PARAMETER_TYPE_UNSPECIFIED(0), + /** + * + * + *
+     * Int64 type.
+     * 
+ * + * INT64 = 1; + */ + INT64(1), + /** + * + * + *
+     * String type.
+     * 
+ * + * STRING = 2; + */ + STRING(2), + /** + * + * + *
+     * Double type.
+     * 
+ * + * DOUBLE = 3; + */ + DOUBLE(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Not used.
+     * 
+ * + * PARAMETER_TYPE_UNSPECIFIED = 0; + */ + public static final int PARAMETER_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Int64 type.
+     * 
+ * + * INT64 = 1; + */ + public static final int INT64_VALUE = 1; + /** + * + * + *
+     * String type.
+     * 
+ * + * STRING = 2; + */ + public static final int STRING_VALUE = 2; + /** + * + * + *
+     * Double type.
+     * 
+ * + * DOUBLE = 3; + */ + public static final int DOUBLE_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static ParameterType 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 ParameterType forNumber(int value) { + switch (value) { + case 0: + return PARAMETER_TYPE_UNSPECIFIED; + case 1: + return INT64; + case 2: + return STRING; + case 3: + return DOUBLE; + 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 ParameterType findValueByNumber(int number) { + return ParameterType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.ParameterDefinition.getDescriptor().getEnumTypes().get(0); + } + + private static final ParameterType[] VALUES = values(); + + public static ParameterType 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 ParameterType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.ParameterDefinition.ParameterType) + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Name of the parameter.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Name of the parameter.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PARAMETER_TYPE_FIELD_NUMBER = 2; + private int parameterType_; + /** + * + * + *
+   * Data type of the parameter. Minimal value, Maximum value and allowed values
+   * will use specified data type here.
+   * 
+ * + * .google.cloud.channel.v1.ParameterDefinition.ParameterType parameter_type = 2; + * + * @return The enum numeric value on the wire for parameterType. + */ + @java.lang.Override + public int getParameterTypeValue() { + return parameterType_; + } + /** + * + * + *
+   * Data type of the parameter. Minimal value, Maximum value and allowed values
+   * will use specified data type here.
+   * 
+ * + * .google.cloud.channel.v1.ParameterDefinition.ParameterType parameter_type = 2; + * + * @return The parameterType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ParameterDefinition.ParameterType getParameterType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ParameterDefinition.ParameterType result = + com.google.cloud.channel.v1.ParameterDefinition.ParameterType.valueOf(parameterType_); + return result == null + ? com.google.cloud.channel.v1.ParameterDefinition.ParameterType.UNRECOGNIZED + : result; + } + + public static final int MIN_VALUE_FIELD_NUMBER = 3; + private com.google.cloud.channel.v1.Value minValue_; + /** + * + * + *
+   * Minimal value of the parameter, if applicable. Inclusive. For example,
+   * minimal commitment when purchasing Anthos is 0.01.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + * + * @return Whether the minValue field is set. + */ + @java.lang.Override + public boolean hasMinValue() { + return minValue_ != null; + } + /** + * + * + *
+   * Minimal value of the parameter, if applicable. Inclusive. For example,
+   * minimal commitment when purchasing Anthos is 0.01.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + * + * @return The minValue. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Value getMinValue() { + return minValue_ == null ? com.google.cloud.channel.v1.Value.getDefaultInstance() : minValue_; + } + /** + * + * + *
+   * Minimal value of the parameter, if applicable. Inclusive. For example,
+   * minimal commitment when purchasing Anthos is 0.01.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ValueOrBuilder getMinValueOrBuilder() { + return getMinValue(); + } + + public static final int MAX_VALUE_FIELD_NUMBER = 4; + private com.google.cloud.channel.v1.Value maxValue_; + /** + * + * + *
+   * Maximum value of the parameter, if applicable. Inclusive. For example,
+   * maximum seats when purchasing Google Workspace Business Standard.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + * + * @return Whether the maxValue field is set. + */ + @java.lang.Override + public boolean hasMaxValue() { + return maxValue_ != null; + } + /** + * + * + *
+   * Maximum value of the parameter, if applicable. Inclusive. For example,
+   * maximum seats when purchasing Google Workspace Business Standard.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + * + * @return The maxValue. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Value getMaxValue() { + return maxValue_ == null ? com.google.cloud.channel.v1.Value.getDefaultInstance() : maxValue_; + } + /** + * + * + *
+   * Maximum value of the parameter, if applicable. Inclusive. For example,
+   * maximum seats when purchasing Google Workspace Business Standard.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ValueOrBuilder getMaxValueOrBuilder() { + return getMaxValue(); + } + + public static final int ALLOWED_VALUES_FIELD_NUMBER = 5; + private java.util.List allowedValues_; + /** + * + * + *
+   * If not empty, parameter values must be drawn from this list.
+   * For example, [us-west1, us-west2, ...]
+   * Applicable to STRING parameter type.
+   * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + @java.lang.Override + public java.util.List getAllowedValuesList() { + return allowedValues_; + } + /** + * + * + *
+   * If not empty, parameter values must be drawn from this list.
+   * For example, [us-west1, us-west2, ...]
+   * Applicable to STRING parameter type.
+   * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + @java.lang.Override + public java.util.List + getAllowedValuesOrBuilderList() { + return allowedValues_; + } + /** + * + * + *
+   * If not empty, parameter values must be drawn from this list.
+   * For example, [us-west1, us-west2, ...]
+   * Applicable to STRING parameter type.
+   * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + @java.lang.Override + public int getAllowedValuesCount() { + return allowedValues_.size(); + } + /** + * + * + *
+   * If not empty, parameter values must be drawn from this list.
+   * For example, [us-west1, us-west2, ...]
+   * Applicable to STRING parameter type.
+   * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + @java.lang.Override + public com.google.cloud.channel.v1.Value getAllowedValues(int index) { + return allowedValues_.get(index); + } + /** + * + * + *
+   * If not empty, parameter values must be drawn from this list.
+   * For example, [us-west1, us-west2, ...]
+   * Applicable to STRING parameter type.
+   * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ValueOrBuilder getAllowedValuesOrBuilder(int index) { + return allowedValues_.get(index); + } + + public static final int OPTIONAL_FIELD_NUMBER = 6; + private boolean optional_; + /** + * + * + *
+   * If set to true, parameter is optional to purchase this Offer.
+   * 
+ * + * bool optional = 6; + * + * @return The optional. + */ + @java.lang.Override + public boolean getOptional() { + return optional_; + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (parameterType_ + != com.google.cloud.channel.v1.ParameterDefinition.ParameterType.PARAMETER_TYPE_UNSPECIFIED + .getNumber()) { + output.writeEnum(2, parameterType_); + } + if (minValue_ != null) { + output.writeMessage(3, getMinValue()); + } + if (maxValue_ != null) { + output.writeMessage(4, getMaxValue()); + } + for (int i = 0; i < allowedValues_.size(); i++) { + output.writeMessage(5, allowedValues_.get(i)); + } + if (optional_ != false) { + output.writeBool(6, optional_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (parameterType_ + != com.google.cloud.channel.v1.ParameterDefinition.ParameterType.PARAMETER_TYPE_UNSPECIFIED + .getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, parameterType_); + } + if (minValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getMinValue()); + } + if (maxValue_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getMaxValue()); + } + for (int i = 0; i < allowedValues_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, allowedValues_.get(i)); + } + if (optional_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, optional_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ParameterDefinition)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ParameterDefinition other = + (com.google.cloud.channel.v1.ParameterDefinition) obj; + + if (!getName().equals(other.getName())) return false; + if (parameterType_ != other.parameterType_) return false; + if (hasMinValue() != other.hasMinValue()) return false; + if (hasMinValue()) { + if (!getMinValue().equals(other.getMinValue())) return false; + } + if (hasMaxValue() != other.hasMaxValue()) return false; + if (hasMaxValue()) { + if (!getMaxValue().equals(other.getMaxValue())) return false; + } + if (!getAllowedValuesList().equals(other.getAllowedValuesList())) return false; + if (getOptional() != other.getOptional()) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + PARAMETER_TYPE_FIELD_NUMBER; + hash = (53 * hash) + parameterType_; + if (hasMinValue()) { + hash = (37 * hash) + MIN_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMinValue().hashCode(); + } + if (hasMaxValue()) { + hash = (37 * hash) + MAX_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getMaxValue().hashCode(); + } + if (getAllowedValuesCount() > 0) { + hash = (37 * hash) + ALLOWED_VALUES_FIELD_NUMBER; + hash = (53 * hash) + getAllowedValuesList().hashCode(); + } + hash = (37 * hash) + OPTIONAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getOptional()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ParameterDefinition parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ParameterDefinition prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Parameter's definition. Specifies what parameter is required to use the
+   * current Offer to purchase.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ParameterDefinition} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ParameterDefinition) + com.google.cloud.channel.v1.ParameterDefinitionOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_ParameterDefinition_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_ParameterDefinition_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ParameterDefinition.class, + com.google.cloud.channel.v1.ParameterDefinition.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ParameterDefinition.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getAllowedValuesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + parameterType_ = 0; + + if (minValueBuilder_ == null) { + minValue_ = null; + } else { + minValue_ = null; + minValueBuilder_ = null; + } + if (maxValueBuilder_ == null) { + maxValue_ = null; + } else { + maxValue_ = null; + maxValueBuilder_ = null; + } + if (allowedValuesBuilder_ == null) { + allowedValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + allowedValuesBuilder_.clear(); + } + optional_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_ParameterDefinition_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ParameterDefinition getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ParameterDefinition.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ParameterDefinition build() { + com.google.cloud.channel.v1.ParameterDefinition result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ParameterDefinition buildPartial() { + com.google.cloud.channel.v1.ParameterDefinition result = + new com.google.cloud.channel.v1.ParameterDefinition(this); + int from_bitField0_ = bitField0_; + result.name_ = name_; + result.parameterType_ = parameterType_; + if (minValueBuilder_ == null) { + result.minValue_ = minValue_; + } else { + result.minValue_ = minValueBuilder_.build(); + } + if (maxValueBuilder_ == null) { + result.maxValue_ = maxValue_; + } else { + result.maxValue_ = maxValueBuilder_.build(); + } + if (allowedValuesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + allowedValues_ = java.util.Collections.unmodifiableList(allowedValues_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.allowedValues_ = allowedValues_; + } else { + result.allowedValues_ = allowedValuesBuilder_.build(); + } + result.optional_ = optional_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ParameterDefinition) { + return mergeFrom((com.google.cloud.channel.v1.ParameterDefinition) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ParameterDefinition other) { + if (other == com.google.cloud.channel.v1.ParameterDefinition.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.parameterType_ != 0) { + setParameterTypeValue(other.getParameterTypeValue()); + } + if (other.hasMinValue()) { + mergeMinValue(other.getMinValue()); + } + if (other.hasMaxValue()) { + mergeMaxValue(other.getMaxValue()); + } + if (allowedValuesBuilder_ == null) { + if (!other.allowedValues_.isEmpty()) { + if (allowedValues_.isEmpty()) { + allowedValues_ = other.allowedValues_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAllowedValuesIsMutable(); + allowedValues_.addAll(other.allowedValues_); + } + onChanged(); + } + } else { + if (!other.allowedValues_.isEmpty()) { + if (allowedValuesBuilder_.isEmpty()) { + allowedValuesBuilder_.dispose(); + allowedValuesBuilder_ = null; + allowedValues_ = other.allowedValues_; + bitField0_ = (bitField0_ & ~0x00000001); + allowedValuesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getAllowedValuesFieldBuilder() + : null; + } else { + allowedValuesBuilder_.addAllMessages(other.allowedValues_); + } + } + } + if (other.getOptional() != false) { + setOptional(other.getOptional()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ParameterDefinition parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ParameterDefinition) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Name of the parameter.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the parameter.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Name of the parameter.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Name of the parameter.
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Name of the parameter.
+     * 
+ * + * string name = 1; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private int parameterType_ = 0; + /** + * + * + *
+     * Data type of the parameter. Minimal value, Maximum value and allowed values
+     * will use specified data type here.
+     * 
+ * + * .google.cloud.channel.v1.ParameterDefinition.ParameterType parameter_type = 2; + * + * @return The enum numeric value on the wire for parameterType. + */ + @java.lang.Override + public int getParameterTypeValue() { + return parameterType_; + } + /** + * + * + *
+     * Data type of the parameter. Minimal value, Maximum value and allowed values
+     * will use specified data type here.
+     * 
+ * + * .google.cloud.channel.v1.ParameterDefinition.ParameterType parameter_type = 2; + * + * @param value The enum numeric value on the wire for parameterType to set. + * @return This builder for chaining. + */ + public Builder setParameterTypeValue(int value) { + + parameterType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Data type of the parameter. Minimal value, Maximum value and allowed values
+     * will use specified data type here.
+     * 
+ * + * .google.cloud.channel.v1.ParameterDefinition.ParameterType parameter_type = 2; + * + * @return The parameterType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ParameterDefinition.ParameterType getParameterType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ParameterDefinition.ParameterType result = + com.google.cloud.channel.v1.ParameterDefinition.ParameterType.valueOf(parameterType_); + return result == null + ? com.google.cloud.channel.v1.ParameterDefinition.ParameterType.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Data type of the parameter. Minimal value, Maximum value and allowed values
+     * will use specified data type here.
+     * 
+ * + * .google.cloud.channel.v1.ParameterDefinition.ParameterType parameter_type = 2; + * + * @param value The parameterType to set. + * @return This builder for chaining. + */ + public Builder setParameterType( + com.google.cloud.channel.v1.ParameterDefinition.ParameterType value) { + if (value == null) { + throw new NullPointerException(); + } + + parameterType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Data type of the parameter. Minimal value, Maximum value and allowed values
+     * will use specified data type here.
+     * 
+ * + * .google.cloud.channel.v1.ParameterDefinition.ParameterType parameter_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearParameterType() { + + parameterType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.Value minValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder> + minValueBuilder_; + /** + * + * + *
+     * Minimal value of the parameter, if applicable. Inclusive. For example,
+     * minimal commitment when purchasing Anthos is 0.01.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + * + * @return Whether the minValue field is set. + */ + public boolean hasMinValue() { + return minValueBuilder_ != null || minValue_ != null; + } + /** + * + * + *
+     * Minimal value of the parameter, if applicable. Inclusive. For example,
+     * minimal commitment when purchasing Anthos is 0.01.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + * + * @return The minValue. + */ + public com.google.cloud.channel.v1.Value getMinValue() { + if (minValueBuilder_ == null) { + return minValue_ == null + ? com.google.cloud.channel.v1.Value.getDefaultInstance() + : minValue_; + } else { + return minValueBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Minimal value of the parameter, if applicable. Inclusive. For example,
+     * minimal commitment when purchasing Anthos is 0.01.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + */ + public Builder setMinValue(com.google.cloud.channel.v1.Value value) { + if (minValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + minValue_ = value; + onChanged(); + } else { + minValueBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Minimal value of the parameter, if applicable. Inclusive. For example,
+     * minimal commitment when purchasing Anthos is 0.01.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + */ + public Builder setMinValue(com.google.cloud.channel.v1.Value.Builder builderForValue) { + if (minValueBuilder_ == null) { + minValue_ = builderForValue.build(); + onChanged(); + } else { + minValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Minimal value of the parameter, if applicable. Inclusive. For example,
+     * minimal commitment when purchasing Anthos is 0.01.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + */ + public Builder mergeMinValue(com.google.cloud.channel.v1.Value value) { + if (minValueBuilder_ == null) { + if (minValue_ != null) { + minValue_ = + com.google.cloud.channel.v1.Value.newBuilder(minValue_) + .mergeFrom(value) + .buildPartial(); + } else { + minValue_ = value; + } + onChanged(); + } else { + minValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Minimal value of the parameter, if applicable. Inclusive. For example,
+     * minimal commitment when purchasing Anthos is 0.01.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + */ + public Builder clearMinValue() { + if (minValueBuilder_ == null) { + minValue_ = null; + onChanged(); + } else { + minValue_ = null; + minValueBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Minimal value of the parameter, if applicable. Inclusive. For example,
+     * minimal commitment when purchasing Anthos is 0.01.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + */ + public com.google.cloud.channel.v1.Value.Builder getMinValueBuilder() { + + onChanged(); + return getMinValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Minimal value of the parameter, if applicable. Inclusive. For example,
+     * minimal commitment when purchasing Anthos is 0.01.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + */ + public com.google.cloud.channel.v1.ValueOrBuilder getMinValueOrBuilder() { + if (minValueBuilder_ != null) { + return minValueBuilder_.getMessageOrBuilder(); + } else { + return minValue_ == null + ? com.google.cloud.channel.v1.Value.getDefaultInstance() + : minValue_; + } + } + /** + * + * + *
+     * Minimal value of the parameter, if applicable. Inclusive. For example,
+     * minimal commitment when purchasing Anthos is 0.01.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder> + getMinValueFieldBuilder() { + if (minValueBuilder_ == null) { + minValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder>( + getMinValue(), getParentForChildren(), isClean()); + minValue_ = null; + } + return minValueBuilder_; + } + + private com.google.cloud.channel.v1.Value maxValue_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder> + maxValueBuilder_; + /** + * + * + *
+     * Maximum value of the parameter, if applicable. Inclusive. For example,
+     * maximum seats when purchasing Google Workspace Business Standard.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + * + * @return Whether the maxValue field is set. + */ + public boolean hasMaxValue() { + return maxValueBuilder_ != null || maxValue_ != null; + } + /** + * + * + *
+     * Maximum value of the parameter, if applicable. Inclusive. For example,
+     * maximum seats when purchasing Google Workspace Business Standard.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + * + * @return The maxValue. + */ + public com.google.cloud.channel.v1.Value getMaxValue() { + if (maxValueBuilder_ == null) { + return maxValue_ == null + ? com.google.cloud.channel.v1.Value.getDefaultInstance() + : maxValue_; + } else { + return maxValueBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Maximum value of the parameter, if applicable. Inclusive. For example,
+     * maximum seats when purchasing Google Workspace Business Standard.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + */ + public Builder setMaxValue(com.google.cloud.channel.v1.Value value) { + if (maxValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + maxValue_ = value; + onChanged(); + } else { + maxValueBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Maximum value of the parameter, if applicable. Inclusive. For example,
+     * maximum seats when purchasing Google Workspace Business Standard.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + */ + public Builder setMaxValue(com.google.cloud.channel.v1.Value.Builder builderForValue) { + if (maxValueBuilder_ == null) { + maxValue_ = builderForValue.build(); + onChanged(); + } else { + maxValueBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Maximum value of the parameter, if applicable. Inclusive. For example,
+     * maximum seats when purchasing Google Workspace Business Standard.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + */ + public Builder mergeMaxValue(com.google.cloud.channel.v1.Value value) { + if (maxValueBuilder_ == null) { + if (maxValue_ != null) { + maxValue_ = + com.google.cloud.channel.v1.Value.newBuilder(maxValue_) + .mergeFrom(value) + .buildPartial(); + } else { + maxValue_ = value; + } + onChanged(); + } else { + maxValueBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Maximum value of the parameter, if applicable. Inclusive. For example,
+     * maximum seats when purchasing Google Workspace Business Standard.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + */ + public Builder clearMaxValue() { + if (maxValueBuilder_ == null) { + maxValue_ = null; + onChanged(); + } else { + maxValue_ = null; + maxValueBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Maximum value of the parameter, if applicable. Inclusive. For example,
+     * maximum seats when purchasing Google Workspace Business Standard.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + */ + public com.google.cloud.channel.v1.Value.Builder getMaxValueBuilder() { + + onChanged(); + return getMaxValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Maximum value of the parameter, if applicable. Inclusive. For example,
+     * maximum seats when purchasing Google Workspace Business Standard.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + */ + public com.google.cloud.channel.v1.ValueOrBuilder getMaxValueOrBuilder() { + if (maxValueBuilder_ != null) { + return maxValueBuilder_.getMessageOrBuilder(); + } else { + return maxValue_ == null + ? com.google.cloud.channel.v1.Value.getDefaultInstance() + : maxValue_; + } + } + /** + * + * + *
+     * Maximum value of the parameter, if applicable. Inclusive. For example,
+     * maximum seats when purchasing Google Workspace Business Standard.
+     * Applicable to INT64 and DOUBLE parameter types.
+     * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder> + getMaxValueFieldBuilder() { + if (maxValueBuilder_ == null) { + maxValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder>( + getMaxValue(), getParentForChildren(), isClean()); + maxValue_ = null; + } + return maxValueBuilder_; + } + + private java.util.List allowedValues_ = + java.util.Collections.emptyList(); + + private void ensureAllowedValuesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + allowedValues_ = new java.util.ArrayList(allowedValues_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder> + allowedValuesBuilder_; + + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public java.util.List getAllowedValuesList() { + if (allowedValuesBuilder_ == null) { + return java.util.Collections.unmodifiableList(allowedValues_); + } else { + return allowedValuesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public int getAllowedValuesCount() { + if (allowedValuesBuilder_ == null) { + return allowedValues_.size(); + } else { + return allowedValuesBuilder_.getCount(); + } + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public com.google.cloud.channel.v1.Value getAllowedValues(int index) { + if (allowedValuesBuilder_ == null) { + return allowedValues_.get(index); + } else { + return allowedValuesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public Builder setAllowedValues(int index, com.google.cloud.channel.v1.Value value) { + if (allowedValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedValuesIsMutable(); + allowedValues_.set(index, value); + onChanged(); + } else { + allowedValuesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public Builder setAllowedValues( + int index, com.google.cloud.channel.v1.Value.Builder builderForValue) { + if (allowedValuesBuilder_ == null) { + ensureAllowedValuesIsMutable(); + allowedValues_.set(index, builderForValue.build()); + onChanged(); + } else { + allowedValuesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public Builder addAllowedValues(com.google.cloud.channel.v1.Value value) { + if (allowedValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedValuesIsMutable(); + allowedValues_.add(value); + onChanged(); + } else { + allowedValuesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public Builder addAllowedValues(int index, com.google.cloud.channel.v1.Value value) { + if (allowedValuesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureAllowedValuesIsMutable(); + allowedValues_.add(index, value); + onChanged(); + } else { + allowedValuesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public Builder addAllowedValues(com.google.cloud.channel.v1.Value.Builder builderForValue) { + if (allowedValuesBuilder_ == null) { + ensureAllowedValuesIsMutable(); + allowedValues_.add(builderForValue.build()); + onChanged(); + } else { + allowedValuesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public Builder addAllowedValues( + int index, com.google.cloud.channel.v1.Value.Builder builderForValue) { + if (allowedValuesBuilder_ == null) { + ensureAllowedValuesIsMutable(); + allowedValues_.add(index, builderForValue.build()); + onChanged(); + } else { + allowedValuesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public Builder addAllAllowedValues( + java.lang.Iterable values) { + if (allowedValuesBuilder_ == null) { + ensureAllowedValuesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, allowedValues_); + onChanged(); + } else { + allowedValuesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public Builder clearAllowedValues() { + if (allowedValuesBuilder_ == null) { + allowedValues_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + allowedValuesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public Builder removeAllowedValues(int index) { + if (allowedValuesBuilder_ == null) { + ensureAllowedValuesIsMutable(); + allowedValues_.remove(index); + onChanged(); + } else { + allowedValuesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public com.google.cloud.channel.v1.Value.Builder getAllowedValuesBuilder(int index) { + return getAllowedValuesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public com.google.cloud.channel.v1.ValueOrBuilder getAllowedValuesOrBuilder(int index) { + if (allowedValuesBuilder_ == null) { + return allowedValues_.get(index); + } else { + return allowedValuesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public java.util.List + getAllowedValuesOrBuilderList() { + if (allowedValuesBuilder_ != null) { + return allowedValuesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(allowedValues_); + } + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public com.google.cloud.channel.v1.Value.Builder addAllowedValuesBuilder() { + return getAllowedValuesFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.Value.getDefaultInstance()); + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public com.google.cloud.channel.v1.Value.Builder addAllowedValuesBuilder(int index) { + return getAllowedValuesFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Value.getDefaultInstance()); + } + /** + * + * + *
+     * If not empty, parameter values must be drawn from this list.
+     * For example, [us-west1, us-west2, ...]
+     * Applicable to STRING parameter type.
+     * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + public java.util.List getAllowedValuesBuilderList() { + return getAllowedValuesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder> + getAllowedValuesFieldBuilder() { + if (allowedValuesBuilder_ == null) { + allowedValuesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Value, + com.google.cloud.channel.v1.Value.Builder, + com.google.cloud.channel.v1.ValueOrBuilder>( + allowedValues_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + allowedValues_ = null; + } + return allowedValuesBuilder_; + } + + private boolean optional_; + /** + * + * + *
+     * If set to true, parameter is optional to purchase this Offer.
+     * 
+ * + * bool optional = 6; + * + * @return The optional. + */ + @java.lang.Override + public boolean getOptional() { + return optional_; + } + /** + * + * + *
+     * If set to true, parameter is optional to purchase this Offer.
+     * 
+ * + * bool optional = 6; + * + * @param value The optional to set. + * @return This builder for chaining. + */ + public Builder setOptional(boolean value) { + + optional_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set to true, parameter is optional to purchase this Offer.
+     * 
+ * + * bool optional = 6; + * + * @return This builder for chaining. + */ + public Builder clearOptional() { + + optional_ = false; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ParameterDefinition) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ParameterDefinition) + private static final com.google.cloud.channel.v1.ParameterDefinition DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ParameterDefinition(); + } + + public static com.google.cloud.channel.v1.ParameterDefinition getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ParameterDefinition parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ParameterDefinition(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ParameterDefinition getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ParameterDefinitionOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ParameterDefinitionOrBuilder.java new file mode 100644 index 00000000..fdfe1658 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ParameterDefinitionOrBuilder.java @@ -0,0 +1,234 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +public interface ParameterDefinitionOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ParameterDefinition) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parameter.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the parameter.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Data type of the parameter. Minimal value, Maximum value and allowed values
+   * will use specified data type here.
+   * 
+ * + * .google.cloud.channel.v1.ParameterDefinition.ParameterType parameter_type = 2; + * + * @return The enum numeric value on the wire for parameterType. + */ + int getParameterTypeValue(); + /** + * + * + *
+   * Data type of the parameter. Minimal value, Maximum value and allowed values
+   * will use specified data type here.
+   * 
+ * + * .google.cloud.channel.v1.ParameterDefinition.ParameterType parameter_type = 2; + * + * @return The parameterType. + */ + com.google.cloud.channel.v1.ParameterDefinition.ParameterType getParameterType(); + + /** + * + * + *
+   * Minimal value of the parameter, if applicable. Inclusive. For example,
+   * minimal commitment when purchasing Anthos is 0.01.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + * + * @return Whether the minValue field is set. + */ + boolean hasMinValue(); + /** + * + * + *
+   * Minimal value of the parameter, if applicable. Inclusive. For example,
+   * minimal commitment when purchasing Anthos is 0.01.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + * + * @return The minValue. + */ + com.google.cloud.channel.v1.Value getMinValue(); + /** + * + * + *
+   * Minimal value of the parameter, if applicable. Inclusive. For example,
+   * minimal commitment when purchasing Anthos is 0.01.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value min_value = 3; + */ + com.google.cloud.channel.v1.ValueOrBuilder getMinValueOrBuilder(); + + /** + * + * + *
+   * Maximum value of the parameter, if applicable. Inclusive. For example,
+   * maximum seats when purchasing Google Workspace Business Standard.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + * + * @return Whether the maxValue field is set. + */ + boolean hasMaxValue(); + /** + * + * + *
+   * Maximum value of the parameter, if applicable. Inclusive. For example,
+   * maximum seats when purchasing Google Workspace Business Standard.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + * + * @return The maxValue. + */ + com.google.cloud.channel.v1.Value getMaxValue(); + /** + * + * + *
+   * Maximum value of the parameter, if applicable. Inclusive. For example,
+   * maximum seats when purchasing Google Workspace Business Standard.
+   * Applicable to INT64 and DOUBLE parameter types.
+   * 
+ * + * .google.cloud.channel.v1.Value max_value = 4; + */ + com.google.cloud.channel.v1.ValueOrBuilder getMaxValueOrBuilder(); + + /** + * + * + *
+   * If not empty, parameter values must be drawn from this list.
+   * For example, [us-west1, us-west2, ...]
+   * Applicable to STRING parameter type.
+   * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + java.util.List getAllowedValuesList(); + /** + * + * + *
+   * If not empty, parameter values must be drawn from this list.
+   * For example, [us-west1, us-west2, ...]
+   * Applicable to STRING parameter type.
+   * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + com.google.cloud.channel.v1.Value getAllowedValues(int index); + /** + * + * + *
+   * If not empty, parameter values must be drawn from this list.
+   * For example, [us-west1, us-west2, ...]
+   * Applicable to STRING parameter type.
+   * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + int getAllowedValuesCount(); + /** + * + * + *
+   * If not empty, parameter values must be drawn from this list.
+   * For example, [us-west1, us-west2, ...]
+   * Applicable to STRING parameter type.
+   * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + java.util.List + getAllowedValuesOrBuilderList(); + /** + * + * + *
+   * If not empty, parameter values must be drawn from this list.
+   * For example, [us-west1, us-west2, ...]
+   * Applicable to STRING parameter type.
+   * 
+ * + * repeated .google.cloud.channel.v1.Value allowed_values = 5; + */ + com.google.cloud.channel.v1.ValueOrBuilder getAllowedValuesOrBuilder(int index); + + /** + * + * + *
+   * If set to true, parameter is optional to purchase this Offer.
+   * 
+ * + * bool optional = 6; + * + * @return The optional. + */ + boolean getOptional(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ParameterOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ParameterOrBuilder.java new file mode 100644 index 00000000..db127f56 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ParameterOrBuilder.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/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +public interface ParameterOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Parameter) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Name of the parameter.
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Name of the parameter.
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Value of the parameter.
+   * 
+ * + * .google.cloud.channel.v1.Value value = 2; + * + * @return Whether the value field is set. + */ + boolean hasValue(); + /** + * + * + *
+   * Value of the parameter.
+   * 
+ * + * .google.cloud.channel.v1.Value value = 2; + * + * @return The value. + */ + com.google.cloud.channel.v1.Value getValue(); + /** + * + * + *
+   * Value of the parameter.
+   * 
+ * + * .google.cloud.channel.v1.Value value = 2; + */ + com.google.cloud.channel.v1.ValueOrBuilder getValueOrBuilder(); + + /** + * + * + *
+   * Output only. Specifies whether this parameter is allowed to be changed. For example, for
+   * a Google Workspace Business Starter entitlement in commitment plan,
+   * num_units is editable when entitlement is active.
+   * 
+ * + * bool editable = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The editable. + */ + boolean getEditable(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PaymentPlan.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PaymentPlan.java new file mode 100644 index 00000000..494e3387 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PaymentPlan.java @@ -0,0 +1,242 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Describes how the reseller will be billed.
+ * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.PaymentPlan} + */ +public enum PaymentPlan implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not used.
+   * 
+ * + * PAYMENT_PLAN_UNSPECIFIED = 0; + */ + PAYMENT_PLAN_UNSPECIFIED(0), + /** + * + * + *
+   * Commitment.
+   * 
+ * + * COMMITMENT = 1; + */ + COMMITMENT(1), + /** + * + * + *
+   * No commitment.
+   * 
+ * + * FLEXIBLE = 2; + */ + FLEXIBLE(2), + /** + * + * + *
+   * Free.
+   * 
+ * + * FREE = 3; + */ + FREE(3), + /** + * + * + *
+   * Trial.
+   * 
+ * + * TRIAL = 4; + */ + TRIAL(4), + /** + * + * + *
+   * Price and ordering not available through API.
+   * 
+ * + * OFFLINE = 5; + */ + OFFLINE(5), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not used.
+   * 
+ * + * PAYMENT_PLAN_UNSPECIFIED = 0; + */ + public static final int PAYMENT_PLAN_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Commitment.
+   * 
+ * + * COMMITMENT = 1; + */ + public static final int COMMITMENT_VALUE = 1; + /** + * + * + *
+   * No commitment.
+   * 
+ * + * FLEXIBLE = 2; + */ + public static final int FLEXIBLE_VALUE = 2; + /** + * + * + *
+   * Free.
+   * 
+ * + * FREE = 3; + */ + public static final int FREE_VALUE = 3; + /** + * + * + *
+   * Trial.
+   * 
+ * + * TRIAL = 4; + */ + public static final int TRIAL_VALUE = 4; + /** + * + * + *
+   * Price and ordering not available through API.
+   * 
+ * + * OFFLINE = 5; + */ + public static final int OFFLINE_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 PaymentPlan 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 PaymentPlan forNumber(int value) { + switch (value) { + case 0: + return PAYMENT_PLAN_UNSPECIFIED; + case 1: + return COMMITMENT; + case 2: + return FLEXIBLE; + case 3: + return FREE; + case 4: + return TRIAL; + case 5: + return OFFLINE; + 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 PaymentPlan findValueByNumber(int number) { + return PaymentPlan.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto.getDescriptor().getEnumTypes().get(1); + } + + private static final PaymentPlan[] VALUES = values(); + + public static PaymentPlan 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 PaymentPlan(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.PaymentPlan) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PaymentType.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PaymentType.java new file mode 100644 index 00000000..818f78b6 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PaymentType.java @@ -0,0 +1,176 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Specifies when the payment needs to happen.
+ * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.PaymentType} + */ +public enum PaymentType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not used.
+   * 
+ * + * PAYMENT_TYPE_UNSPECIFIED = 0; + */ + PAYMENT_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Prepay. Amount has to be paid before service is rendered.
+   * 
+ * + * PREPAY = 1; + */ + PREPAY(1), + /** + * + * + *
+   * Postpay. Reseller is charged at the end of the Payment cycle.
+   * 
+ * + * POSTPAY = 2; + */ + POSTPAY(2), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not used.
+   * 
+ * + * PAYMENT_TYPE_UNSPECIFIED = 0; + */ + public static final int PAYMENT_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Prepay. Amount has to be paid before service is rendered.
+   * 
+ * + * PREPAY = 1; + */ + public static final int PREPAY_VALUE = 1; + /** + * + * + *
+   * Postpay. Reseller is charged at the end of the Payment cycle.
+   * 
+ * + * POSTPAY = 2; + */ + public static final int POSTPAY_VALUE = 2; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PaymentType 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 PaymentType forNumber(int value) { + switch (value) { + case 0: + return PAYMENT_TYPE_UNSPECIFIED; + case 1: + return PREPAY; + case 2: + return POSTPAY; + 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 PaymentType findValueByNumber(int number) { + return PaymentType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto.getDescriptor().getEnumTypes().get(2); + } + + private static final PaymentType[] VALUES = values(); + + public static PaymentType 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 PaymentType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.PaymentType) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Period.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Period.java new file mode 100644 index 00000000..aff797a4 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Period.java @@ -0,0 +1,692 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Represents period in days/months/years.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Period} + */ +public final class Period extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Period) + PeriodOrBuilder { + private static final long serialVersionUID = 0L; + // Use Period.newBuilder() to construct. + private Period(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Period() { + periodType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Period(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Period( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + duration_ = input.readInt32(); + break; + } + case 16: + { + int rawValue = input.readEnum(); + + periodType_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Period_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Period_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Period.class, + com.google.cloud.channel.v1.Period.Builder.class); + } + + public static final int DURATION_FIELD_NUMBER = 1; + private int duration_; + /** + * + * + *
+   * Total duration of Period Type defined.
+   * 
+ * + * int32 duration = 1; + * + * @return The duration. + */ + @java.lang.Override + public int getDuration() { + return duration_; + } + + public static final int PERIOD_TYPE_FIELD_NUMBER = 2; + private int periodType_; + /** + * + * + *
+   * Period Type.
+   * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 2; + * + * @return The enum numeric value on the wire for periodType. + */ + @java.lang.Override + public int getPeriodTypeValue() { + return periodType_; + } + /** + * + * + *
+   * Period Type.
+   * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 2; + * + * @return The periodType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.PeriodType getPeriodType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.PeriodType result = + com.google.cloud.channel.v1.PeriodType.valueOf(periodType_); + return result == null ? com.google.cloud.channel.v1.PeriodType.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 (duration_ != 0) { + output.writeInt32(1, duration_); + } + if (periodType_ != com.google.cloud.channel.v1.PeriodType.PERIOD_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, periodType_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (duration_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, duration_); + } + if (periodType_ != com.google.cloud.channel.v1.PeriodType.PERIOD_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, periodType_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Period)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Period other = (com.google.cloud.channel.v1.Period) obj; + + if (getDuration() != other.getDuration()) return false; + if (periodType_ != other.periodType_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + DURATION_FIELD_NUMBER; + hash = (53 * hash) + getDuration(); + hash = (37 * hash) + PERIOD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + periodType_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Period parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Period parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Period parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Period parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Period parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Period parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Period parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Period parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Period parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Period parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Period parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Period parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Period prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 period in days/months/years.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Period} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Period) + com.google.cloud.channel.v1.PeriodOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Period_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Period_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Period.class, + com.google.cloud.channel.v1.Period.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Period.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + duration_ = 0; + + periodType_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Period_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Period getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Period.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Period build() { + com.google.cloud.channel.v1.Period result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Period buildPartial() { + com.google.cloud.channel.v1.Period result = new com.google.cloud.channel.v1.Period(this); + result.duration_ = duration_; + result.periodType_ = periodType_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Period) { + return mergeFrom((com.google.cloud.channel.v1.Period) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Period other) { + if (other == com.google.cloud.channel.v1.Period.getDefaultInstance()) return this; + if (other.getDuration() != 0) { + setDuration(other.getDuration()); + } + if (other.periodType_ != 0) { + setPeriodTypeValue(other.getPeriodTypeValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Period parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Period) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int duration_; + /** + * + * + *
+     * Total duration of Period Type defined.
+     * 
+ * + * int32 duration = 1; + * + * @return The duration. + */ + @java.lang.Override + public int getDuration() { + return duration_; + } + /** + * + * + *
+     * Total duration of Period Type defined.
+     * 
+ * + * int32 duration = 1; + * + * @param value The duration to set. + * @return This builder for chaining. + */ + public Builder setDuration(int value) { + + duration_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Total duration of Period Type defined.
+     * 
+ * + * int32 duration = 1; + * + * @return This builder for chaining. + */ + public Builder clearDuration() { + + duration_ = 0; + onChanged(); + return this; + } + + private int periodType_ = 0; + /** + * + * + *
+     * Period Type.
+     * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 2; + * + * @return The enum numeric value on the wire for periodType. + */ + @java.lang.Override + public int getPeriodTypeValue() { + return periodType_; + } + /** + * + * + *
+     * Period Type.
+     * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 2; + * + * @param value The enum numeric value on the wire for periodType to set. + * @return This builder for chaining. + */ + public Builder setPeriodTypeValue(int value) { + + periodType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Period Type.
+     * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 2; + * + * @return The periodType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.PeriodType getPeriodType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.PeriodType result = + com.google.cloud.channel.v1.PeriodType.valueOf(periodType_); + return result == null ? com.google.cloud.channel.v1.PeriodType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Period Type.
+     * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 2; + * + * @param value The periodType to set. + * @return This builder for chaining. + */ + public Builder setPeriodType(com.google.cloud.channel.v1.PeriodType value) { + if (value == null) { + throw new NullPointerException(); + } + + periodType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Period Type.
+     * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearPeriodType() { + + periodType_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Period) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Period) + private static final com.google.cloud.channel.v1.Period DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Period(); + } + + public static com.google.cloud.channel.v1.Period getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Period parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Period(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Period getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PeriodOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PeriodOrBuilder.java new file mode 100644 index 00000000..4a687c5f --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PeriodOrBuilder.java @@ -0,0 +1,63 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +public interface PeriodOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Period) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Total duration of Period Type defined.
+   * 
+ * + * int32 duration = 1; + * + * @return The duration. + */ + int getDuration(); + + /** + * + * + *
+   * Period Type.
+   * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 2; + * + * @return The enum numeric value on the wire for periodType. + */ + int getPeriodTypeValue(); + /** + * + * + *
+   * Period Type.
+   * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 2; + * + * @return The periodType. + */ + com.google.cloud.channel.v1.PeriodType getPeriodType(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PeriodType.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PeriodType.java new file mode 100644 index 00000000..3ce62155 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PeriodType.java @@ -0,0 +1,198 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Period Type.
+ * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.PeriodType} + */ +public enum PeriodType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not used.
+   * 
+ * + * PERIOD_TYPE_UNSPECIFIED = 0; + */ + PERIOD_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Day.
+   * 
+ * + * DAY = 1; + */ + DAY(1), + /** + * + * + *
+   * Month.
+   * 
+ * + * MONTH = 2; + */ + MONTH(2), + /** + * + * + *
+   * Year.
+   * 
+ * + * YEAR = 3; + */ + YEAR(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not used.
+   * 
+ * + * PERIOD_TYPE_UNSPECIFIED = 0; + */ + public static final int PERIOD_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Day.
+   * 
+ * + * DAY = 1; + */ + public static final int DAY_VALUE = 1; + /** + * + * + *
+   * Month.
+   * 
+ * + * MONTH = 2; + */ + public static final int MONTH_VALUE = 2; + /** + * + * + *
+   * Year.
+   * 
+ * + * YEAR = 3; + */ + public static final int YEAR_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PeriodType 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 PeriodType forNumber(int value) { + switch (value) { + case 0: + return PERIOD_TYPE_UNSPECIFIED; + case 1: + return DAY; + case 2: + return MONTH; + case 3: + return YEAR; + 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 PeriodType findValueByNumber(int number) { + return PeriodType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto.getDescriptor().getEnumTypes().get(4); + } + + private static final PeriodType[] VALUES = values(); + + public static PeriodType 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 PeriodType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.PeriodType) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Plan.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Plan.java new file mode 100644 index 00000000..6c402c6a --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Plan.java @@ -0,0 +1,1379 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * The payment plan for the Offer. Describes how to make a payment.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Plan} + */ +public final class Plan extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Plan) + PlanOrBuilder { + private static final long serialVersionUID = 0L; + // Use Plan.newBuilder() to construct. + private Plan(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Plan() { + paymentPlan_ = 0; + paymentType_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Plan(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Plan( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + paymentPlan_ = rawValue; + break; + } + case 16: + { + int rawValue = input.readEnum(); + + paymentType_ = rawValue; + break; + } + case 26: + { + com.google.cloud.channel.v1.Period.Builder subBuilder = null; + if (paymentCycle_ != null) { + subBuilder = paymentCycle_.toBuilder(); + } + paymentCycle_ = + input.readMessage(com.google.cloud.channel.v1.Period.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(paymentCycle_); + paymentCycle_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + com.google.cloud.channel.v1.Period.Builder subBuilder = null; + if (trialPeriod_ != null) { + subBuilder = trialPeriod_.toBuilder(); + } + trialPeriod_ = + input.readMessage(com.google.cloud.channel.v1.Period.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(trialPeriod_); + trialPeriod_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Plan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Plan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Plan.class, com.google.cloud.channel.v1.Plan.Builder.class); + } + + public static final int PAYMENT_PLAN_FIELD_NUMBER = 1; + private int paymentPlan_; + /** + * + * + *
+   * Describes how a reseller will be billed.
+   * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 1; + * + * @return The enum numeric value on the wire for paymentPlan. + */ + @java.lang.Override + public int getPaymentPlanValue() { + return paymentPlan_; + } + /** + * + * + *
+   * Describes how a reseller will be billed.
+   * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 1; + * + * @return The paymentPlan. + */ + @java.lang.Override + public com.google.cloud.channel.v1.PaymentPlan getPaymentPlan() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.PaymentPlan result = + com.google.cloud.channel.v1.PaymentPlan.valueOf(paymentPlan_); + return result == null ? com.google.cloud.channel.v1.PaymentPlan.UNRECOGNIZED : result; + } + + public static final int PAYMENT_TYPE_FIELD_NUMBER = 2; + private int paymentType_; + /** + * + * + *
+   * Specifies when the payment needs to happen.
+   * 
+ * + * .google.cloud.channel.v1.PaymentType payment_type = 2; + * + * @return The enum numeric value on the wire for paymentType. + */ + @java.lang.Override + public int getPaymentTypeValue() { + return paymentType_; + } + /** + * + * + *
+   * Specifies when the payment needs to happen.
+   * 
+ * + * .google.cloud.channel.v1.PaymentType payment_type = 2; + * + * @return The paymentType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.PaymentType getPaymentType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.PaymentType result = + com.google.cloud.channel.v1.PaymentType.valueOf(paymentType_); + return result == null ? com.google.cloud.channel.v1.PaymentType.UNRECOGNIZED : result; + } + + public static final int PAYMENT_CYCLE_FIELD_NUMBER = 3; + private com.google.cloud.channel.v1.Period paymentCycle_; + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + * + * @return Whether the paymentCycle field is set. + */ + @java.lang.Override + public boolean hasPaymentCycle() { + return paymentCycle_ != null; + } + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + * + * @return The paymentCycle. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Period getPaymentCycle() { + return paymentCycle_ == null + ? com.google.cloud.channel.v1.Period.getDefaultInstance() + : paymentCycle_; + } + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PeriodOrBuilder getPaymentCycleOrBuilder() { + return getPaymentCycle(); + } + + public static final int TRIAL_PERIOD_FIELD_NUMBER = 4; + private com.google.cloud.channel.v1.Period trialPeriod_; + /** + * + * + *
+   * Present for Offers with a trial period.
+   * For trial-only Offers, a paid service needs to start before the trial
+   * period ends for continued service.
+   * For Regular Offers with a trial period, the regular pricing goes into
+   * effect when trial period ends, or if paid service is started before the end
+   * of the trial period.
+   * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + * + * @return Whether the trialPeriod field is set. + */ + @java.lang.Override + public boolean hasTrialPeriod() { + return trialPeriod_ != null; + } + /** + * + * + *
+   * Present for Offers with a trial period.
+   * For trial-only Offers, a paid service needs to start before the trial
+   * period ends for continued service.
+   * For Regular Offers with a trial period, the regular pricing goes into
+   * effect when trial period ends, or if paid service is started before the end
+   * of the trial period.
+   * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + * + * @return The trialPeriod. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Period getTrialPeriod() { + return trialPeriod_ == null + ? com.google.cloud.channel.v1.Period.getDefaultInstance() + : trialPeriod_; + } + /** + * + * + *
+   * Present for Offers with a trial period.
+   * For trial-only Offers, a paid service needs to start before the trial
+   * period ends for continued service.
+   * For Regular Offers with a trial period, the regular pricing goes into
+   * effect when trial period ends, or if paid service is started before the end
+   * of the trial period.
+   * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PeriodOrBuilder getTrialPeriodOrBuilder() { + return getTrialPeriod(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (paymentPlan_ + != com.google.cloud.channel.v1.PaymentPlan.PAYMENT_PLAN_UNSPECIFIED.getNumber()) { + output.writeEnum(1, paymentPlan_); + } + if (paymentType_ + != com.google.cloud.channel.v1.PaymentType.PAYMENT_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(2, paymentType_); + } + if (paymentCycle_ != null) { + output.writeMessage(3, getPaymentCycle()); + } + if (trialPeriod_ != null) { + output.writeMessage(4, getTrialPeriod()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (paymentPlan_ + != com.google.cloud.channel.v1.PaymentPlan.PAYMENT_PLAN_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, paymentPlan_); + } + if (paymentType_ + != com.google.cloud.channel.v1.PaymentType.PAYMENT_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, paymentType_); + } + if (paymentCycle_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPaymentCycle()); + } + if (trialPeriod_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getTrialPeriod()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Plan)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Plan other = (com.google.cloud.channel.v1.Plan) obj; + + if (paymentPlan_ != other.paymentPlan_) return false; + if (paymentType_ != other.paymentType_) return false; + if (hasPaymentCycle() != other.hasPaymentCycle()) return false; + if (hasPaymentCycle()) { + if (!getPaymentCycle().equals(other.getPaymentCycle())) return false; + } + if (hasTrialPeriod() != other.hasTrialPeriod()) return false; + if (hasTrialPeriod()) { + if (!getTrialPeriod().equals(other.getTrialPeriod())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PAYMENT_PLAN_FIELD_NUMBER; + hash = (53 * hash) + paymentPlan_; + hash = (37 * hash) + PAYMENT_TYPE_FIELD_NUMBER; + hash = (53 * hash) + paymentType_; + if (hasPaymentCycle()) { + hash = (37 * hash) + PAYMENT_CYCLE_FIELD_NUMBER; + hash = (53 * hash) + getPaymentCycle().hashCode(); + } + if (hasTrialPeriod()) { + hash = (37 * hash) + TRIAL_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getTrialPeriod().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Plan parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Plan parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Plan parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Plan parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Plan parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Plan parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Plan parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Plan parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Plan parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Plan parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Plan parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Plan parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Plan prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 payment plan for the Offer. Describes how to make a payment.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Plan} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Plan) + com.google.cloud.channel.v1.PlanOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Plan_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Plan_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Plan.class, + com.google.cloud.channel.v1.Plan.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Plan.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + paymentPlan_ = 0; + + paymentType_ = 0; + + if (paymentCycleBuilder_ == null) { + paymentCycle_ = null; + } else { + paymentCycle_ = null; + paymentCycleBuilder_ = null; + } + if (trialPeriodBuilder_ == null) { + trialPeriod_ = null; + } else { + trialPeriod_ = null; + trialPeriodBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Plan_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Plan getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Plan.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Plan build() { + com.google.cloud.channel.v1.Plan result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Plan buildPartial() { + com.google.cloud.channel.v1.Plan result = new com.google.cloud.channel.v1.Plan(this); + result.paymentPlan_ = paymentPlan_; + result.paymentType_ = paymentType_; + if (paymentCycleBuilder_ == null) { + result.paymentCycle_ = paymentCycle_; + } else { + result.paymentCycle_ = paymentCycleBuilder_.build(); + } + if (trialPeriodBuilder_ == null) { + result.trialPeriod_ = trialPeriod_; + } else { + result.trialPeriod_ = trialPeriodBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Plan) { + return mergeFrom((com.google.cloud.channel.v1.Plan) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Plan other) { + if (other == com.google.cloud.channel.v1.Plan.getDefaultInstance()) return this; + if (other.paymentPlan_ != 0) { + setPaymentPlanValue(other.getPaymentPlanValue()); + } + if (other.paymentType_ != 0) { + setPaymentTypeValue(other.getPaymentTypeValue()); + } + if (other.hasPaymentCycle()) { + mergePaymentCycle(other.getPaymentCycle()); + } + if (other.hasTrialPeriod()) { + mergeTrialPeriod(other.getTrialPeriod()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Plan parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Plan) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int paymentPlan_ = 0; + /** + * + * + *
+     * Describes how a reseller will be billed.
+     * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 1; + * + * @return The enum numeric value on the wire for paymentPlan. + */ + @java.lang.Override + public int getPaymentPlanValue() { + return paymentPlan_; + } + /** + * + * + *
+     * Describes how a reseller will be billed.
+     * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 1; + * + * @param value The enum numeric value on the wire for paymentPlan to set. + * @return This builder for chaining. + */ + public Builder setPaymentPlanValue(int value) { + + paymentPlan_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Describes how a reseller will be billed.
+     * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 1; + * + * @return The paymentPlan. + */ + @java.lang.Override + public com.google.cloud.channel.v1.PaymentPlan getPaymentPlan() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.PaymentPlan result = + com.google.cloud.channel.v1.PaymentPlan.valueOf(paymentPlan_); + return result == null ? com.google.cloud.channel.v1.PaymentPlan.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Describes how a reseller will be billed.
+     * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 1; + * + * @param value The paymentPlan to set. + * @return This builder for chaining. + */ + public Builder setPaymentPlan(com.google.cloud.channel.v1.PaymentPlan value) { + if (value == null) { + throw new NullPointerException(); + } + + paymentPlan_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes how a reseller will be billed.
+     * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 1; + * + * @return This builder for chaining. + */ + public Builder clearPaymentPlan() { + + paymentPlan_ = 0; + onChanged(); + return this; + } + + private int paymentType_ = 0; + /** + * + * + *
+     * Specifies when the payment needs to happen.
+     * 
+ * + * .google.cloud.channel.v1.PaymentType payment_type = 2; + * + * @return The enum numeric value on the wire for paymentType. + */ + @java.lang.Override + public int getPaymentTypeValue() { + return paymentType_; + } + /** + * + * + *
+     * Specifies when the payment needs to happen.
+     * 
+ * + * .google.cloud.channel.v1.PaymentType payment_type = 2; + * + * @param value The enum numeric value on the wire for paymentType to set. + * @return This builder for chaining. + */ + public Builder setPaymentTypeValue(int value) { + + paymentType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies when the payment needs to happen.
+     * 
+ * + * .google.cloud.channel.v1.PaymentType payment_type = 2; + * + * @return The paymentType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.PaymentType getPaymentType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.PaymentType result = + com.google.cloud.channel.v1.PaymentType.valueOf(paymentType_); + return result == null ? com.google.cloud.channel.v1.PaymentType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Specifies when the payment needs to happen.
+     * 
+ * + * .google.cloud.channel.v1.PaymentType payment_type = 2; + * + * @param value The paymentType to set. + * @return This builder for chaining. + */ + public Builder setPaymentType(com.google.cloud.channel.v1.PaymentType value) { + if (value == null) { + throw new NullPointerException(); + } + + paymentType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specifies when the payment needs to happen.
+     * 
+ * + * .google.cloud.channel.v1.PaymentType payment_type = 2; + * + * @return This builder for chaining. + */ + public Builder clearPaymentType() { + + paymentType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.Period paymentCycle_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Period, + com.google.cloud.channel.v1.Period.Builder, + com.google.cloud.channel.v1.PeriodOrBuilder> + paymentCycleBuilder_; + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + * + * @return Whether the paymentCycle field is set. + */ + public boolean hasPaymentCycle() { + return paymentCycleBuilder_ != null || paymentCycle_ != null; + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + * + * @return The paymentCycle. + */ + public com.google.cloud.channel.v1.Period getPaymentCycle() { + if (paymentCycleBuilder_ == null) { + return paymentCycle_ == null + ? com.google.cloud.channel.v1.Period.getDefaultInstance() + : paymentCycle_; + } else { + return paymentCycleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + */ + public Builder setPaymentCycle(com.google.cloud.channel.v1.Period value) { + if (paymentCycleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + paymentCycle_ = value; + onChanged(); + } else { + paymentCycleBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + */ + public Builder setPaymentCycle(com.google.cloud.channel.v1.Period.Builder builderForValue) { + if (paymentCycleBuilder_ == null) { + paymentCycle_ = builderForValue.build(); + onChanged(); + } else { + paymentCycleBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + */ + public Builder mergePaymentCycle(com.google.cloud.channel.v1.Period value) { + if (paymentCycleBuilder_ == null) { + if (paymentCycle_ != null) { + paymentCycle_ = + com.google.cloud.channel.v1.Period.newBuilder(paymentCycle_) + .mergeFrom(value) + .buildPartial(); + } else { + paymentCycle_ = value; + } + onChanged(); + } else { + paymentCycleBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + */ + public Builder clearPaymentCycle() { + if (paymentCycleBuilder_ == null) { + paymentCycle_ = null; + onChanged(); + } else { + paymentCycle_ = null; + paymentCycleBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + */ + public com.google.cloud.channel.v1.Period.Builder getPaymentCycleBuilder() { + + onChanged(); + return getPaymentCycleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + */ + public com.google.cloud.channel.v1.PeriodOrBuilder getPaymentCycleOrBuilder() { + if (paymentCycleBuilder_ != null) { + return paymentCycleBuilder_.getMessageOrBuilder(); + } else { + return paymentCycle_ == null + ? com.google.cloud.channel.v1.Period.getDefaultInstance() + : paymentCycle_; + } + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Period, + com.google.cloud.channel.v1.Period.Builder, + com.google.cloud.channel.v1.PeriodOrBuilder> + getPaymentCycleFieldBuilder() { + if (paymentCycleBuilder_ == null) { + paymentCycleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Period, + com.google.cloud.channel.v1.Period.Builder, + com.google.cloud.channel.v1.PeriodOrBuilder>( + getPaymentCycle(), getParentForChildren(), isClean()); + paymentCycle_ = null; + } + return paymentCycleBuilder_; + } + + private com.google.cloud.channel.v1.Period trialPeriod_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Period, + com.google.cloud.channel.v1.Period.Builder, + com.google.cloud.channel.v1.PeriodOrBuilder> + trialPeriodBuilder_; + /** + * + * + *
+     * Present for Offers with a trial period.
+     * For trial-only Offers, a paid service needs to start before the trial
+     * period ends for continued service.
+     * For Regular Offers with a trial period, the regular pricing goes into
+     * effect when trial period ends, or if paid service is started before the end
+     * of the trial period.
+     * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + * + * @return Whether the trialPeriod field is set. + */ + public boolean hasTrialPeriod() { + return trialPeriodBuilder_ != null || trialPeriod_ != null; + } + /** + * + * + *
+     * Present for Offers with a trial period.
+     * For trial-only Offers, a paid service needs to start before the trial
+     * period ends for continued service.
+     * For Regular Offers with a trial period, the regular pricing goes into
+     * effect when trial period ends, or if paid service is started before the end
+     * of the trial period.
+     * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + * + * @return The trialPeriod. + */ + public com.google.cloud.channel.v1.Period getTrialPeriod() { + if (trialPeriodBuilder_ == null) { + return trialPeriod_ == null + ? com.google.cloud.channel.v1.Period.getDefaultInstance() + : trialPeriod_; + } else { + return trialPeriodBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Present for Offers with a trial period.
+     * For trial-only Offers, a paid service needs to start before the trial
+     * period ends for continued service.
+     * For Regular Offers with a trial period, the regular pricing goes into
+     * effect when trial period ends, or if paid service is started before the end
+     * of the trial period.
+     * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + */ + public Builder setTrialPeriod(com.google.cloud.channel.v1.Period value) { + if (trialPeriodBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + trialPeriod_ = value; + onChanged(); + } else { + trialPeriodBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Present for Offers with a trial period.
+     * For trial-only Offers, a paid service needs to start before the trial
+     * period ends for continued service.
+     * For Regular Offers with a trial period, the regular pricing goes into
+     * effect when trial period ends, or if paid service is started before the end
+     * of the trial period.
+     * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + */ + public Builder setTrialPeriod(com.google.cloud.channel.v1.Period.Builder builderForValue) { + if (trialPeriodBuilder_ == null) { + trialPeriod_ = builderForValue.build(); + onChanged(); + } else { + trialPeriodBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Present for Offers with a trial period.
+     * For trial-only Offers, a paid service needs to start before the trial
+     * period ends for continued service.
+     * For Regular Offers with a trial period, the regular pricing goes into
+     * effect when trial period ends, or if paid service is started before the end
+     * of the trial period.
+     * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + */ + public Builder mergeTrialPeriod(com.google.cloud.channel.v1.Period value) { + if (trialPeriodBuilder_ == null) { + if (trialPeriod_ != null) { + trialPeriod_ = + com.google.cloud.channel.v1.Period.newBuilder(trialPeriod_) + .mergeFrom(value) + .buildPartial(); + } else { + trialPeriod_ = value; + } + onChanged(); + } else { + trialPeriodBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Present for Offers with a trial period.
+     * For trial-only Offers, a paid service needs to start before the trial
+     * period ends for continued service.
+     * For Regular Offers with a trial period, the regular pricing goes into
+     * effect when trial period ends, or if paid service is started before the end
+     * of the trial period.
+     * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + */ + public Builder clearTrialPeriod() { + if (trialPeriodBuilder_ == null) { + trialPeriod_ = null; + onChanged(); + } else { + trialPeriod_ = null; + trialPeriodBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Present for Offers with a trial period.
+     * For trial-only Offers, a paid service needs to start before the trial
+     * period ends for continued service.
+     * For Regular Offers with a trial period, the regular pricing goes into
+     * effect when trial period ends, or if paid service is started before the end
+     * of the trial period.
+     * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + */ + public com.google.cloud.channel.v1.Period.Builder getTrialPeriodBuilder() { + + onChanged(); + return getTrialPeriodFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Present for Offers with a trial period.
+     * For trial-only Offers, a paid service needs to start before the trial
+     * period ends for continued service.
+     * For Regular Offers with a trial period, the regular pricing goes into
+     * effect when trial period ends, or if paid service is started before the end
+     * of the trial period.
+     * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + */ + public com.google.cloud.channel.v1.PeriodOrBuilder getTrialPeriodOrBuilder() { + if (trialPeriodBuilder_ != null) { + return trialPeriodBuilder_.getMessageOrBuilder(); + } else { + return trialPeriod_ == null + ? com.google.cloud.channel.v1.Period.getDefaultInstance() + : trialPeriod_; + } + } + /** + * + * + *
+     * Present for Offers with a trial period.
+     * For trial-only Offers, a paid service needs to start before the trial
+     * period ends for continued service.
+     * For Regular Offers with a trial period, the regular pricing goes into
+     * effect when trial period ends, or if paid service is started before the end
+     * of the trial period.
+     * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Period, + com.google.cloud.channel.v1.Period.Builder, + com.google.cloud.channel.v1.PeriodOrBuilder> + getTrialPeriodFieldBuilder() { + if (trialPeriodBuilder_ == null) { + trialPeriodBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Period, + com.google.cloud.channel.v1.Period.Builder, + com.google.cloud.channel.v1.PeriodOrBuilder>( + getTrialPeriod(), getParentForChildren(), isClean()); + trialPeriod_ = null; + } + return trialPeriodBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Plan) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Plan) + private static final com.google.cloud.channel.v1.Plan DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Plan(); + } + + public static com.google.cloud.channel.v1.Plan getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Plan parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Plan(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Plan getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PlanOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PlanOrBuilder.java new file mode 100644 index 00000000..046cdc79 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PlanOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +public interface PlanOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Plan) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Describes how a reseller will be billed.
+   * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 1; + * + * @return The enum numeric value on the wire for paymentPlan. + */ + int getPaymentPlanValue(); + /** + * + * + *
+   * Describes how a reseller will be billed.
+   * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 1; + * + * @return The paymentPlan. + */ + com.google.cloud.channel.v1.PaymentPlan getPaymentPlan(); + + /** + * + * + *
+   * Specifies when the payment needs to happen.
+   * 
+ * + * .google.cloud.channel.v1.PaymentType payment_type = 2; + * + * @return The enum numeric value on the wire for paymentType. + */ + int getPaymentTypeValue(); + /** + * + * + *
+   * Specifies when the payment needs to happen.
+   * 
+ * + * .google.cloud.channel.v1.PaymentType payment_type = 2; + * + * @return The paymentType. + */ + com.google.cloud.channel.v1.PaymentType getPaymentType(); + + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + * + * @return Whether the paymentCycle field is set. + */ + boolean hasPaymentCycle(); + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + * + * @return The paymentCycle. + */ + com.google.cloud.channel.v1.Period getPaymentCycle(); + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 3; + */ + com.google.cloud.channel.v1.PeriodOrBuilder getPaymentCycleOrBuilder(); + + /** + * + * + *
+   * Present for Offers with a trial period.
+   * For trial-only Offers, a paid service needs to start before the trial
+   * period ends for continued service.
+   * For Regular Offers with a trial period, the regular pricing goes into
+   * effect when trial period ends, or if paid service is started before the end
+   * of the trial period.
+   * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + * + * @return Whether the trialPeriod field is set. + */ + boolean hasTrialPeriod(); + /** + * + * + *
+   * Present for Offers with a trial period.
+   * For trial-only Offers, a paid service needs to start before the trial
+   * period ends for continued service.
+   * For Regular Offers with a trial period, the regular pricing goes into
+   * effect when trial period ends, or if paid service is started before the end
+   * of the trial period.
+   * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + * + * @return The trialPeriod. + */ + com.google.cloud.channel.v1.Period getTrialPeriod(); + /** + * + * + *
+   * Present for Offers with a trial period.
+   * For trial-only Offers, a paid service needs to start before the trial
+   * period ends for continued service.
+   * For Regular Offers with a trial period, the regular pricing goes into
+   * effect when trial period ends, or if paid service is started before the end
+   * of the trial period.
+   * 
+ * + * .google.cloud.channel.v1.Period trial_period = 4; + */ + com.google.cloud.channel.v1.PeriodOrBuilder getTrialPeriodOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Price.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Price.java new file mode 100644 index 00000000..b9fb9c59 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Price.java @@ -0,0 +1,1258 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Represents the price of the Offer.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Price} + */ +public final class Price extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Price) + PriceOrBuilder { + private static final long serialVersionUID = 0L; + // Use Price.newBuilder() to construct. + private Price(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Price() { + externalPriceUri_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Price(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Price( + 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.type.Money.Builder subBuilder = null; + if (basePrice_ != null) { + subBuilder = basePrice_.toBuilder(); + } + basePrice_ = input.readMessage(com.google.type.Money.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(basePrice_); + basePrice_ = subBuilder.buildPartial(); + } + + break; + } + case 17: + { + discount_ = input.readDouble(); + break; + } + case 26: + { + com.google.type.Money.Builder subBuilder = null; + if (effectivePrice_ != null) { + subBuilder = effectivePrice_.toBuilder(); + } + effectivePrice_ = + input.readMessage(com.google.type.Money.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(effectivePrice_); + effectivePrice_ = subBuilder.buildPartial(); + } + + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + externalPriceUri_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Price_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Price_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Price.class, + com.google.cloud.channel.v1.Price.Builder.class); + } + + public static final int BASE_PRICE_FIELD_NUMBER = 1; + private com.google.type.Money basePrice_; + /** + * + * + *
+   * Base price.
+   * 
+ * + * .google.type.Money base_price = 1; + * + * @return Whether the basePrice field is set. + */ + @java.lang.Override + public boolean hasBasePrice() { + return basePrice_ != null; + } + /** + * + * + *
+   * Base price.
+   * 
+ * + * .google.type.Money base_price = 1; + * + * @return The basePrice. + */ + @java.lang.Override + public com.google.type.Money getBasePrice() { + return basePrice_ == null ? com.google.type.Money.getDefaultInstance() : basePrice_; + } + /** + * + * + *
+   * Base price.
+   * 
+ * + * .google.type.Money base_price = 1; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getBasePriceOrBuilder() { + return getBasePrice(); + } + + public static final int DISCOUNT_FIELD_NUMBER = 2; + private double discount_; + /** + * + * + *
+   * Discount percentage, represented as decimal.
+   * For example, a 20% discount will be represent as 0.2.
+   * 
+ * + * double discount = 2; + * + * @return The discount. + */ + @java.lang.Override + public double getDiscount() { + return discount_; + } + + public static final int EFFECTIVE_PRICE_FIELD_NUMBER = 3; + private com.google.type.Money effectivePrice_; + /** + * + * + *
+   * Effective Price after applying the discounts.
+   * 
+ * + * .google.type.Money effective_price = 3; + * + * @return Whether the effectivePrice field is set. + */ + @java.lang.Override + public boolean hasEffectivePrice() { + return effectivePrice_ != null; + } + /** + * + * + *
+   * Effective Price after applying the discounts.
+   * 
+ * + * .google.type.Money effective_price = 3; + * + * @return The effectivePrice. + */ + @java.lang.Override + public com.google.type.Money getEffectivePrice() { + return effectivePrice_ == null ? com.google.type.Money.getDefaultInstance() : effectivePrice_; + } + /** + * + * + *
+   * Effective Price after applying the discounts.
+   * 
+ * + * .google.type.Money effective_price = 3; + */ + @java.lang.Override + public com.google.type.MoneyOrBuilder getEffectivePriceOrBuilder() { + return getEffectivePrice(); + } + + public static final int EXTERNAL_PRICE_URI_FIELD_NUMBER = 4; + private volatile java.lang.Object externalPriceUri_; + /** + * + * + *
+   * Link to external price list, such as link to Google Voice rate card.
+   * 
+ * + * string external_price_uri = 4; + * + * @return The externalPriceUri. + */ + @java.lang.Override + public java.lang.String getExternalPriceUri() { + java.lang.Object ref = externalPriceUri_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalPriceUri_ = s; + return s; + } + } + /** + * + * + *
+   * Link to external price list, such as link to Google Voice rate card.
+   * 
+ * + * string external_price_uri = 4; + * + * @return The bytes for externalPriceUri. + */ + @java.lang.Override + public com.google.protobuf.ByteString getExternalPriceUriBytes() { + java.lang.Object ref = externalPriceUri_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalPriceUri_ = 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 (basePrice_ != null) { + output.writeMessage(1, getBasePrice()); + } + if (discount_ != 0D) { + output.writeDouble(2, discount_); + } + if (effectivePrice_ != null) { + output.writeMessage(3, getEffectivePrice()); + } + if (!getExternalPriceUriBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, externalPriceUri_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (basePrice_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getBasePrice()); + } + if (discount_ != 0D) { + size += com.google.protobuf.CodedOutputStream.computeDoubleSize(2, discount_); + } + if (effectivePrice_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getEffectivePrice()); + } + if (!getExternalPriceUriBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, externalPriceUri_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Price)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Price other = (com.google.cloud.channel.v1.Price) obj; + + if (hasBasePrice() != other.hasBasePrice()) return false; + if (hasBasePrice()) { + if (!getBasePrice().equals(other.getBasePrice())) return false; + } + if (java.lang.Double.doubleToLongBits(getDiscount()) + != java.lang.Double.doubleToLongBits(other.getDiscount())) return false; + if (hasEffectivePrice() != other.hasEffectivePrice()) return false; + if (hasEffectivePrice()) { + if (!getEffectivePrice().equals(other.getEffectivePrice())) return false; + } + if (!getExternalPriceUri().equals(other.getExternalPriceUri())) return false; + if (!unknownFields.equals(other.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 (hasBasePrice()) { + hash = (37 * hash) + BASE_PRICE_FIELD_NUMBER; + hash = (53 * hash) + getBasePrice().hashCode(); + } + hash = (37 * hash) + DISCOUNT_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDiscount())); + if (hasEffectivePrice()) { + hash = (37 * hash) + EFFECTIVE_PRICE_FIELD_NUMBER; + hash = (53 * hash) + getEffectivePrice().hashCode(); + } + hash = (37 * hash) + EXTERNAL_PRICE_URI_FIELD_NUMBER; + hash = (53 * hash) + getExternalPriceUri().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Price parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Price parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Price parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Price parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Price parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Price parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Price parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Price parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Price parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Price parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Price parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Price parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Price prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 price of the Offer.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Price} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Price) + com.google.cloud.channel.v1.PriceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Price_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Price_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Price.class, + com.google.cloud.channel.v1.Price.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Price.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (basePriceBuilder_ == null) { + basePrice_ = null; + } else { + basePrice_ = null; + basePriceBuilder_ = null; + } + discount_ = 0D; + + if (effectivePriceBuilder_ == null) { + effectivePrice_ = null; + } else { + effectivePrice_ = null; + effectivePriceBuilder_ = null; + } + externalPriceUri_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_Price_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Price getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Price.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Price build() { + com.google.cloud.channel.v1.Price result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Price buildPartial() { + com.google.cloud.channel.v1.Price result = new com.google.cloud.channel.v1.Price(this); + if (basePriceBuilder_ == null) { + result.basePrice_ = basePrice_; + } else { + result.basePrice_ = basePriceBuilder_.build(); + } + result.discount_ = discount_; + if (effectivePriceBuilder_ == null) { + result.effectivePrice_ = effectivePrice_; + } else { + result.effectivePrice_ = effectivePriceBuilder_.build(); + } + result.externalPriceUri_ = externalPriceUri_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Price) { + return mergeFrom((com.google.cloud.channel.v1.Price) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Price other) { + if (other == com.google.cloud.channel.v1.Price.getDefaultInstance()) return this; + if (other.hasBasePrice()) { + mergeBasePrice(other.getBasePrice()); + } + if (other.getDiscount() != 0D) { + setDiscount(other.getDiscount()); + } + if (other.hasEffectivePrice()) { + mergeEffectivePrice(other.getEffectivePrice()); + } + if (!other.getExternalPriceUri().isEmpty()) { + externalPriceUri_ = other.externalPriceUri_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Price parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Price) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.type.Money basePrice_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + basePriceBuilder_; + /** + * + * + *
+     * Base price.
+     * 
+ * + * .google.type.Money base_price = 1; + * + * @return Whether the basePrice field is set. + */ + public boolean hasBasePrice() { + return basePriceBuilder_ != null || basePrice_ != null; + } + /** + * + * + *
+     * Base price.
+     * 
+ * + * .google.type.Money base_price = 1; + * + * @return The basePrice. + */ + public com.google.type.Money getBasePrice() { + if (basePriceBuilder_ == null) { + return basePrice_ == null ? com.google.type.Money.getDefaultInstance() : basePrice_; + } else { + return basePriceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Base price.
+     * 
+ * + * .google.type.Money base_price = 1; + */ + public Builder setBasePrice(com.google.type.Money value) { + if (basePriceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + basePrice_ = value; + onChanged(); + } else { + basePriceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Base price.
+     * 
+ * + * .google.type.Money base_price = 1; + */ + public Builder setBasePrice(com.google.type.Money.Builder builderForValue) { + if (basePriceBuilder_ == null) { + basePrice_ = builderForValue.build(); + onChanged(); + } else { + basePriceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Base price.
+     * 
+ * + * .google.type.Money base_price = 1; + */ + public Builder mergeBasePrice(com.google.type.Money value) { + if (basePriceBuilder_ == null) { + if (basePrice_ != null) { + basePrice_ = com.google.type.Money.newBuilder(basePrice_).mergeFrom(value).buildPartial(); + } else { + basePrice_ = value; + } + onChanged(); + } else { + basePriceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Base price.
+     * 
+ * + * .google.type.Money base_price = 1; + */ + public Builder clearBasePrice() { + if (basePriceBuilder_ == null) { + basePrice_ = null; + onChanged(); + } else { + basePrice_ = null; + basePriceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Base price.
+     * 
+ * + * .google.type.Money base_price = 1; + */ + public com.google.type.Money.Builder getBasePriceBuilder() { + + onChanged(); + return getBasePriceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Base price.
+     * 
+ * + * .google.type.Money base_price = 1; + */ + public com.google.type.MoneyOrBuilder getBasePriceOrBuilder() { + if (basePriceBuilder_ != null) { + return basePriceBuilder_.getMessageOrBuilder(); + } else { + return basePrice_ == null ? com.google.type.Money.getDefaultInstance() : basePrice_; + } + } + /** + * + * + *
+     * Base price.
+     * 
+ * + * .google.type.Money base_price = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getBasePriceFieldBuilder() { + if (basePriceBuilder_ == null) { + basePriceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>(getBasePrice(), getParentForChildren(), isClean()); + basePrice_ = null; + } + return basePriceBuilder_; + } + + private double discount_; + /** + * + * + *
+     * Discount percentage, represented as decimal.
+     * For example, a 20% discount will be represent as 0.2.
+     * 
+ * + * double discount = 2; + * + * @return The discount. + */ + @java.lang.Override + public double getDiscount() { + return discount_; + } + /** + * + * + *
+     * Discount percentage, represented as decimal.
+     * For example, a 20% discount will be represent as 0.2.
+     * 
+ * + * double discount = 2; + * + * @param value The discount to set. + * @return This builder for chaining. + */ + public Builder setDiscount(double value) { + + discount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Discount percentage, represented as decimal.
+     * For example, a 20% discount will be represent as 0.2.
+     * 
+ * + * double discount = 2; + * + * @return This builder for chaining. + */ + public Builder clearDiscount() { + + discount_ = 0D; + onChanged(); + return this; + } + + private com.google.type.Money effectivePrice_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + effectivePriceBuilder_; + /** + * + * + *
+     * Effective Price after applying the discounts.
+     * 
+ * + * .google.type.Money effective_price = 3; + * + * @return Whether the effectivePrice field is set. + */ + public boolean hasEffectivePrice() { + return effectivePriceBuilder_ != null || effectivePrice_ != null; + } + /** + * + * + *
+     * Effective Price after applying the discounts.
+     * 
+ * + * .google.type.Money effective_price = 3; + * + * @return The effectivePrice. + */ + public com.google.type.Money getEffectivePrice() { + if (effectivePriceBuilder_ == null) { + return effectivePrice_ == null + ? com.google.type.Money.getDefaultInstance() + : effectivePrice_; + } else { + return effectivePriceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Effective Price after applying the discounts.
+     * 
+ * + * .google.type.Money effective_price = 3; + */ + public Builder setEffectivePrice(com.google.type.Money value) { + if (effectivePriceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + effectivePrice_ = value; + onChanged(); + } else { + effectivePriceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Effective Price after applying the discounts.
+     * 
+ * + * .google.type.Money effective_price = 3; + */ + public Builder setEffectivePrice(com.google.type.Money.Builder builderForValue) { + if (effectivePriceBuilder_ == null) { + effectivePrice_ = builderForValue.build(); + onChanged(); + } else { + effectivePriceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Effective Price after applying the discounts.
+     * 
+ * + * .google.type.Money effective_price = 3; + */ + public Builder mergeEffectivePrice(com.google.type.Money value) { + if (effectivePriceBuilder_ == null) { + if (effectivePrice_ != null) { + effectivePrice_ = + com.google.type.Money.newBuilder(effectivePrice_).mergeFrom(value).buildPartial(); + } else { + effectivePrice_ = value; + } + onChanged(); + } else { + effectivePriceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Effective Price after applying the discounts.
+     * 
+ * + * .google.type.Money effective_price = 3; + */ + public Builder clearEffectivePrice() { + if (effectivePriceBuilder_ == null) { + effectivePrice_ = null; + onChanged(); + } else { + effectivePrice_ = null; + effectivePriceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Effective Price after applying the discounts.
+     * 
+ * + * .google.type.Money effective_price = 3; + */ + public com.google.type.Money.Builder getEffectivePriceBuilder() { + + onChanged(); + return getEffectivePriceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Effective Price after applying the discounts.
+     * 
+ * + * .google.type.Money effective_price = 3; + */ + public com.google.type.MoneyOrBuilder getEffectivePriceOrBuilder() { + if (effectivePriceBuilder_ != null) { + return effectivePriceBuilder_.getMessageOrBuilder(); + } else { + return effectivePrice_ == null + ? com.google.type.Money.getDefaultInstance() + : effectivePrice_; + } + } + /** + * + * + *
+     * Effective Price after applying the discounts.
+     * 
+ * + * .google.type.Money effective_price = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, com.google.type.Money.Builder, com.google.type.MoneyOrBuilder> + getEffectivePriceFieldBuilder() { + if (effectivePriceBuilder_ == null) { + effectivePriceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.type.Money, + com.google.type.Money.Builder, + com.google.type.MoneyOrBuilder>( + getEffectivePrice(), getParentForChildren(), isClean()); + effectivePrice_ = null; + } + return effectivePriceBuilder_; + } + + private java.lang.Object externalPriceUri_ = ""; + /** + * + * + *
+     * Link to external price list, such as link to Google Voice rate card.
+     * 
+ * + * string external_price_uri = 4; + * + * @return The externalPriceUri. + */ + public java.lang.String getExternalPriceUri() { + java.lang.Object ref = externalPriceUri_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + externalPriceUri_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Link to external price list, such as link to Google Voice rate card.
+     * 
+ * + * string external_price_uri = 4; + * + * @return The bytes for externalPriceUri. + */ + public com.google.protobuf.ByteString getExternalPriceUriBytes() { + java.lang.Object ref = externalPriceUri_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + externalPriceUri_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Link to external price list, such as link to Google Voice rate card.
+     * 
+ * + * string external_price_uri = 4; + * + * @param value The externalPriceUri to set. + * @return This builder for chaining. + */ + public Builder setExternalPriceUri(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + externalPriceUri_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Link to external price list, such as link to Google Voice rate card.
+     * 
+ * + * string external_price_uri = 4; + * + * @return This builder for chaining. + */ + public Builder clearExternalPriceUri() { + + externalPriceUri_ = getDefaultInstance().getExternalPriceUri(); + onChanged(); + return this; + } + /** + * + * + *
+     * Link to external price list, such as link to Google Voice rate card.
+     * 
+ * + * string external_price_uri = 4; + * + * @param value The bytes for externalPriceUri to set. + * @return This builder for chaining. + */ + public Builder setExternalPriceUriBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + externalPriceUri_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Price) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Price) + private static final com.google.cloud.channel.v1.Price DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Price(); + } + + public static com.google.cloud.channel.v1.Price getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Price parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Price(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Price getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceByResource.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceByResource.java new file mode 100644 index 00000000..5021c140 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceByResource.java @@ -0,0 +1,1368 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Represents price by resource type.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.PriceByResource} + */ +public final class PriceByResource extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.PriceByResource) + PriceByResourceOrBuilder { + private static final long serialVersionUID = 0L; + // Use PriceByResource.newBuilder() to construct. + private PriceByResource(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PriceByResource() { + resourceType_ = 0; + pricePhases_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PriceByResource(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PriceByResource( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + resourceType_ = rawValue; + break; + } + case 18: + { + com.google.cloud.channel.v1.Price.Builder subBuilder = null; + if (price_ != null) { + subBuilder = price_.toBuilder(); + } + price_ = + input.readMessage(com.google.cloud.channel.v1.Price.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(price_); + price_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + pricePhases_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + pricePhases_.add( + input.readMessage( + com.google.cloud.channel.v1.PricePhase.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)) { + pricePhases_ = java.util.Collections.unmodifiableList(pricePhases_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PriceByResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PriceByResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.PriceByResource.class, + com.google.cloud.channel.v1.PriceByResource.Builder.class); + } + + public static final int RESOURCE_TYPE_FIELD_NUMBER = 1; + private int resourceType_; + /** + * + * + *
+   * Resource Type. Example: SEAT
+   * 
+ * + * .google.cloud.channel.v1.ResourceType resource_type = 1; + * + * @return The enum numeric value on the wire for resourceType. + */ + @java.lang.Override + public int getResourceTypeValue() { + return resourceType_; + } + /** + * + * + *
+   * Resource Type. Example: SEAT
+   * 
+ * + * .google.cloud.channel.v1.ResourceType resource_type = 1; + * + * @return The resourceType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ResourceType getResourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ResourceType result = + com.google.cloud.channel.v1.ResourceType.valueOf(resourceType_); + return result == null ? com.google.cloud.channel.v1.ResourceType.UNRECOGNIZED : result; + } + + public static final int PRICE_FIELD_NUMBER = 2; + private com.google.cloud.channel.v1.Price price_; + /** + * + * + *
+   * Price of the Offer. Present if there are no price phases.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 2; + * + * @return Whether the price field is set. + */ + @java.lang.Override + public boolean hasPrice() { + return price_ != null; + } + /** + * + * + *
+   * Price of the Offer. Present if there are no price phases.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 2; + * + * @return The price. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Price getPrice() { + return price_ == null ? com.google.cloud.channel.v1.Price.getDefaultInstance() : price_; + } + /** + * + * + *
+   * Price of the Offer. Present if there are no price phases.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 2; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PriceOrBuilder getPriceOrBuilder() { + return getPrice(); + } + + public static final int PRICE_PHASES_FIELD_NUMBER = 3; + private java.util.List pricePhases_; + /** + * + * + *
+   * Specifies the price by time range.
+   * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + @java.lang.Override + public java.util.List getPricePhasesList() { + return pricePhases_; + } + /** + * + * + *
+   * Specifies the price by time range.
+   * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + @java.lang.Override + public java.util.List + getPricePhasesOrBuilderList() { + return pricePhases_; + } + /** + * + * + *
+   * Specifies the price by time range.
+   * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + @java.lang.Override + public int getPricePhasesCount() { + return pricePhases_.size(); + } + /** + * + * + *
+   * Specifies the price by time range.
+   * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PricePhase getPricePhases(int index) { + return pricePhases_.get(index); + } + /** + * + * + *
+   * Specifies the price by time range.
+   * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PricePhaseOrBuilder getPricePhasesOrBuilder(int index) { + return pricePhases_.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 (resourceType_ + != com.google.cloud.channel.v1.ResourceType.RESOURCE_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, resourceType_); + } + if (price_ != null) { + output.writeMessage(2, getPrice()); + } + for (int i = 0; i < pricePhases_.size(); i++) { + output.writeMessage(3, pricePhases_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (resourceType_ + != com.google.cloud.channel.v1.ResourceType.RESOURCE_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, resourceType_); + } + if (price_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getPrice()); + } + for (int i = 0; i < pricePhases_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, pricePhases_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.PriceByResource)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.PriceByResource other = + (com.google.cloud.channel.v1.PriceByResource) obj; + + if (resourceType_ != other.resourceType_) return false; + if (hasPrice() != other.hasPrice()) return false; + if (hasPrice()) { + if (!getPrice().equals(other.getPrice())) return false; + } + if (!getPricePhasesList().equals(other.getPricePhasesList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + RESOURCE_TYPE_FIELD_NUMBER; + hash = (53 * hash) + resourceType_; + if (hasPrice()) { + hash = (37 * hash) + PRICE_FIELD_NUMBER; + hash = (53 * hash) + getPrice().hashCode(); + } + if (getPricePhasesCount() > 0) { + hash = (37 * hash) + PRICE_PHASES_FIELD_NUMBER; + hash = (53 * hash) + getPricePhasesList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.PriceByResource parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PriceByResource parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PriceByResource parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PriceByResource parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PriceByResource parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PriceByResource parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PriceByResource parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PriceByResource parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PriceByResource parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PriceByResource parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PriceByResource parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PriceByResource parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.PriceByResource prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 price by resource type.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.PriceByResource} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.PriceByResource) + com.google.cloud.channel.v1.PriceByResourceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PriceByResource_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PriceByResource_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.PriceByResource.class, + com.google.cloud.channel.v1.PriceByResource.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.PriceByResource.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPricePhasesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + resourceType_ = 0; + + if (priceBuilder_ == null) { + price_ = null; + } else { + price_ = null; + priceBuilder_ = null; + } + if (pricePhasesBuilder_ == null) { + pricePhases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + pricePhasesBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PriceByResource_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PriceByResource getDefaultInstanceForType() { + return com.google.cloud.channel.v1.PriceByResource.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.PriceByResource build() { + com.google.cloud.channel.v1.PriceByResource result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PriceByResource buildPartial() { + com.google.cloud.channel.v1.PriceByResource result = + new com.google.cloud.channel.v1.PriceByResource(this); + int from_bitField0_ = bitField0_; + result.resourceType_ = resourceType_; + if (priceBuilder_ == null) { + result.price_ = price_; + } else { + result.price_ = priceBuilder_.build(); + } + if (pricePhasesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + pricePhases_ = java.util.Collections.unmodifiableList(pricePhases_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.pricePhases_ = pricePhases_; + } else { + result.pricePhases_ = pricePhasesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.PriceByResource) { + return mergeFrom((com.google.cloud.channel.v1.PriceByResource) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.PriceByResource other) { + if (other == com.google.cloud.channel.v1.PriceByResource.getDefaultInstance()) return this; + if (other.resourceType_ != 0) { + setResourceTypeValue(other.getResourceTypeValue()); + } + if (other.hasPrice()) { + mergePrice(other.getPrice()); + } + if (pricePhasesBuilder_ == null) { + if (!other.pricePhases_.isEmpty()) { + if (pricePhases_.isEmpty()) { + pricePhases_ = other.pricePhases_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePricePhasesIsMutable(); + pricePhases_.addAll(other.pricePhases_); + } + onChanged(); + } + } else { + if (!other.pricePhases_.isEmpty()) { + if (pricePhasesBuilder_.isEmpty()) { + pricePhasesBuilder_.dispose(); + pricePhasesBuilder_ = null; + pricePhases_ = other.pricePhases_; + bitField0_ = (bitField0_ & ~0x00000001); + pricePhasesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPricePhasesFieldBuilder() + : null; + } else { + pricePhasesBuilder_.addAllMessages(other.pricePhases_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.PriceByResource parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.PriceByResource) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int resourceType_ = 0; + /** + * + * + *
+     * Resource Type. Example: SEAT
+     * 
+ * + * .google.cloud.channel.v1.ResourceType resource_type = 1; + * + * @return The enum numeric value on the wire for resourceType. + */ + @java.lang.Override + public int getResourceTypeValue() { + return resourceType_; + } + /** + * + * + *
+     * Resource Type. Example: SEAT
+     * 
+ * + * .google.cloud.channel.v1.ResourceType resource_type = 1; + * + * @param value The enum numeric value on the wire for resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceTypeValue(int value) { + + resourceType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Resource Type. Example: SEAT
+     * 
+ * + * .google.cloud.channel.v1.ResourceType resource_type = 1; + * + * @return The resourceType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ResourceType getResourceType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.ResourceType result = + com.google.cloud.channel.v1.ResourceType.valueOf(resourceType_); + return result == null ? com.google.cloud.channel.v1.ResourceType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Resource Type. Example: SEAT
+     * 
+ * + * .google.cloud.channel.v1.ResourceType resource_type = 1; + * + * @param value The resourceType to set. + * @return This builder for chaining. + */ + public Builder setResourceType(com.google.cloud.channel.v1.ResourceType value) { + if (value == null) { + throw new NullPointerException(); + } + + resourceType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource Type. Example: SEAT
+     * 
+ * + * .google.cloud.channel.v1.ResourceType resource_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearResourceType() { + + resourceType_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.Price price_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Price, + com.google.cloud.channel.v1.Price.Builder, + com.google.cloud.channel.v1.PriceOrBuilder> + priceBuilder_; + /** + * + * + *
+     * Price of the Offer. Present if there are no price phases.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 2; + * + * @return Whether the price field is set. + */ + public boolean hasPrice() { + return priceBuilder_ != null || price_ != null; + } + /** + * + * + *
+     * Price of the Offer. Present if there are no price phases.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 2; + * + * @return The price. + */ + public com.google.cloud.channel.v1.Price getPrice() { + if (priceBuilder_ == null) { + return price_ == null ? com.google.cloud.channel.v1.Price.getDefaultInstance() : price_; + } else { + return priceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Price of the Offer. Present if there are no price phases.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 2; + */ + public Builder setPrice(com.google.cloud.channel.v1.Price value) { + if (priceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + price_ = value; + onChanged(); + } else { + priceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Price of the Offer. Present if there are no price phases.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 2; + */ + public Builder setPrice(com.google.cloud.channel.v1.Price.Builder builderForValue) { + if (priceBuilder_ == null) { + price_ = builderForValue.build(); + onChanged(); + } else { + priceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Price of the Offer. Present if there are no price phases.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 2; + */ + public Builder mergePrice(com.google.cloud.channel.v1.Price value) { + if (priceBuilder_ == null) { + if (price_ != null) { + price_ = + com.google.cloud.channel.v1.Price.newBuilder(price_).mergeFrom(value).buildPartial(); + } else { + price_ = value; + } + onChanged(); + } else { + priceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Price of the Offer. Present if there are no price phases.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 2; + */ + public Builder clearPrice() { + if (priceBuilder_ == null) { + price_ = null; + onChanged(); + } else { + price_ = null; + priceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Price of the Offer. Present if there are no price phases.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 2; + */ + public com.google.cloud.channel.v1.Price.Builder getPriceBuilder() { + + onChanged(); + return getPriceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Price of the Offer. Present if there are no price phases.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 2; + */ + public com.google.cloud.channel.v1.PriceOrBuilder getPriceOrBuilder() { + if (priceBuilder_ != null) { + return priceBuilder_.getMessageOrBuilder(); + } else { + return price_ == null ? com.google.cloud.channel.v1.Price.getDefaultInstance() : price_; + } + } + /** + * + * + *
+     * Price of the Offer. Present if there are no price phases.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Price, + com.google.cloud.channel.v1.Price.Builder, + com.google.cloud.channel.v1.PriceOrBuilder> + getPriceFieldBuilder() { + if (priceBuilder_ == null) { + priceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Price, + com.google.cloud.channel.v1.Price.Builder, + com.google.cloud.channel.v1.PriceOrBuilder>( + getPrice(), getParentForChildren(), isClean()); + price_ = null; + } + return priceBuilder_; + } + + private java.util.List pricePhases_ = + java.util.Collections.emptyList(); + + private void ensurePricePhasesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + pricePhases_ = + new java.util.ArrayList(pricePhases_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PricePhase, + com.google.cloud.channel.v1.PricePhase.Builder, + com.google.cloud.channel.v1.PricePhaseOrBuilder> + pricePhasesBuilder_; + + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public java.util.List getPricePhasesList() { + if (pricePhasesBuilder_ == null) { + return java.util.Collections.unmodifiableList(pricePhases_); + } else { + return pricePhasesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public int getPricePhasesCount() { + if (pricePhasesBuilder_ == null) { + return pricePhases_.size(); + } else { + return pricePhasesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public com.google.cloud.channel.v1.PricePhase getPricePhases(int index) { + if (pricePhasesBuilder_ == null) { + return pricePhases_.get(index); + } else { + return pricePhasesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public Builder setPricePhases(int index, com.google.cloud.channel.v1.PricePhase value) { + if (pricePhasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePricePhasesIsMutable(); + pricePhases_.set(index, value); + onChanged(); + } else { + pricePhasesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public Builder setPricePhases( + int index, com.google.cloud.channel.v1.PricePhase.Builder builderForValue) { + if (pricePhasesBuilder_ == null) { + ensurePricePhasesIsMutable(); + pricePhases_.set(index, builderForValue.build()); + onChanged(); + } else { + pricePhasesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public Builder addPricePhases(com.google.cloud.channel.v1.PricePhase value) { + if (pricePhasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePricePhasesIsMutable(); + pricePhases_.add(value); + onChanged(); + } else { + pricePhasesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public Builder addPricePhases(int index, com.google.cloud.channel.v1.PricePhase value) { + if (pricePhasesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePricePhasesIsMutable(); + pricePhases_.add(index, value); + onChanged(); + } else { + pricePhasesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public Builder addPricePhases(com.google.cloud.channel.v1.PricePhase.Builder builderForValue) { + if (pricePhasesBuilder_ == null) { + ensurePricePhasesIsMutable(); + pricePhases_.add(builderForValue.build()); + onChanged(); + } else { + pricePhasesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public Builder addPricePhases( + int index, com.google.cloud.channel.v1.PricePhase.Builder builderForValue) { + if (pricePhasesBuilder_ == null) { + ensurePricePhasesIsMutable(); + pricePhases_.add(index, builderForValue.build()); + onChanged(); + } else { + pricePhasesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public Builder addAllPricePhases( + java.lang.Iterable values) { + if (pricePhasesBuilder_ == null) { + ensurePricePhasesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, pricePhases_); + onChanged(); + } else { + pricePhasesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public Builder clearPricePhases() { + if (pricePhasesBuilder_ == null) { + pricePhases_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + pricePhasesBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public Builder removePricePhases(int index) { + if (pricePhasesBuilder_ == null) { + ensurePricePhasesIsMutable(); + pricePhases_.remove(index); + onChanged(); + } else { + pricePhasesBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public com.google.cloud.channel.v1.PricePhase.Builder getPricePhasesBuilder(int index) { + return getPricePhasesFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public com.google.cloud.channel.v1.PricePhaseOrBuilder getPricePhasesOrBuilder(int index) { + if (pricePhasesBuilder_ == null) { + return pricePhases_.get(index); + } else { + return pricePhasesBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public java.util.List + getPricePhasesOrBuilderList() { + if (pricePhasesBuilder_ != null) { + return pricePhasesBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(pricePhases_); + } + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public com.google.cloud.channel.v1.PricePhase.Builder addPricePhasesBuilder() { + return getPricePhasesFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.PricePhase.getDefaultInstance()); + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public com.google.cloud.channel.v1.PricePhase.Builder addPricePhasesBuilder(int index) { + return getPricePhasesFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.PricePhase.getDefaultInstance()); + } + /** + * + * + *
+     * Specifies the price by time range.
+     * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + public java.util.List + getPricePhasesBuilderList() { + return getPricePhasesFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PricePhase, + com.google.cloud.channel.v1.PricePhase.Builder, + com.google.cloud.channel.v1.PricePhaseOrBuilder> + getPricePhasesFieldBuilder() { + if (pricePhasesBuilder_ == null) { + pricePhasesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PricePhase, + com.google.cloud.channel.v1.PricePhase.Builder, + com.google.cloud.channel.v1.PricePhaseOrBuilder>( + pricePhases_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + pricePhases_ = null; + } + return pricePhasesBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.PriceByResource) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.PriceByResource) + private static final com.google.cloud.channel.v1.PriceByResource DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.PriceByResource(); + } + + public static com.google.cloud.channel.v1.PriceByResource getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PriceByResource parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PriceByResource(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PriceByResource getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceByResourceOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceByResourceOrBuilder.java new file mode 100644 index 00000000..cf2f0b92 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceByResourceOrBuilder.java @@ -0,0 +1,137 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +public interface PriceByResourceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.PriceByResource) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource Type. Example: SEAT
+   * 
+ * + * .google.cloud.channel.v1.ResourceType resource_type = 1; + * + * @return The enum numeric value on the wire for resourceType. + */ + int getResourceTypeValue(); + /** + * + * + *
+   * Resource Type. Example: SEAT
+   * 
+ * + * .google.cloud.channel.v1.ResourceType resource_type = 1; + * + * @return The resourceType. + */ + com.google.cloud.channel.v1.ResourceType getResourceType(); + + /** + * + * + *
+   * Price of the Offer. Present if there are no price phases.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 2; + * + * @return Whether the price field is set. + */ + boolean hasPrice(); + /** + * + * + *
+   * Price of the Offer. Present if there are no price phases.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 2; + * + * @return The price. + */ + com.google.cloud.channel.v1.Price getPrice(); + /** + * + * + *
+   * Price of the Offer. Present if there are no price phases.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 2; + */ + com.google.cloud.channel.v1.PriceOrBuilder getPriceOrBuilder(); + + /** + * + * + *
+   * Specifies the price by time range.
+   * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + java.util.List getPricePhasesList(); + /** + * + * + *
+   * Specifies the price by time range.
+   * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + com.google.cloud.channel.v1.PricePhase getPricePhases(int index); + /** + * + * + *
+   * Specifies the price by time range.
+   * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + int getPricePhasesCount(); + /** + * + * + *
+   * Specifies the price by time range.
+   * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + java.util.List + getPricePhasesOrBuilderList(); + /** + * + * + *
+   * Specifies the price by time range.
+   * 
+ * + * repeated .google.cloud.channel.v1.PricePhase price_phases = 3; + */ + com.google.cloud.channel.v1.PricePhaseOrBuilder getPricePhasesOrBuilder(int index); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceOrBuilder.java new file mode 100644 index 00000000..6c5fd36e --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceOrBuilder.java @@ -0,0 +1,134 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +public interface PriceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Price) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Base price.
+   * 
+ * + * .google.type.Money base_price = 1; + * + * @return Whether the basePrice field is set. + */ + boolean hasBasePrice(); + /** + * + * + *
+   * Base price.
+   * 
+ * + * .google.type.Money base_price = 1; + * + * @return The basePrice. + */ + com.google.type.Money getBasePrice(); + /** + * + * + *
+   * Base price.
+   * 
+ * + * .google.type.Money base_price = 1; + */ + com.google.type.MoneyOrBuilder getBasePriceOrBuilder(); + + /** + * + * + *
+   * Discount percentage, represented as decimal.
+   * For example, a 20% discount will be represent as 0.2.
+   * 
+ * + * double discount = 2; + * + * @return The discount. + */ + double getDiscount(); + + /** + * + * + *
+   * Effective Price after applying the discounts.
+   * 
+ * + * .google.type.Money effective_price = 3; + * + * @return Whether the effectivePrice field is set. + */ + boolean hasEffectivePrice(); + /** + * + * + *
+   * Effective Price after applying the discounts.
+   * 
+ * + * .google.type.Money effective_price = 3; + * + * @return The effectivePrice. + */ + com.google.type.Money getEffectivePrice(); + /** + * + * + *
+   * Effective Price after applying the discounts.
+   * 
+ * + * .google.type.Money effective_price = 3; + */ + com.google.type.MoneyOrBuilder getEffectivePriceOrBuilder(); + + /** + * + * + *
+   * Link to external price list, such as link to Google Voice rate card.
+   * 
+ * + * string external_price_uri = 4; + * + * @return The externalPriceUri. + */ + java.lang.String getExternalPriceUri(); + /** + * + * + *
+   * Link to external price list, such as link to Google Voice rate card.
+   * 
+ * + * string external_price_uri = 4; + * + * @return The bytes for externalPriceUri. + */ + com.google.protobuf.ByteString getExternalPriceUriBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PricePhase.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PricePhase.java new file mode 100644 index 00000000..d1e8f80c --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PricePhase.java @@ -0,0 +1,1548 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Specifies the price by the duration of months.
+ * For example, a 20% discount for the first six months, then a 10% discount
+ * starting on the seventh month.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.PricePhase} + */ +public final class PricePhase extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.PricePhase) + PricePhaseOrBuilder { + private static final long serialVersionUID = 0L; + // Use PricePhase.newBuilder() to construct. + private PricePhase(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PricePhase() { + periodType_ = 0; + priceTiers_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PricePhase(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PricePhase( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + int rawValue = input.readEnum(); + + periodType_ = rawValue; + break; + } + case 16: + { + firstPeriod_ = input.readInt32(); + break; + } + case 24: + { + lastPeriod_ = input.readInt32(); + break; + } + case 34: + { + com.google.cloud.channel.v1.Price.Builder subBuilder = null; + if (price_ != null) { + subBuilder = price_.toBuilder(); + } + price_ = + input.readMessage(com.google.cloud.channel.v1.Price.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(price_); + price_ = subBuilder.buildPartial(); + } + + break; + } + case 42: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + priceTiers_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + priceTiers_.add( + input.readMessage( + com.google.cloud.channel.v1.PriceTier.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)) { + priceTiers_ = java.util.Collections.unmodifiableList(priceTiers_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PricePhase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PricePhase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.PricePhase.class, + com.google.cloud.channel.v1.PricePhase.Builder.class); + } + + public static final int PERIOD_TYPE_FIELD_NUMBER = 1; + private int periodType_; + /** + * + * + *
+   * Defines the phase period type.
+   * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 1; + * + * @return The enum numeric value on the wire for periodType. + */ + @java.lang.Override + public int getPeriodTypeValue() { + return periodType_; + } + /** + * + * + *
+   * Defines the phase period type.
+   * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 1; + * + * @return The periodType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.PeriodType getPeriodType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.PeriodType result = + com.google.cloud.channel.v1.PeriodType.valueOf(periodType_); + return result == null ? com.google.cloud.channel.v1.PeriodType.UNRECOGNIZED : result; + } + + public static final int FIRST_PERIOD_FIELD_NUMBER = 2; + private int firstPeriod_; + /** + * + * + *
+   * Defines first period for the phase.
+   * 
+ * + * int32 first_period = 2; + * + * @return The firstPeriod. + */ + @java.lang.Override + public int getFirstPeriod() { + return firstPeriod_; + } + + public static final int LAST_PERIOD_FIELD_NUMBER = 3; + private int lastPeriod_; + /** + * + * + *
+   * Defines first period for the phase.
+   * 
+ * + * int32 last_period = 3; + * + * @return The lastPeriod. + */ + @java.lang.Override + public int getLastPeriod() { + return lastPeriod_; + } + + public static final int PRICE_FIELD_NUMBER = 4; + private com.google.cloud.channel.v1.Price price_; + /** + * + * + *
+   * Price of the phase. Present if there are no price tiers.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 4; + * + * @return Whether the price field is set. + */ + @java.lang.Override + public boolean hasPrice() { + return price_ != null; + } + /** + * + * + *
+   * Price of the phase. Present if there are no price tiers.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 4; + * + * @return The price. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Price getPrice() { + return price_ == null ? com.google.cloud.channel.v1.Price.getDefaultInstance() : price_; + } + /** + * + * + *
+   * Price of the phase. Present if there are no price tiers.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 4; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PriceOrBuilder getPriceOrBuilder() { + return getPrice(); + } + + public static final int PRICE_TIERS_FIELD_NUMBER = 5; + private java.util.List priceTiers_; + /** + * + * + *
+   * Price by the resource tiers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + @java.lang.Override + public java.util.List getPriceTiersList() { + return priceTiers_; + } + /** + * + * + *
+   * Price by the resource tiers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + @java.lang.Override + public java.util.List + getPriceTiersOrBuilderList() { + return priceTiers_; + } + /** + * + * + *
+   * Price by the resource tiers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + @java.lang.Override + public int getPriceTiersCount() { + return priceTiers_.size(); + } + /** + * + * + *
+   * Price by the resource tiers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PriceTier getPriceTiers(int index) { + return priceTiers_.get(index); + } + /** + * + * + *
+   * Price by the resource tiers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PriceTierOrBuilder getPriceTiersOrBuilder(int index) { + return priceTiers_.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 (periodType_ != com.google.cloud.channel.v1.PeriodType.PERIOD_TYPE_UNSPECIFIED.getNumber()) { + output.writeEnum(1, periodType_); + } + if (firstPeriod_ != 0) { + output.writeInt32(2, firstPeriod_); + } + if (lastPeriod_ != 0) { + output.writeInt32(3, lastPeriod_); + } + if (price_ != null) { + output.writeMessage(4, getPrice()); + } + for (int i = 0; i < priceTiers_.size(); i++) { + output.writeMessage(5, priceTiers_.get(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (periodType_ != com.google.cloud.channel.v1.PeriodType.PERIOD_TYPE_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(1, periodType_); + } + if (firstPeriod_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, firstPeriod_); + } + if (lastPeriod_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, lastPeriod_); + } + if (price_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getPrice()); + } + for (int i = 0; i < priceTiers_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, priceTiers_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.PricePhase)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.PricePhase other = (com.google.cloud.channel.v1.PricePhase) obj; + + if (periodType_ != other.periodType_) return false; + if (getFirstPeriod() != other.getFirstPeriod()) return false; + if (getLastPeriod() != other.getLastPeriod()) return false; + if (hasPrice() != other.hasPrice()) return false; + if (hasPrice()) { + if (!getPrice().equals(other.getPrice())) return false; + } + if (!getPriceTiersList().equals(other.getPriceTiersList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PERIOD_TYPE_FIELD_NUMBER; + hash = (53 * hash) + periodType_; + hash = (37 * hash) + FIRST_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getFirstPeriod(); + hash = (37 * hash) + LAST_PERIOD_FIELD_NUMBER; + hash = (53 * hash) + getLastPeriod(); + if (hasPrice()) { + hash = (37 * hash) + PRICE_FIELD_NUMBER; + hash = (53 * hash) + getPrice().hashCode(); + } + if (getPriceTiersCount() > 0) { + hash = (37 * hash) + PRICE_TIERS_FIELD_NUMBER; + hash = (53 * hash) + getPriceTiersList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.PricePhase parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PricePhase parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PricePhase parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PricePhase parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PricePhase parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PricePhase parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PricePhase parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PricePhase parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PricePhase parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PricePhase parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PricePhase parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PricePhase parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.PricePhase prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Specifies the price by the duration of months.
+   * For example, a 20% discount for the first six months, then a 10% discount
+   * starting on the seventh month.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.PricePhase} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.PricePhase) + com.google.cloud.channel.v1.PricePhaseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PricePhase_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PricePhase_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.PricePhase.class, + com.google.cloud.channel.v1.PricePhase.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.PricePhase.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getPriceTiersFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + periodType_ = 0; + + firstPeriod_ = 0; + + lastPeriod_ = 0; + + if (priceBuilder_ == null) { + price_ = null; + } else { + price_ = null; + priceBuilder_ = null; + } + if (priceTiersBuilder_ == null) { + priceTiers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + priceTiersBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PricePhase_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PricePhase getDefaultInstanceForType() { + return com.google.cloud.channel.v1.PricePhase.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.PricePhase build() { + com.google.cloud.channel.v1.PricePhase result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PricePhase buildPartial() { + com.google.cloud.channel.v1.PricePhase result = + new com.google.cloud.channel.v1.PricePhase(this); + int from_bitField0_ = bitField0_; + result.periodType_ = periodType_; + result.firstPeriod_ = firstPeriod_; + result.lastPeriod_ = lastPeriod_; + if (priceBuilder_ == null) { + result.price_ = price_; + } else { + result.price_ = priceBuilder_.build(); + } + if (priceTiersBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + priceTiers_ = java.util.Collections.unmodifiableList(priceTiers_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.priceTiers_ = priceTiers_; + } else { + result.priceTiers_ = priceTiersBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.PricePhase) { + return mergeFrom((com.google.cloud.channel.v1.PricePhase) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.PricePhase other) { + if (other == com.google.cloud.channel.v1.PricePhase.getDefaultInstance()) return this; + if (other.periodType_ != 0) { + setPeriodTypeValue(other.getPeriodTypeValue()); + } + if (other.getFirstPeriod() != 0) { + setFirstPeriod(other.getFirstPeriod()); + } + if (other.getLastPeriod() != 0) { + setLastPeriod(other.getLastPeriod()); + } + if (other.hasPrice()) { + mergePrice(other.getPrice()); + } + if (priceTiersBuilder_ == null) { + if (!other.priceTiers_.isEmpty()) { + if (priceTiers_.isEmpty()) { + priceTiers_ = other.priceTiers_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensurePriceTiersIsMutable(); + priceTiers_.addAll(other.priceTiers_); + } + onChanged(); + } + } else { + if (!other.priceTiers_.isEmpty()) { + if (priceTiersBuilder_.isEmpty()) { + priceTiersBuilder_.dispose(); + priceTiersBuilder_ = null; + priceTiers_ = other.priceTiers_; + bitField0_ = (bitField0_ & ~0x00000001); + priceTiersBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getPriceTiersFieldBuilder() + : null; + } else { + priceTiersBuilder_.addAllMessages(other.priceTiers_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.PricePhase parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.PricePhase) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private int periodType_ = 0; + /** + * + * + *
+     * Defines the phase period type.
+     * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 1; + * + * @return The enum numeric value on the wire for periodType. + */ + @java.lang.Override + public int getPeriodTypeValue() { + return periodType_; + } + /** + * + * + *
+     * Defines the phase period type.
+     * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 1; + * + * @param value The enum numeric value on the wire for periodType to set. + * @return This builder for chaining. + */ + public Builder setPeriodTypeValue(int value) { + + periodType_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines the phase period type.
+     * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 1; + * + * @return The periodType. + */ + @java.lang.Override + public com.google.cloud.channel.v1.PeriodType getPeriodType() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.PeriodType result = + com.google.cloud.channel.v1.PeriodType.valueOf(periodType_); + return result == null ? com.google.cloud.channel.v1.PeriodType.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Defines the phase period type.
+     * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 1; + * + * @param value The periodType to set. + * @return This builder for chaining. + */ + public Builder setPeriodType(com.google.cloud.channel.v1.PeriodType value) { + if (value == null) { + throw new NullPointerException(); + } + + periodType_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Defines the phase period type.
+     * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 1; + * + * @return This builder for chaining. + */ + public Builder clearPeriodType() { + + periodType_ = 0; + onChanged(); + return this; + } + + private int firstPeriod_; + /** + * + * + *
+     * Defines first period for the phase.
+     * 
+ * + * int32 first_period = 2; + * + * @return The firstPeriod. + */ + @java.lang.Override + public int getFirstPeriod() { + return firstPeriod_; + } + /** + * + * + *
+     * Defines first period for the phase.
+     * 
+ * + * int32 first_period = 2; + * + * @param value The firstPeriod to set. + * @return This builder for chaining. + */ + public Builder setFirstPeriod(int value) { + + firstPeriod_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines first period for the phase.
+     * 
+ * + * int32 first_period = 2; + * + * @return This builder for chaining. + */ + public Builder clearFirstPeriod() { + + firstPeriod_ = 0; + onChanged(); + return this; + } + + private int lastPeriod_; + /** + * + * + *
+     * Defines first period for the phase.
+     * 
+ * + * int32 last_period = 3; + * + * @return The lastPeriod. + */ + @java.lang.Override + public int getLastPeriod() { + return lastPeriod_; + } + /** + * + * + *
+     * Defines first period for the phase.
+     * 
+ * + * int32 last_period = 3; + * + * @param value The lastPeriod to set. + * @return This builder for chaining. + */ + public Builder setLastPeriod(int value) { + + lastPeriod_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Defines first period for the phase.
+     * 
+ * + * int32 last_period = 3; + * + * @return This builder for chaining. + */ + public Builder clearLastPeriod() { + + lastPeriod_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.Price price_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Price, + com.google.cloud.channel.v1.Price.Builder, + com.google.cloud.channel.v1.PriceOrBuilder> + priceBuilder_; + /** + * + * + *
+     * Price of the phase. Present if there are no price tiers.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 4; + * + * @return Whether the price field is set. + */ + public boolean hasPrice() { + return priceBuilder_ != null || price_ != null; + } + /** + * + * + *
+     * Price of the phase. Present if there are no price tiers.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 4; + * + * @return The price. + */ + public com.google.cloud.channel.v1.Price getPrice() { + if (priceBuilder_ == null) { + return price_ == null ? com.google.cloud.channel.v1.Price.getDefaultInstance() : price_; + } else { + return priceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Price of the phase. Present if there are no price tiers.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 4; + */ + public Builder setPrice(com.google.cloud.channel.v1.Price value) { + if (priceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + price_ = value; + onChanged(); + } else { + priceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Price of the phase. Present if there are no price tiers.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 4; + */ + public Builder setPrice(com.google.cloud.channel.v1.Price.Builder builderForValue) { + if (priceBuilder_ == null) { + price_ = builderForValue.build(); + onChanged(); + } else { + priceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Price of the phase. Present if there are no price tiers.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 4; + */ + public Builder mergePrice(com.google.cloud.channel.v1.Price value) { + if (priceBuilder_ == null) { + if (price_ != null) { + price_ = + com.google.cloud.channel.v1.Price.newBuilder(price_).mergeFrom(value).buildPartial(); + } else { + price_ = value; + } + onChanged(); + } else { + priceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Price of the phase. Present if there are no price tiers.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 4; + */ + public Builder clearPrice() { + if (priceBuilder_ == null) { + price_ = null; + onChanged(); + } else { + price_ = null; + priceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Price of the phase. Present if there are no price tiers.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 4; + */ + public com.google.cloud.channel.v1.Price.Builder getPriceBuilder() { + + onChanged(); + return getPriceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Price of the phase. Present if there are no price tiers.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 4; + */ + public com.google.cloud.channel.v1.PriceOrBuilder getPriceOrBuilder() { + if (priceBuilder_ != null) { + return priceBuilder_.getMessageOrBuilder(); + } else { + return price_ == null ? com.google.cloud.channel.v1.Price.getDefaultInstance() : price_; + } + } + /** + * + * + *
+     * Price of the phase. Present if there are no price tiers.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Price, + com.google.cloud.channel.v1.Price.Builder, + com.google.cloud.channel.v1.PriceOrBuilder> + getPriceFieldBuilder() { + if (priceBuilder_ == null) { + priceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Price, + com.google.cloud.channel.v1.Price.Builder, + com.google.cloud.channel.v1.PriceOrBuilder>( + getPrice(), getParentForChildren(), isClean()); + price_ = null; + } + return priceBuilder_; + } + + private java.util.List priceTiers_ = + java.util.Collections.emptyList(); + + private void ensurePriceTiersIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + priceTiers_ = new java.util.ArrayList(priceTiers_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PriceTier, + com.google.cloud.channel.v1.PriceTier.Builder, + com.google.cloud.channel.v1.PriceTierOrBuilder> + priceTiersBuilder_; + + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public java.util.List getPriceTiersList() { + if (priceTiersBuilder_ == null) { + return java.util.Collections.unmodifiableList(priceTiers_); + } else { + return priceTiersBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public int getPriceTiersCount() { + if (priceTiersBuilder_ == null) { + return priceTiers_.size(); + } else { + return priceTiersBuilder_.getCount(); + } + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public com.google.cloud.channel.v1.PriceTier getPriceTiers(int index) { + if (priceTiersBuilder_ == null) { + return priceTiers_.get(index); + } else { + return priceTiersBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public Builder setPriceTiers(int index, com.google.cloud.channel.v1.PriceTier value) { + if (priceTiersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePriceTiersIsMutable(); + priceTiers_.set(index, value); + onChanged(); + } else { + priceTiersBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public Builder setPriceTiers( + int index, com.google.cloud.channel.v1.PriceTier.Builder builderForValue) { + if (priceTiersBuilder_ == null) { + ensurePriceTiersIsMutable(); + priceTiers_.set(index, builderForValue.build()); + onChanged(); + } else { + priceTiersBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public Builder addPriceTiers(com.google.cloud.channel.v1.PriceTier value) { + if (priceTiersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePriceTiersIsMutable(); + priceTiers_.add(value); + onChanged(); + } else { + priceTiersBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public Builder addPriceTiers(int index, com.google.cloud.channel.v1.PriceTier value) { + if (priceTiersBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensurePriceTiersIsMutable(); + priceTiers_.add(index, value); + onChanged(); + } else { + priceTiersBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public Builder addPriceTiers(com.google.cloud.channel.v1.PriceTier.Builder builderForValue) { + if (priceTiersBuilder_ == null) { + ensurePriceTiersIsMutable(); + priceTiers_.add(builderForValue.build()); + onChanged(); + } else { + priceTiersBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public Builder addPriceTiers( + int index, com.google.cloud.channel.v1.PriceTier.Builder builderForValue) { + if (priceTiersBuilder_ == null) { + ensurePriceTiersIsMutable(); + priceTiers_.add(index, builderForValue.build()); + onChanged(); + } else { + priceTiersBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public Builder addAllPriceTiers( + java.lang.Iterable values) { + if (priceTiersBuilder_ == null) { + ensurePriceTiersIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, priceTiers_); + onChanged(); + } else { + priceTiersBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public Builder clearPriceTiers() { + if (priceTiersBuilder_ == null) { + priceTiers_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + priceTiersBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public Builder removePriceTiers(int index) { + if (priceTiersBuilder_ == null) { + ensurePriceTiersIsMutable(); + priceTiers_.remove(index); + onChanged(); + } else { + priceTiersBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public com.google.cloud.channel.v1.PriceTier.Builder getPriceTiersBuilder(int index) { + return getPriceTiersFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public com.google.cloud.channel.v1.PriceTierOrBuilder getPriceTiersOrBuilder(int index) { + if (priceTiersBuilder_ == null) { + return priceTiers_.get(index); + } else { + return priceTiersBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public java.util.List + getPriceTiersOrBuilderList() { + if (priceTiersBuilder_ != null) { + return priceTiersBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(priceTiers_); + } + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public com.google.cloud.channel.v1.PriceTier.Builder addPriceTiersBuilder() { + return getPriceTiersFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.PriceTier.getDefaultInstance()); + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public com.google.cloud.channel.v1.PriceTier.Builder addPriceTiersBuilder(int index) { + return getPriceTiersFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.PriceTier.getDefaultInstance()); + } + /** + * + * + *
+     * Price by the resource tiers.
+     * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + public java.util.List + getPriceTiersBuilderList() { + return getPriceTiersFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PriceTier, + com.google.cloud.channel.v1.PriceTier.Builder, + com.google.cloud.channel.v1.PriceTierOrBuilder> + getPriceTiersFieldBuilder() { + if (priceTiersBuilder_ == null) { + priceTiersBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.PriceTier, + com.google.cloud.channel.v1.PriceTier.Builder, + com.google.cloud.channel.v1.PriceTierOrBuilder>( + priceTiers_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + priceTiers_ = null; + } + return priceTiersBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.PricePhase) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.PricePhase) + private static final com.google.cloud.channel.v1.PricePhase DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.PricePhase(); + } + + public static com.google.cloud.channel.v1.PricePhase getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PricePhase parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PricePhase(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PricePhase getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PricePhaseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PricePhaseOrBuilder.java new file mode 100644 index 00000000..62aa966d --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PricePhaseOrBuilder.java @@ -0,0 +1,163 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +public interface PricePhaseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.PricePhase) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Defines the phase period type.
+   * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 1; + * + * @return The enum numeric value on the wire for periodType. + */ + int getPeriodTypeValue(); + /** + * + * + *
+   * Defines the phase period type.
+   * 
+ * + * .google.cloud.channel.v1.PeriodType period_type = 1; + * + * @return The periodType. + */ + com.google.cloud.channel.v1.PeriodType getPeriodType(); + + /** + * + * + *
+   * Defines first period for the phase.
+   * 
+ * + * int32 first_period = 2; + * + * @return The firstPeriod. + */ + int getFirstPeriod(); + + /** + * + * + *
+   * Defines first period for the phase.
+   * 
+ * + * int32 last_period = 3; + * + * @return The lastPeriod. + */ + int getLastPeriod(); + + /** + * + * + *
+   * Price of the phase. Present if there are no price tiers.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 4; + * + * @return Whether the price field is set. + */ + boolean hasPrice(); + /** + * + * + *
+   * Price of the phase. Present if there are no price tiers.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 4; + * + * @return The price. + */ + com.google.cloud.channel.v1.Price getPrice(); + /** + * + * + *
+   * Price of the phase. Present if there are no price tiers.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 4; + */ + com.google.cloud.channel.v1.PriceOrBuilder getPriceOrBuilder(); + + /** + * + * + *
+   * Price by the resource tiers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + java.util.List getPriceTiersList(); + /** + * + * + *
+   * Price by the resource tiers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + com.google.cloud.channel.v1.PriceTier getPriceTiers(int index); + /** + * + * + *
+   * Price by the resource tiers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + int getPriceTiersCount(); + /** + * + * + *
+   * Price by the resource tiers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + java.util.List + getPriceTiersOrBuilderList(); + /** + * + * + *
+   * Price by the resource tiers.
+   * 
+ * + * repeated .google.cloud.channel.v1.PriceTier price_tiers = 5; + */ + com.google.cloud.channel.v1.PriceTierOrBuilder getPriceTiersOrBuilder(int index); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceTier.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceTier.java new file mode 100644 index 00000000..ba0ca8ff --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceTier.java @@ -0,0 +1,910 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Defines price at resource tier level.
+ * For example, an offer with following definition :
+ * * Tier 1: Provide 25% discount for all seats between 1 and 25.
+ * * Tier 2: Provide 10% discount for all seats between 26 and 100.
+ * * Tier 3: Provide flat 15% discount for all seats above 100.
+ * Each of these tiers is represented as a PriceTier.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.PriceTier} + */ +public final class PriceTier extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.PriceTier) + PriceTierOrBuilder { + private static final long serialVersionUID = 0L; + // Use PriceTier.newBuilder() to construct. + private PriceTier(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PriceTier() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PriceTier(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PriceTier( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + firstResource_ = input.readInt32(); + break; + } + case 16: + { + lastResource_ = input.readInt32(); + break; + } + case 26: + { + com.google.cloud.channel.v1.Price.Builder subBuilder = null; + if (price_ != null) { + subBuilder = price_.toBuilder(); + } + price_ = + input.readMessage(com.google.cloud.channel.v1.Price.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(price_); + price_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PriceTier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PriceTier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.PriceTier.class, + com.google.cloud.channel.v1.PriceTier.Builder.class); + } + + public static final int FIRST_RESOURCE_FIELD_NUMBER = 1; + private int firstResource_; + /** + * + * + *
+   * First resource for which the tier price applies.
+   * 
+ * + * int32 first_resource = 1; + * + * @return The firstResource. + */ + @java.lang.Override + public int getFirstResource() { + return firstResource_; + } + + public static final int LAST_RESOURCE_FIELD_NUMBER = 2; + private int lastResource_; + /** + * + * + *
+   * Last resource for which the tier price applies.
+   * 
+ * + * int32 last_resource = 2; + * + * @return The lastResource. + */ + @java.lang.Override + public int getLastResource() { + return lastResource_; + } + + public static final int PRICE_FIELD_NUMBER = 3; + private com.google.cloud.channel.v1.Price price_; + /** + * + * + *
+   * Price of the tier.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 3; + * + * @return Whether the price field is set. + */ + @java.lang.Override + public boolean hasPrice() { + return price_ != null; + } + /** + * + * + *
+   * Price of the tier.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 3; + * + * @return The price. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Price getPrice() { + return price_ == null ? com.google.cloud.channel.v1.Price.getDefaultInstance() : price_; + } + /** + * + * + *
+   * Price of the tier.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 3; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PriceOrBuilder getPriceOrBuilder() { + return getPrice(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (firstResource_ != 0) { + output.writeInt32(1, firstResource_); + } + if (lastResource_ != 0) { + output.writeInt32(2, lastResource_); + } + if (price_ != null) { + output.writeMessage(3, getPrice()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (firstResource_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, firstResource_); + } + if (lastResource_ != 0) { + size += com.google.protobuf.CodedOutputStream.computeInt32Size(2, lastResource_); + } + if (price_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getPrice()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.PriceTier)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.PriceTier other = (com.google.cloud.channel.v1.PriceTier) obj; + + if (getFirstResource() != other.getFirstResource()) return false; + if (getLastResource() != other.getLastResource()) return false; + if (hasPrice() != other.hasPrice()) return false; + if (hasPrice()) { + if (!getPrice().equals(other.getPrice())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + FIRST_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getFirstResource(); + hash = (37 * hash) + LAST_RESOURCE_FIELD_NUMBER; + hash = (53 * hash) + getLastResource(); + if (hasPrice()) { + hash = (37 * hash) + PRICE_FIELD_NUMBER; + hash = (53 * hash) + getPrice().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.PriceTier parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PriceTier parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PriceTier parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PriceTier parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PriceTier parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PriceTier parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PriceTier parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PriceTier parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PriceTier parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PriceTier parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PriceTier parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PriceTier parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.PriceTier prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Defines price at resource tier level.
+   * For example, an offer with following definition :
+   * * Tier 1: Provide 25% discount for all seats between 1 and 25.
+   * * Tier 2: Provide 10% discount for all seats between 26 and 100.
+   * * Tier 3: Provide flat 15% discount for all seats above 100.
+   * Each of these tiers is represented as a PriceTier.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.PriceTier} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.PriceTier) + com.google.cloud.channel.v1.PriceTierOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PriceTier_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PriceTier_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.PriceTier.class, + com.google.cloud.channel.v1.PriceTier.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.PriceTier.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + firstResource_ = 0; + + lastResource_ = 0; + + if (priceBuilder_ == null) { + price_ = null; + } else { + price_ = null; + priceBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.OffersProto + .internal_static_google_cloud_channel_v1_PriceTier_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PriceTier getDefaultInstanceForType() { + return com.google.cloud.channel.v1.PriceTier.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.PriceTier build() { + com.google.cloud.channel.v1.PriceTier result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PriceTier buildPartial() { + com.google.cloud.channel.v1.PriceTier result = + new com.google.cloud.channel.v1.PriceTier(this); + result.firstResource_ = firstResource_; + result.lastResource_ = lastResource_; + if (priceBuilder_ == null) { + result.price_ = price_; + } else { + result.price_ = priceBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.PriceTier) { + return mergeFrom((com.google.cloud.channel.v1.PriceTier) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.PriceTier other) { + if (other == com.google.cloud.channel.v1.PriceTier.getDefaultInstance()) return this; + if (other.getFirstResource() != 0) { + setFirstResource(other.getFirstResource()); + } + if (other.getLastResource() != 0) { + setLastResource(other.getLastResource()); + } + if (other.hasPrice()) { + mergePrice(other.getPrice()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.PriceTier parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.PriceTier) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int firstResource_; + /** + * + * + *
+     * First resource for which the tier price applies.
+     * 
+ * + * int32 first_resource = 1; + * + * @return The firstResource. + */ + @java.lang.Override + public int getFirstResource() { + return firstResource_; + } + /** + * + * + *
+     * First resource for which the tier price applies.
+     * 
+ * + * int32 first_resource = 1; + * + * @param value The firstResource to set. + * @return This builder for chaining. + */ + public Builder setFirstResource(int value) { + + firstResource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * First resource for which the tier price applies.
+     * 
+ * + * int32 first_resource = 1; + * + * @return This builder for chaining. + */ + public Builder clearFirstResource() { + + firstResource_ = 0; + onChanged(); + return this; + } + + private int lastResource_; + /** + * + * + *
+     * Last resource for which the tier price applies.
+     * 
+ * + * int32 last_resource = 2; + * + * @return The lastResource. + */ + @java.lang.Override + public int getLastResource() { + return lastResource_; + } + /** + * + * + *
+     * Last resource for which the tier price applies.
+     * 
+ * + * int32 last_resource = 2; + * + * @param value The lastResource to set. + * @return This builder for chaining. + */ + public Builder setLastResource(int value) { + + lastResource_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Last resource for which the tier price applies.
+     * 
+ * + * int32 last_resource = 2; + * + * @return This builder for chaining. + */ + public Builder clearLastResource() { + + lastResource_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.Price price_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Price, + com.google.cloud.channel.v1.Price.Builder, + com.google.cloud.channel.v1.PriceOrBuilder> + priceBuilder_; + /** + * + * + *
+     * Price of the tier.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 3; + * + * @return Whether the price field is set. + */ + public boolean hasPrice() { + return priceBuilder_ != null || price_ != null; + } + /** + * + * + *
+     * Price of the tier.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 3; + * + * @return The price. + */ + public com.google.cloud.channel.v1.Price getPrice() { + if (priceBuilder_ == null) { + return price_ == null ? com.google.cloud.channel.v1.Price.getDefaultInstance() : price_; + } else { + return priceBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Price of the tier.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 3; + */ + public Builder setPrice(com.google.cloud.channel.v1.Price value) { + if (priceBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + price_ = value; + onChanged(); + } else { + priceBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Price of the tier.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 3; + */ + public Builder setPrice(com.google.cloud.channel.v1.Price.Builder builderForValue) { + if (priceBuilder_ == null) { + price_ = builderForValue.build(); + onChanged(); + } else { + priceBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Price of the tier.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 3; + */ + public Builder mergePrice(com.google.cloud.channel.v1.Price value) { + if (priceBuilder_ == null) { + if (price_ != null) { + price_ = + com.google.cloud.channel.v1.Price.newBuilder(price_).mergeFrom(value).buildPartial(); + } else { + price_ = value; + } + onChanged(); + } else { + priceBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Price of the tier.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 3; + */ + public Builder clearPrice() { + if (priceBuilder_ == null) { + price_ = null; + onChanged(); + } else { + price_ = null; + priceBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Price of the tier.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 3; + */ + public com.google.cloud.channel.v1.Price.Builder getPriceBuilder() { + + onChanged(); + return getPriceFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Price of the tier.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 3; + */ + public com.google.cloud.channel.v1.PriceOrBuilder getPriceOrBuilder() { + if (priceBuilder_ != null) { + return priceBuilder_.getMessageOrBuilder(); + } else { + return price_ == null ? com.google.cloud.channel.v1.Price.getDefaultInstance() : price_; + } + } + /** + * + * + *
+     * Price of the tier.
+     * 
+ * + * .google.cloud.channel.v1.Price price = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Price, + com.google.cloud.channel.v1.Price.Builder, + com.google.cloud.channel.v1.PriceOrBuilder> + getPriceFieldBuilder() { + if (priceBuilder_ == null) { + priceBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Price, + com.google.cloud.channel.v1.Price.Builder, + com.google.cloud.channel.v1.PriceOrBuilder>( + getPrice(), getParentForChildren(), isClean()); + price_ = null; + } + return priceBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.PriceTier) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.PriceTier) + private static final com.google.cloud.channel.v1.PriceTier DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.PriceTier(); + } + + public static com.google.cloud.channel.v1.PriceTier getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PriceTier parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PriceTier(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PriceTier getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceTierOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceTierOrBuilder.java new file mode 100644 index 00000000..4539e7f9 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PriceTierOrBuilder.java @@ -0,0 +1,86 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +public interface PriceTierOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.PriceTier) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * First resource for which the tier price applies.
+   * 
+ * + * int32 first_resource = 1; + * + * @return The firstResource. + */ + int getFirstResource(); + + /** + * + * + *
+   * Last resource for which the tier price applies.
+   * 
+ * + * int32 last_resource = 2; + * + * @return The lastResource. + */ + int getLastResource(); + + /** + * + * + *
+   * Price of the tier.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 3; + * + * @return Whether the price field is set. + */ + boolean hasPrice(); + /** + * + * + *
+   * Price of the tier.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 3; + * + * @return The price. + */ + com.google.cloud.channel.v1.Price getPrice(); + /** + * + * + *
+   * Price of the tier.
+   * 
+ * + * .google.cloud.channel.v1.Price price = 3; + */ + com.google.cloud.channel.v1.PriceOrBuilder getPriceOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Product.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Product.java new file mode 100644 index 00000000..e6662e08 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Product.java @@ -0,0 +1,918 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/products.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * A Product is the entity a customer uses when placing an order. For example,
+ * Google Workspace, Google Voice, etc.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Product} + */ +public final class Product extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Product) + ProductOrBuilder { + private static final long serialVersionUID = 0L; + // Use Product.newBuilder() to construct. + private Product(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Product() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Product(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Product( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.channel.v1.MarketingInfo.Builder subBuilder = null; + if (marketingInfo_ != null) { + subBuilder = marketingInfo_.toBuilder(); + } + marketingInfo_ = + input.readMessage( + com.google.cloud.channel.v1.MarketingInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(marketingInfo_); + marketingInfo_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Product.class, + com.google.cloud.channel.v1.Product.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource Name of the Product.
+   * Format: products/{product_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 the Product.
+   * Format: products/{product_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; + } + } + + public static final int MARKETING_INFO_FIELD_NUMBER = 2; + private com.google.cloud.channel.v1.MarketingInfo marketingInfo_; + /** + * + * + *
+   * Marketing information for the product.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return Whether the marketingInfo field is set. + */ + @java.lang.Override + public boolean hasMarketingInfo() { + return marketingInfo_ != null; + } + /** + * + * + *
+   * Marketing information for the product.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return The marketingInfo. + */ + @java.lang.Override + public com.google.cloud.channel.v1.MarketingInfo getMarketingInfo() { + return marketingInfo_ == null + ? com.google.cloud.channel.v1.MarketingInfo.getDefaultInstance() + : marketingInfo_; + } + /** + * + * + *
+   * Marketing information for the product.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + @java.lang.Override + public com.google.cloud.channel.v1.MarketingInfoOrBuilder getMarketingInfoOrBuilder() { + return getMarketingInfo(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (marketingInfo_ != null) { + output.writeMessage(2, getMarketingInfo()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (marketingInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMarketingInfo()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Product)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Product other = (com.google.cloud.channel.v1.Product) obj; + + if (!getName().equals(other.getName())) return false; + if (hasMarketingInfo() != other.hasMarketingInfo()) return false; + if (hasMarketingInfo()) { + if (!getMarketingInfo().equals(other.getMarketingInfo())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasMarketingInfo()) { + hash = (37 * hash) + MARKETING_INFO_FIELD_NUMBER; + hash = (53 * hash) + getMarketingInfo().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Product parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Product parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Product parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Product parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Product parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Product parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Product parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Product parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Product parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Product parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Product parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Product parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Product prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 Product is the entity a customer uses when placing an order. For example,
+   * Google Workspace, Google Voice, etc.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Product} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Product) + com.google.cloud.channel.v1.ProductOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Product_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Product_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Product.class, + com.google.cloud.channel.v1.Product.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Product.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (marketingInfoBuilder_ == null) { + marketingInfo_ = null; + } else { + marketingInfo_ = null; + marketingInfoBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Product_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Product getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Product.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Product build() { + com.google.cloud.channel.v1.Product result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Product buildPartial() { + com.google.cloud.channel.v1.Product result = new com.google.cloud.channel.v1.Product(this); + result.name_ = name_; + if (marketingInfoBuilder_ == null) { + result.marketingInfo_ = marketingInfo_; + } else { + result.marketingInfo_ = marketingInfoBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Product) { + return mergeFrom((com.google.cloud.channel.v1.Product) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Product other) { + if (other == com.google.cloud.channel.v1.Product.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasMarketingInfo()) { + mergeMarketingInfo(other.getMarketingInfo()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Product parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Product) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource Name of the Product.
+     * Format: products/{product_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 the Product.
+     * Format: products/{product_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 the Product.
+     * Format: products/{product_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 the Product.
+     * Format: products/{product_id}
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource Name of the Product.
+     * Format: products/{product_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; + } + + private com.google.cloud.channel.v1.MarketingInfo marketingInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.MarketingInfo, + com.google.cloud.channel.v1.MarketingInfo.Builder, + com.google.cloud.channel.v1.MarketingInfoOrBuilder> + marketingInfoBuilder_; + /** + * + * + *
+     * Marketing information for the product.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return Whether the marketingInfo field is set. + */ + public boolean hasMarketingInfo() { + return marketingInfoBuilder_ != null || marketingInfo_ != null; + } + /** + * + * + *
+     * Marketing information for the product.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return The marketingInfo. + */ + public com.google.cloud.channel.v1.MarketingInfo getMarketingInfo() { + if (marketingInfoBuilder_ == null) { + return marketingInfo_ == null + ? com.google.cloud.channel.v1.MarketingInfo.getDefaultInstance() + : marketingInfo_; + } else { + return marketingInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Marketing information for the product.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder setMarketingInfo(com.google.cloud.channel.v1.MarketingInfo value) { + if (marketingInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + marketingInfo_ = value; + onChanged(); + } else { + marketingInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Marketing information for the product.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder setMarketingInfo( + com.google.cloud.channel.v1.MarketingInfo.Builder builderForValue) { + if (marketingInfoBuilder_ == null) { + marketingInfo_ = builderForValue.build(); + onChanged(); + } else { + marketingInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Marketing information for the product.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder mergeMarketingInfo(com.google.cloud.channel.v1.MarketingInfo value) { + if (marketingInfoBuilder_ == null) { + if (marketingInfo_ != null) { + marketingInfo_ = + com.google.cloud.channel.v1.MarketingInfo.newBuilder(marketingInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + marketingInfo_ = value; + } + onChanged(); + } else { + marketingInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Marketing information for the product.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder clearMarketingInfo() { + if (marketingInfoBuilder_ == null) { + marketingInfo_ = null; + onChanged(); + } else { + marketingInfo_ = null; + marketingInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Marketing information for the product.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public com.google.cloud.channel.v1.MarketingInfo.Builder getMarketingInfoBuilder() { + + onChanged(); + return getMarketingInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Marketing information for the product.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public com.google.cloud.channel.v1.MarketingInfoOrBuilder getMarketingInfoOrBuilder() { + if (marketingInfoBuilder_ != null) { + return marketingInfoBuilder_.getMessageOrBuilder(); + } else { + return marketingInfo_ == null + ? com.google.cloud.channel.v1.MarketingInfo.getDefaultInstance() + : marketingInfo_; + } + } + /** + * + * + *
+     * Marketing information for the product.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.MarketingInfo, + com.google.cloud.channel.v1.MarketingInfo.Builder, + com.google.cloud.channel.v1.MarketingInfoOrBuilder> + getMarketingInfoFieldBuilder() { + if (marketingInfoBuilder_ == null) { + marketingInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.MarketingInfo, + com.google.cloud.channel.v1.MarketingInfo.Builder, + com.google.cloud.channel.v1.MarketingInfoOrBuilder>( + getMarketingInfo(), getParentForChildren(), isClean()); + marketingInfo_ = null; + } + return marketingInfoBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Product) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Product) + private static final com.google.cloud.channel.v1.Product DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Product(); + } + + public static com.google.cloud.channel.v1.Product getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Product parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Product(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Product getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProductName.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProductName.java new file mode 100644 index 00000000..9e5cfa7b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProductName.java @@ -0,0 +1,168 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class ProductName implements ResourceName { + private static final PathTemplate PRODUCT = + PathTemplate.createWithoutUrlEncoding("products/{product}"); + private volatile Map fieldValuesMap; + private final String product; + + @Deprecated + protected ProductName() { + product = null; + } + + private ProductName(Builder builder) { + product = Preconditions.checkNotNull(builder.getProduct()); + } + + public String getProduct() { + return product; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static ProductName of(String product) { + return newBuilder().setProduct(product).build(); + } + + public static String format(String product) { + return newBuilder().setProduct(product).build().toString(); + } + + public static ProductName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PRODUCT.validatedMatch( + formattedString, "ProductName.parse: formattedString not in valid format"); + return of(matchMap.get("product")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (ProductName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PRODUCT.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (product != null) { + fieldMapBuilder.put("product", product); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PRODUCT.instantiate("product", product); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + ProductName that = ((ProductName) o); + return Objects.equals(this.product, that.product); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(product); + return h; + } + + /** Builder for products/{product}. */ + public static class Builder { + private String product; + + protected Builder() {} + + public String getProduct() { + return product; + } + + public Builder setProduct(String product) { + this.product = product; + return this; + } + + private Builder(ProductName productName) { + product = productName.product; + } + + public ProductName build() { + return new ProductName(this); + } + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProductOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProductOrBuilder.java new file mode 100644 index 00000000..9d65e89c --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProductOrBuilder.java @@ -0,0 +1,87 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/products.proto + +package com.google.cloud.channel.v1; + +public interface ProductOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Product) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource Name of the Product.
+   * Format: products/{product_id}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource Name of the Product.
+   * Format: products/{product_id}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Marketing information for the product.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return Whether the marketingInfo field is set. + */ + boolean hasMarketingInfo(); + /** + * + * + *
+   * Marketing information for the product.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return The marketingInfo. + */ + com.google.cloud.channel.v1.MarketingInfo getMarketingInfo(); + /** + * + * + *
+   * Marketing information for the product.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + com.google.cloud.channel.v1.MarketingInfoOrBuilder getMarketingInfoOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProductsProto.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProductsProto.java new file mode 100644 index 00000000..acf10f06 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProductsProto.java @@ -0,0 +1,127 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/products.proto + +package com.google.cloud.channel.v1; + +public final class ProductsProto { + private ProductsProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Product_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Product_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Sku_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Sku_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_MarketingInfo_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_MarketingInfo_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_Media_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_Media_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n&google/cloud/channel/v1/products.proto" + + "\022\027google.cloud.channel.v1\032\031google/api/re" + + "source.proto\032\034google/api/annotations.pro" + + "to\"\225\001\n\007Product\022\014\n\004name\030\001 \001(\t\022>\n\016marketin" + + "g_info\030\002 \001(\0132&.google.cloud.channel.v1.M" + + "arketingInfo:<\352A9\n#cloudchannel.googleap" + + "is.com/Product\022\022products/{product}\"\313\001\n\003S" + + "ku\022\014\n\004name\030\001 \001(\t\022>\n\016marketing_info\030\002 \001(\013" + + "2&.google.cloud.channel.v1.MarketingInfo" + + "\0221\n\007product\030\003 \001(\0132 .google.cloud.channel" + + ".v1.Product:C\352A@\n\037cloudchannel.googleapi" + + "s.com/Sku\022\035products/{product}/skus/{sku}" + + "\"p\n\rMarketingInfo\022\024\n\014display_name\030\001 \001(\t\022" + + "\023\n\013description\030\002 \001(\t\0224\n\014default_logo\030\003 \001" + + "(\0132\036.google.cloud.channel.v1.Media\"Y\n\005Me" + + "dia\022\r\n\005title\030\001 \001(\t\022\017\n\007content\030\002 \001(\t\0220\n\004t" + + "ype\030\003 \001(\0162\".google.cloud.channel.v1.Medi" + + "aType*=\n\tMediaType\022\032\n\026MEDIA_TYPE_UNSPECI" + + "FIED\020\000\022\024\n\020MEDIA_TYPE_IMAGE\020\001Bn\n\033com.goog" + + "le.cloud.channel.v1B\rProductsProtoP\001Z>go" + + "ogle.golang.org/genproto/googleapis/clou" + + "d/channel/v1;channelb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.ResourceProto.getDescriptor(), + com.google.api.AnnotationsProto.getDescriptor(), + }); + internal_static_google_cloud_channel_v1_Product_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_channel_v1_Product_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Product_descriptor, + new java.lang.String[] { + "Name", "MarketingInfo", + }); + internal_static_google_cloud_channel_v1_Sku_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_channel_v1_Sku_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Sku_descriptor, + new java.lang.String[] { + "Name", "MarketingInfo", "Product", + }); + internal_static_google_cloud_channel_v1_MarketingInfo_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_channel_v1_MarketingInfo_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_MarketingInfo_descriptor, + new java.lang.String[] { + "DisplayName", "Description", "DefaultLogo", + }); + internal_static_google_cloud_channel_v1_Media_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_channel_v1_Media_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_Media_descriptor, + new java.lang.String[] { + "Title", "Content", "Type", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ResourceProto.resource); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.ResourceProto.getDescriptor(); + com.google.api.AnnotationsProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PromotionalOrderType.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PromotionalOrderType.java new file mode 100644 index 00000000..fc6528cf --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PromotionalOrderType.java @@ -0,0 +1,201 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Constraints type for Promotional offers.
+ * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.PromotionalOrderType} + */ +public enum PromotionalOrderType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not used.
+   * 
+ * + * PROMOTIONAL_TYPE_UNSPECIFIED = 0; + */ + PROMOTIONAL_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Order used for new customers, trial conversions and upgrades.
+   * 
+ * + * NEW_UPGRADE = 1; + */ + NEW_UPGRADE(1), + /** + * + * + *
+   * All orders for transferring an existing customer.
+   * 
+ * + * TRANSFER = 2; + */ + TRANSFER(2), + /** + * + * + *
+   * Orders for modifying an existing customer's promotion on the same SKU.
+   * 
+ * + * PROMOTION_SWITCH = 3; + */ + PROMOTION_SWITCH(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not used.
+   * 
+ * + * PROMOTIONAL_TYPE_UNSPECIFIED = 0; + */ + public static final int PROMOTIONAL_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Order used for new customers, trial conversions and upgrades.
+   * 
+ * + * NEW_UPGRADE = 1; + */ + public static final int NEW_UPGRADE_VALUE = 1; + /** + * + * + *
+   * All orders for transferring an existing customer.
+   * 
+ * + * TRANSFER = 2; + */ + public static final int TRANSFER_VALUE = 2; + /** + * + * + *
+   * Orders for modifying an existing customer's promotion on the same SKU.
+   * 
+ * + * PROMOTION_SWITCH = 3; + */ + public static final int PROMOTION_SWITCH_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static PromotionalOrderType 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 PromotionalOrderType forNumber(int value) { + switch (value) { + case 0: + return PROMOTIONAL_TYPE_UNSPECIFIED; + case 1: + return NEW_UPGRADE; + case 2: + return TRANSFER; + case 3: + return PROMOTION_SWITCH; + 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 PromotionalOrderType findValueByNumber(int number) { + return PromotionalOrderType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto.getDescriptor().getEnumTypes().get(0); + } + + private static final PromotionalOrderType[] VALUES = values(); + + public static PromotionalOrderType 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 PromotionalOrderType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.PromotionalOrderType) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionCloudIdentityRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionCloudIdentityRequest.java new file mode 100644 index 00000000..1026d6fa --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionCloudIdentityRequest.java @@ -0,0 +1,1301 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.ProvisionCloudIdentity][google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity]
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ProvisionCloudIdentityRequest} + */ +public final class ProvisionCloudIdentityRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ProvisionCloudIdentityRequest) + ProvisionCloudIdentityRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProvisionCloudIdentityRequest.newBuilder() to construct. + private ProvisionCloudIdentityRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProvisionCloudIdentityRequest() { + customer_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProvisionCloudIdentityRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ProvisionCloudIdentityRequest( + 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(); + + customer_ = s; + break; + } + case 18: + { + com.google.cloud.channel.v1.CloudIdentityInfo.Builder subBuilder = null; + if (cloudIdentityInfo_ != null) { + subBuilder = cloudIdentityInfo_.toBuilder(); + } + cloudIdentityInfo_ = + input.readMessage( + com.google.cloud.channel.v1.CloudIdentityInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(cloudIdentityInfo_); + cloudIdentityInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.channel.v1.AdminUser.Builder subBuilder = null; + if (user_ != null) { + subBuilder = user_.toBuilder(); + } + user_ = + input.readMessage( + com.google.cloud.channel.v1.AdminUser.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(user_); + user_ = subBuilder.buildPartial(); + } + + break; + } + case 32: + { + 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.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ProvisionCloudIdentityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ProvisionCloudIdentityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest.class, + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest.Builder.class); + } + + public static final int CUSTOMER_FIELD_NUMBER = 1; + private volatile java.lang.Object customer_; + /** + * + * + *
+   * Required. Resource name of the customer.
+   * Format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The customer. + */ + @java.lang.Override + public java.lang.String getCustomer() { + java.lang.Object ref = customer_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customer_ = s; + return s; + } + } + /** + * + * + *
+   * Required. Resource name of the customer.
+   * Format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customer. + */ + @java.lang.Override + public com.google.protobuf.ByteString getCustomerBytes() { + java.lang.Object ref = customer_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CLOUD_IDENTITY_INFO_FIELD_NUMBER = 2; + private com.google.cloud.channel.v1.CloudIdentityInfo cloudIdentityInfo_; + /** + * + * + *
+   * CloudIdentity-specific customer information.
+   * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + * + * @return Whether the cloudIdentityInfo field is set. + */ + @java.lang.Override + public boolean hasCloudIdentityInfo() { + return cloudIdentityInfo_ != null; + } + /** + * + * + *
+   * CloudIdentity-specific customer information.
+   * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + * + * @return The cloudIdentityInfo. + */ + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfo getCloudIdentityInfo() { + return cloudIdentityInfo_ == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.getDefaultInstance() + : cloudIdentityInfo_; + } + /** + * + * + *
+   * CloudIdentity-specific customer information.
+   * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + */ + @java.lang.Override + public com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder getCloudIdentityInfoOrBuilder() { + return getCloudIdentityInfo(); + } + + public static final int USER_FIELD_NUMBER = 3; + private com.google.cloud.channel.v1.AdminUser user_; + /** + * + * + *
+   * Admin user information.
+   * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + * + * @return Whether the user field is set. + */ + @java.lang.Override + public boolean hasUser() { + return user_ != null; + } + /** + * + * + *
+   * Admin user information.
+   * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + * + * @return The user. + */ + @java.lang.Override + public com.google.cloud.channel.v1.AdminUser getUser() { + return user_ == null ? com.google.cloud.channel.v1.AdminUser.getDefaultInstance() : user_; + } + /** + * + * + *
+   * Admin user information.
+   * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + */ + @java.lang.Override + public com.google.cloud.channel.v1.AdminUserOrBuilder getUserOrBuilder() { + return getUser(); + } + + public static final int VALIDATE_ONLY_FIELD_NUMBER = 4; + private boolean validateOnly_; + /** + * + * + *
+   * If set, validate the request and preview the review, but do not actually
+   * post it.
+   * 
+ * + * bool validate_only = 4; + * + * @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 (!getCustomerBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, customer_); + } + if (cloudIdentityInfo_ != null) { + output.writeMessage(2, getCloudIdentityInfo()); + } + if (user_ != null) { + output.writeMessage(3, getUser()); + } + if (validateOnly_ != false) { + output.writeBool(4, validateOnly_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getCustomerBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, customer_); + } + if (cloudIdentityInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCloudIdentityInfo()); + } + if (user_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUser()); + } + if (validateOnly_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, 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.cloud.channel.v1.ProvisionCloudIdentityRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest other = + (com.google.cloud.channel.v1.ProvisionCloudIdentityRequest) obj; + + if (!getCustomer().equals(other.getCustomer())) return false; + if (hasCloudIdentityInfo() != other.hasCloudIdentityInfo()) return false; + if (hasCloudIdentityInfo()) { + if (!getCloudIdentityInfo().equals(other.getCloudIdentityInfo())) return false; + } + if (hasUser() != other.hasUser()) return false; + if (hasUser()) { + if (!getUser().equals(other.getUser())) 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) + CUSTOMER_FIELD_NUMBER; + hash = (53 * hash) + getCustomer().hashCode(); + if (hasCloudIdentityInfo()) { + hash = (37 * hash) + CLOUD_IDENTITY_INFO_FIELD_NUMBER; + hash = (53 * hash) + getCloudIdentityInfo().hashCode(); + } + if (hasUser()) { + hash = (37 * hash) + USER_FIELD_NUMBER; + hash = (53 * hash) + getUser().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.cloud.channel.v1.ProvisionCloudIdentityRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.ProvisionCloudIdentity][google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity]
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ProvisionCloudIdentityRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ProvisionCloudIdentityRequest) + com.google.cloud.channel.v1.ProvisionCloudIdentityRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ProvisionCloudIdentityRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ProvisionCloudIdentityRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest.class, + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ProvisionCloudIdentityRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + customer_ = ""; + + if (cloudIdentityInfoBuilder_ == null) { + cloudIdentityInfo_ = null; + } else { + cloudIdentityInfo_ = null; + cloudIdentityInfoBuilder_ = null; + } + if (userBuilder_ == null) { + user_ = null; + } else { + user_ = null; + userBuilder_ = null; + } + validateOnly_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_ProvisionCloudIdentityRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ProvisionCloudIdentityRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ProvisionCloudIdentityRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ProvisionCloudIdentityRequest build() { + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ProvisionCloudIdentityRequest buildPartial() { + com.google.cloud.channel.v1.ProvisionCloudIdentityRequest result = + new com.google.cloud.channel.v1.ProvisionCloudIdentityRequest(this); + result.customer_ = customer_; + if (cloudIdentityInfoBuilder_ == null) { + result.cloudIdentityInfo_ = cloudIdentityInfo_; + } else { + result.cloudIdentityInfo_ = cloudIdentityInfoBuilder_.build(); + } + if (userBuilder_ == null) { + result.user_ = user_; + } else { + result.user_ = userBuilder_.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.cloud.channel.v1.ProvisionCloudIdentityRequest) { + return mergeFrom((com.google.cloud.channel.v1.ProvisionCloudIdentityRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ProvisionCloudIdentityRequest other) { + if (other == com.google.cloud.channel.v1.ProvisionCloudIdentityRequest.getDefaultInstance()) + return this; + if (!other.getCustomer().isEmpty()) { + customer_ = other.customer_; + onChanged(); + } + if (other.hasCloudIdentityInfo()) { + mergeCloudIdentityInfo(other.getCloudIdentityInfo()); + } + if (other.hasUser()) { + mergeUser(other.getUser()); + } + 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.cloud.channel.v1.ProvisionCloudIdentityRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.ProvisionCloudIdentityRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object customer_ = ""; + /** + * + * + *
+     * Required. Resource name of the customer.
+     * Format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The customer. + */ + public java.lang.String getCustomer() { + java.lang.Object ref = customer_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + customer_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the customer.
+     * Format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customer. + */ + public com.google.protobuf.ByteString getCustomerBytes() { + java.lang.Object ref = customer_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + customer_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. Resource name of the customer.
+     * Format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The customer to set. + * @return This builder for chaining. + */ + public Builder setCustomer(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + customer_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the customer.
+     * Format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return This builder for chaining. + */ + public Builder clearCustomer() { + + customer_ = getDefaultInstance().getCustomer(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. Resource name of the customer.
+     * Format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @param value The bytes for customer to set. + * @return This builder for chaining. + */ + public Builder setCustomerBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + customer_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.CloudIdentityInfo cloudIdentityInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityInfo, + com.google.cloud.channel.v1.CloudIdentityInfo.Builder, + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder> + cloudIdentityInfoBuilder_; + /** + * + * + *
+     * CloudIdentity-specific customer information.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + * + * @return Whether the cloudIdentityInfo field is set. + */ + public boolean hasCloudIdentityInfo() { + return cloudIdentityInfoBuilder_ != null || cloudIdentityInfo_ != null; + } + /** + * + * + *
+     * CloudIdentity-specific customer information.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + * + * @return The cloudIdentityInfo. + */ + public com.google.cloud.channel.v1.CloudIdentityInfo getCloudIdentityInfo() { + if (cloudIdentityInfoBuilder_ == null) { + return cloudIdentityInfo_ == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.getDefaultInstance() + : cloudIdentityInfo_; + } else { + return cloudIdentityInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * CloudIdentity-specific customer information.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + */ + public Builder setCloudIdentityInfo(com.google.cloud.channel.v1.CloudIdentityInfo value) { + if (cloudIdentityInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + cloudIdentityInfo_ = value; + onChanged(); + } else { + cloudIdentityInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * CloudIdentity-specific customer information.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + */ + public Builder setCloudIdentityInfo( + com.google.cloud.channel.v1.CloudIdentityInfo.Builder builderForValue) { + if (cloudIdentityInfoBuilder_ == null) { + cloudIdentityInfo_ = builderForValue.build(); + onChanged(); + } else { + cloudIdentityInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * CloudIdentity-specific customer information.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + */ + public Builder mergeCloudIdentityInfo(com.google.cloud.channel.v1.CloudIdentityInfo value) { + if (cloudIdentityInfoBuilder_ == null) { + if (cloudIdentityInfo_ != null) { + cloudIdentityInfo_ = + com.google.cloud.channel.v1.CloudIdentityInfo.newBuilder(cloudIdentityInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + cloudIdentityInfo_ = value; + } + onChanged(); + } else { + cloudIdentityInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * CloudIdentity-specific customer information.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + */ + public Builder clearCloudIdentityInfo() { + if (cloudIdentityInfoBuilder_ == null) { + cloudIdentityInfo_ = null; + onChanged(); + } else { + cloudIdentityInfo_ = null; + cloudIdentityInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * CloudIdentity-specific customer information.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + */ + public com.google.cloud.channel.v1.CloudIdentityInfo.Builder getCloudIdentityInfoBuilder() { + + onChanged(); + return getCloudIdentityInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * CloudIdentity-specific customer information.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + */ + public com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder getCloudIdentityInfoOrBuilder() { + if (cloudIdentityInfoBuilder_ != null) { + return cloudIdentityInfoBuilder_.getMessageOrBuilder(); + } else { + return cloudIdentityInfo_ == null + ? com.google.cloud.channel.v1.CloudIdentityInfo.getDefaultInstance() + : cloudIdentityInfo_; + } + } + /** + * + * + *
+     * CloudIdentity-specific customer information.
+     * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityInfo, + com.google.cloud.channel.v1.CloudIdentityInfo.Builder, + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder> + getCloudIdentityInfoFieldBuilder() { + if (cloudIdentityInfoBuilder_ == null) { + cloudIdentityInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.CloudIdentityInfo, + com.google.cloud.channel.v1.CloudIdentityInfo.Builder, + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder>( + getCloudIdentityInfo(), getParentForChildren(), isClean()); + cloudIdentityInfo_ = null; + } + return cloudIdentityInfoBuilder_; + } + + private com.google.cloud.channel.v1.AdminUser user_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.AdminUser, + com.google.cloud.channel.v1.AdminUser.Builder, + com.google.cloud.channel.v1.AdminUserOrBuilder> + userBuilder_; + /** + * + * + *
+     * Admin user information.
+     * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + * + * @return Whether the user field is set. + */ + public boolean hasUser() { + return userBuilder_ != null || user_ != null; + } + /** + * + * + *
+     * Admin user information.
+     * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + * + * @return The user. + */ + public com.google.cloud.channel.v1.AdminUser getUser() { + if (userBuilder_ == null) { + return user_ == null ? com.google.cloud.channel.v1.AdminUser.getDefaultInstance() : user_; + } else { + return userBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Admin user information.
+     * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + */ + public Builder setUser(com.google.cloud.channel.v1.AdminUser value) { + if (userBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + user_ = value; + onChanged(); + } else { + userBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Admin user information.
+     * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + */ + public Builder setUser(com.google.cloud.channel.v1.AdminUser.Builder builderForValue) { + if (userBuilder_ == null) { + user_ = builderForValue.build(); + onChanged(); + } else { + userBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Admin user information.
+     * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + */ + public Builder mergeUser(com.google.cloud.channel.v1.AdminUser value) { + if (userBuilder_ == null) { + if (user_ != null) { + user_ = + com.google.cloud.channel.v1.AdminUser.newBuilder(user_) + .mergeFrom(value) + .buildPartial(); + } else { + user_ = value; + } + onChanged(); + } else { + userBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Admin user information.
+     * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + */ + public Builder clearUser() { + if (userBuilder_ == null) { + user_ = null; + onChanged(); + } else { + user_ = null; + userBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Admin user information.
+     * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + */ + public com.google.cloud.channel.v1.AdminUser.Builder getUserBuilder() { + + onChanged(); + return getUserFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Admin user information.
+     * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + */ + public com.google.cloud.channel.v1.AdminUserOrBuilder getUserOrBuilder() { + if (userBuilder_ != null) { + return userBuilder_.getMessageOrBuilder(); + } else { + return user_ == null ? com.google.cloud.channel.v1.AdminUser.getDefaultInstance() : user_; + } + } + /** + * + * + *
+     * Admin user information.
+     * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.AdminUser, + com.google.cloud.channel.v1.AdminUser.Builder, + com.google.cloud.channel.v1.AdminUserOrBuilder> + getUserFieldBuilder() { + if (userBuilder_ == null) { + userBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.AdminUser, + com.google.cloud.channel.v1.AdminUser.Builder, + com.google.cloud.channel.v1.AdminUserOrBuilder>( + getUser(), getParentForChildren(), isClean()); + user_ = null; + } + return userBuilder_; + } + + private boolean validateOnly_; + /** + * + * + *
+     * If set, validate the request and preview the review, but do not actually
+     * post it.
+     * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + @java.lang.Override + public boolean getValidateOnly() { + return validateOnly_; + } + /** + * + * + *
+     * If set, validate the request and preview the review, but do not actually
+     * post it.
+     * 
+ * + * bool validate_only = 4; + * + * @param value The validateOnly to set. + * @return This builder for chaining. + */ + public Builder setValidateOnly(boolean value) { + + validateOnly_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If set, validate the request and preview the review, but do not actually
+     * post it.
+     * 
+ * + * bool validate_only = 4; + * + * @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.cloud.channel.v1.ProvisionCloudIdentityRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ProvisionCloudIdentityRequest) + private static final com.google.cloud.channel.v1.ProvisionCloudIdentityRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ProvisionCloudIdentityRequest(); + } + + public static com.google.cloud.channel.v1.ProvisionCloudIdentityRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProvisionCloudIdentityRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProvisionCloudIdentityRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ProvisionCloudIdentityRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionCloudIdentityRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionCloudIdentityRequestOrBuilder.java new file mode 100644 index 00000000..6b53c16b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionCloudIdentityRequestOrBuilder.java @@ -0,0 +1,140 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface ProvisionCloudIdentityRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ProvisionCloudIdentityRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. Resource name of the customer.
+   * Format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The customer. + */ + java.lang.String getCustomer(); + /** + * + * + *
+   * Required. Resource name of the customer.
+   * Format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * + * string customer = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = { ... } + * + * + * @return The bytes for customer. + */ + com.google.protobuf.ByteString getCustomerBytes(); + + /** + * + * + *
+   * CloudIdentity-specific customer information.
+   * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + * + * @return Whether the cloudIdentityInfo field is set. + */ + boolean hasCloudIdentityInfo(); + /** + * + * + *
+   * CloudIdentity-specific customer information.
+   * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + * + * @return The cloudIdentityInfo. + */ + com.google.cloud.channel.v1.CloudIdentityInfo getCloudIdentityInfo(); + /** + * + * + *
+   * CloudIdentity-specific customer information.
+   * 
+ * + * .google.cloud.channel.v1.CloudIdentityInfo cloud_identity_info = 2; + */ + com.google.cloud.channel.v1.CloudIdentityInfoOrBuilder getCloudIdentityInfoOrBuilder(); + + /** + * + * + *
+   * Admin user information.
+   * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + * + * @return Whether the user field is set. + */ + boolean hasUser(); + /** + * + * + *
+   * Admin user information.
+   * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + * + * @return The user. + */ + com.google.cloud.channel.v1.AdminUser getUser(); + /** + * + * + *
+   * Admin user information.
+   * 
+ * + * .google.cloud.channel.v1.AdminUser user = 3; + */ + com.google.cloud.channel.v1.AdminUserOrBuilder getUserOrBuilder(); + + /** + * + * + *
+   * If set, validate the request and preview the review, but do not actually
+   * post it.
+   * 
+ * + * bool validate_only = 4; + * + * @return The validateOnly. + */ + boolean getValidateOnly(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionedService.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionedService.java new file mode 100644 index 00000000..d9489bbc --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionedService.java @@ -0,0 +1,1006 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Service provisioned for an entitlement.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ProvisionedService} + */ +public final class ProvisionedService extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.ProvisionedService) + ProvisionedServiceOrBuilder { + private static final long serialVersionUID = 0L; + // Use ProvisionedService.newBuilder() to construct. + private ProvisionedService(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ProvisionedService() { + provisioningId_ = ""; + productId_ = ""; + skuId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ProvisionedService(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ProvisionedService( + 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(); + + provisioningId_ = s; + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + productId_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + skuId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_ProvisionedService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_ProvisionedService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ProvisionedService.class, + com.google.cloud.channel.v1.ProvisionedService.Builder.class); + } + + public static final int PROVISIONING_ID_FIELD_NUMBER = 1; + private volatile java.lang.Object provisioningId_; + /** + * + * + *
+   * Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the
+   * underlying Subscription ID.
+   * 
+ * + * string provisioning_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The provisioningId. + */ + @java.lang.Override + public java.lang.String getProvisioningId() { + java.lang.Object ref = provisioningId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provisioningId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the
+   * underlying Subscription ID.
+   * 
+ * + * string provisioning_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for provisioningId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProvisioningIdBytes() { + java.lang.Object ref = provisioningId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + provisioningId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int PRODUCT_ID_FIELD_NUMBER = 2; + private volatile java.lang.Object productId_; + /** + * + * + *
+   * Output only. The product pertaining to the provisioning resource as specified in the
+   * Offer.
+   * 
+ * + * string product_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The productId. + */ + @java.lang.Override + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The product pertaining to the provisioning resource as specified in the
+   * Offer.
+   * 
+ * + * string product_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for productId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int SKU_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object skuId_; + /** + * + * + *
+   * Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
+   * 
+ * + * string sku_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The skuId. + */ + @java.lang.Override + public java.lang.String getSkuId() { + java.lang.Object ref = skuId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skuId_ = s; + return s; + } + } + /** + * + * + *
+   * Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
+   * 
+ * + * string sku_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for skuId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getSkuIdBytes() { + java.lang.Object ref = skuId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skuId_ = 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 (!getProvisioningIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, provisioningId_); + } + if (!getProductIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, productId_); + } + if (!getSkuIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, skuId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getProvisioningIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, provisioningId_); + } + if (!getProductIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, productId_); + } + if (!getSkuIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, skuId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.ProvisionedService)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.ProvisionedService other = + (com.google.cloud.channel.v1.ProvisionedService) obj; + + if (!getProvisioningId().equals(other.getProvisioningId())) return false; + if (!getProductId().equals(other.getProductId())) return false; + if (!getSkuId().equals(other.getSkuId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PROVISIONING_ID_FIELD_NUMBER; + hash = (53 * hash) + getProvisioningId().hashCode(); + hash = (37 * hash) + PRODUCT_ID_FIELD_NUMBER; + hash = (53 * hash) + getProductId().hashCode(); + hash = (37 * hash) + SKU_ID_FIELD_NUMBER; + hash = (53 * hash) + getSkuId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.ProvisionedService parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ProvisionedService parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ProvisionedService parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ProvisionedService parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ProvisionedService parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.ProvisionedService parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ProvisionedService parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ProvisionedService parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ProvisionedService parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ProvisionedService parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.ProvisionedService parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.ProvisionedService parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.ProvisionedService prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Service provisioned for an entitlement.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.ProvisionedService} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.ProvisionedService) + com.google.cloud.channel.v1.ProvisionedServiceOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_ProvisionedService_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_ProvisionedService_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.ProvisionedService.class, + com.google.cloud.channel.v1.ProvisionedService.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.ProvisionedService.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + provisioningId_ = ""; + + productId_ = ""; + + skuId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_ProvisionedService_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ProvisionedService getDefaultInstanceForType() { + return com.google.cloud.channel.v1.ProvisionedService.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.ProvisionedService build() { + com.google.cloud.channel.v1.ProvisionedService result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ProvisionedService buildPartial() { + com.google.cloud.channel.v1.ProvisionedService result = + new com.google.cloud.channel.v1.ProvisionedService(this); + result.provisioningId_ = provisioningId_; + result.productId_ = productId_; + result.skuId_ = skuId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.ProvisionedService) { + return mergeFrom((com.google.cloud.channel.v1.ProvisionedService) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.ProvisionedService other) { + if (other == com.google.cloud.channel.v1.ProvisionedService.getDefaultInstance()) return this; + if (!other.getProvisioningId().isEmpty()) { + provisioningId_ = other.provisioningId_; + onChanged(); + } + if (!other.getProductId().isEmpty()) { + productId_ = other.productId_; + onChanged(); + } + if (!other.getSkuId().isEmpty()) { + skuId_ = other.skuId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.ProvisionedService parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.ProvisionedService) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object provisioningId_ = ""; + /** + * + * + *
+     * Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the
+     * underlying Subscription ID.
+     * 
+ * + * string provisioning_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The provisioningId. + */ + public java.lang.String getProvisioningId() { + java.lang.Object ref = provisioningId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + provisioningId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the
+     * underlying Subscription ID.
+     * 
+ * + * string provisioning_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for provisioningId. + */ + public com.google.protobuf.ByteString getProvisioningIdBytes() { + java.lang.Object ref = provisioningId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + provisioningId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the
+     * underlying Subscription ID.
+     * 
+ * + * string provisioning_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The provisioningId to set. + * @return This builder for chaining. + */ + public Builder setProvisioningId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + provisioningId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the
+     * underlying Subscription ID.
+     * 
+ * + * string provisioning_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProvisioningId() { + + provisioningId_ = getDefaultInstance().getProvisioningId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the
+     * underlying Subscription ID.
+     * 
+ * + * string provisioning_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for provisioningId to set. + * @return This builder for chaining. + */ + public Builder setProvisioningIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + provisioningId_ = value; + onChanged(); + return this; + } + + private java.lang.Object productId_ = ""; + /** + * + * + *
+     * Output only. The product pertaining to the provisioning resource as specified in the
+     * Offer.
+     * 
+ * + * string product_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The productId. + */ + public java.lang.String getProductId() { + java.lang.Object ref = productId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + productId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The product pertaining to the provisioning resource as specified in the
+     * Offer.
+     * 
+ * + * string product_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for productId. + */ + public com.google.protobuf.ByteString getProductIdBytes() { + java.lang.Object ref = productId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + productId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The product pertaining to the provisioning resource as specified in the
+     * Offer.
+     * 
+ * + * string product_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The productId to set. + * @return This builder for chaining. + */ + public Builder setProductId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + productId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The product pertaining to the provisioning resource as specified in the
+     * Offer.
+     * 
+ * + * string product_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearProductId() { + + productId_ = getDefaultInstance().getProductId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The product pertaining to the provisioning resource as specified in the
+     * Offer.
+     * 
+ * + * string product_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for productId to set. + * @return This builder for chaining. + */ + public Builder setProductIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + productId_ = value; + onChanged(); + return this; + } + + private java.lang.Object skuId_ = ""; + /** + * + * + *
+     * Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * string sku_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The skuId. + */ + public java.lang.String getSkuId() { + java.lang.Object ref = skuId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + skuId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * string sku_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for skuId. + */ + public com.google.protobuf.ByteString getSkuIdBytes() { + java.lang.Object ref = skuId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + skuId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * string sku_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The skuId to set. + * @return This builder for chaining. + */ + public Builder setSkuId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + skuId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * string sku_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return This builder for chaining. + */ + public Builder clearSkuId() { + + skuId_ = getDefaultInstance().getSkuId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * string sku_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @param value The bytes for skuId to set. + * @return This builder for chaining. + */ + public Builder setSkuIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + skuId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.ProvisionedService) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.ProvisionedService) + private static final com.google.cloud.channel.v1.ProvisionedService DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.ProvisionedService(); + } + + public static com.google.cloud.channel.v1.ProvisionedService getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ProvisionedService parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ProvisionedService(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.ProvisionedService getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionedServiceOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionedServiceOrBuilder.java new file mode 100644 index 00000000..efe717e6 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ProvisionedServiceOrBuilder.java @@ -0,0 +1,104 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +public interface ProvisionedServiceOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.ProvisionedService) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the
+   * underlying Subscription ID.
+   * 
+ * + * string provisioning_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The provisioningId. + */ + java.lang.String getProvisioningId(); + /** + * + * + *
+   * Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the
+   * underlying Subscription ID.
+   * 
+ * + * string provisioning_id = 1 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for provisioningId. + */ + com.google.protobuf.ByteString getProvisioningIdBytes(); + + /** + * + * + *
+   * Output only. The product pertaining to the provisioning resource as specified in the
+   * Offer.
+   * 
+ * + * string product_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The productId. + */ + java.lang.String getProductId(); + /** + * + * + *
+   * Output only. The product pertaining to the provisioning resource as specified in the
+   * Offer.
+   * 
+ * + * string product_id = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for productId. + */ + com.google.protobuf.ByteString getProductIdBytes(); + + /** + * + * + *
+   * Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
+   * 
+ * + * string sku_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The skuId. + */ + java.lang.String getSkuId(); + /** + * + * + *
+   * Output only. The SKU pertaining to the provisioning resource as specified in the Offer.
+   * 
+ * + * string sku_id = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; + * + * @return The bytes for skuId. + */ + com.google.protobuf.ByteString getSkuIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableOffer.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableOffer.java new file mode 100644 index 00000000..8c8cd15c --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableOffer.java @@ -0,0 +1,724 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Offer that can be puchased for a customer. This is used in
+ * ListPurchasableOffer API response.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.PurchasableOffer} + */ +public final class PurchasableOffer extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.PurchasableOffer) + PurchasableOfferOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurchasableOffer.newBuilder() to construct. + private PurchasableOffer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurchasableOffer() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurchasableOffer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PurchasableOffer( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.channel.v1.Offer.Builder subBuilder = null; + if (offer_ != null) { + subBuilder = offer_.toBuilder(); + } + offer_ = + input.readMessage(com.google.cloud.channel.v1.Offer.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(offer_); + offer_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_PurchasableOffer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_PurchasableOffer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.PurchasableOffer.class, + com.google.cloud.channel.v1.PurchasableOffer.Builder.class); + } + + public static final int OFFER_FIELD_NUMBER = 1; + private com.google.cloud.channel.v1.Offer offer_; + /** + * + * + *
+   * Offer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return Whether the offer field is set. + */ + @java.lang.Override + public boolean hasOffer() { + return offer_ != null; + } + /** + * + * + *
+   * Offer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return The offer. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Offer getOffer() { + return offer_ == null ? com.google.cloud.channel.v1.Offer.getDefaultInstance() : offer_; + } + /** + * + * + *
+   * Offer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.OfferOrBuilder getOfferOrBuilder() { + return getOffer(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (offer_ != null) { + output.writeMessage(1, getOffer()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (offer_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOffer()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.PurchasableOffer)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.PurchasableOffer other = + (com.google.cloud.channel.v1.PurchasableOffer) obj; + + if (hasOffer() != other.hasOffer()) return false; + if (hasOffer()) { + if (!getOffer().equals(other.getOffer())) return false; + } + if (!unknownFields.equals(other.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 (hasOffer()) { + hash = (37 * hash) + OFFER_FIELD_NUMBER; + hash = (53 * hash) + getOffer().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PurchasableOffer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.PurchasableOffer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Offer that can be puchased for a customer. This is used in
+   * ListPurchasableOffer API response.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.PurchasableOffer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.PurchasableOffer) + com.google.cloud.channel.v1.PurchasableOfferOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_PurchasableOffer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_PurchasableOffer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.PurchasableOffer.class, + com.google.cloud.channel.v1.PurchasableOffer.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.PurchasableOffer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (offerBuilder_ == null) { + offer_ = null; + } else { + offer_ = null; + offerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_PurchasableOffer_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableOffer getDefaultInstanceForType() { + return com.google.cloud.channel.v1.PurchasableOffer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableOffer build() { + com.google.cloud.channel.v1.PurchasableOffer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableOffer buildPartial() { + com.google.cloud.channel.v1.PurchasableOffer result = + new com.google.cloud.channel.v1.PurchasableOffer(this); + if (offerBuilder_ == null) { + result.offer_ = offer_; + } else { + result.offer_ = offerBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.PurchasableOffer) { + return mergeFrom((com.google.cloud.channel.v1.PurchasableOffer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.PurchasableOffer other) { + if (other == com.google.cloud.channel.v1.PurchasableOffer.getDefaultInstance()) return this; + if (other.hasOffer()) { + mergeOffer(other.getOffer()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.PurchasableOffer parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.PurchasableOffer) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.channel.v1.Offer offer_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Offer, + com.google.cloud.channel.v1.Offer.Builder, + com.google.cloud.channel.v1.OfferOrBuilder> + offerBuilder_; + /** + * + * + *
+     * Offer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return Whether the offer field is set. + */ + public boolean hasOffer() { + return offerBuilder_ != null || offer_ != null; + } + /** + * + * + *
+     * Offer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return The offer. + */ + public com.google.cloud.channel.v1.Offer getOffer() { + if (offerBuilder_ == null) { + return offer_ == null ? com.google.cloud.channel.v1.Offer.getDefaultInstance() : offer_; + } else { + return offerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Offer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public Builder setOffer(com.google.cloud.channel.v1.Offer value) { + if (offerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + offer_ = value; + onChanged(); + } else { + offerBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Offer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public Builder setOffer(com.google.cloud.channel.v1.Offer.Builder builderForValue) { + if (offerBuilder_ == null) { + offer_ = builderForValue.build(); + onChanged(); + } else { + offerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Offer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public Builder mergeOffer(com.google.cloud.channel.v1.Offer value) { + if (offerBuilder_ == null) { + if (offer_ != null) { + offer_ = + com.google.cloud.channel.v1.Offer.newBuilder(offer_).mergeFrom(value).buildPartial(); + } else { + offer_ = value; + } + onChanged(); + } else { + offerBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Offer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public Builder clearOffer() { + if (offerBuilder_ == null) { + offer_ = null; + onChanged(); + } else { + offer_ = null; + offerBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Offer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public com.google.cloud.channel.v1.Offer.Builder getOfferBuilder() { + + onChanged(); + return getOfferFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Offer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public com.google.cloud.channel.v1.OfferOrBuilder getOfferOrBuilder() { + if (offerBuilder_ != null) { + return offerBuilder_.getMessageOrBuilder(); + } else { + return offer_ == null ? com.google.cloud.channel.v1.Offer.getDefaultInstance() : offer_; + } + } + /** + * + * + *
+     * Offer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Offer, + com.google.cloud.channel.v1.Offer.Builder, + com.google.cloud.channel.v1.OfferOrBuilder> + getOfferFieldBuilder() { + if (offerBuilder_ == null) { + offerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Offer, + com.google.cloud.channel.v1.Offer.Builder, + com.google.cloud.channel.v1.OfferOrBuilder>( + getOffer(), getParentForChildren(), isClean()); + offer_ = null; + } + return offerBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.PurchasableOffer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.PurchasableOffer) + private static final com.google.cloud.channel.v1.PurchasableOffer DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.PurchasableOffer(); + } + + public static com.google.cloud.channel.v1.PurchasableOffer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurchasableOffer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PurchasableOffer(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableOffer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableOfferOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableOfferOrBuilder.java new file mode 100644 index 00000000..975a709f --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableOfferOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface PurchasableOfferOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.PurchasableOffer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Offer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return Whether the offer field is set. + */ + boolean hasOffer(); + /** + * + * + *
+   * Offer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return The offer. + */ + com.google.cloud.channel.v1.Offer getOffer(); + /** + * + * + *
+   * Offer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + com.google.cloud.channel.v1.OfferOrBuilder getOfferOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableSku.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableSku.java new file mode 100644 index 00000000..04fc9bef --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableSku.java @@ -0,0 +1,722 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * SKU that can be used for a puchase. This is used in ListPurchasableSku API
+ * response.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.PurchasableSku} + */ +public final class PurchasableSku extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.PurchasableSku) + PurchasableSkuOrBuilder { + private static final long serialVersionUID = 0L; + // Use PurchasableSku.newBuilder() to construct. + private PurchasableSku(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private PurchasableSku() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PurchasableSku(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private PurchasableSku( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.channel.v1.Sku.Builder subBuilder = null; + if (sku_ != null) { + subBuilder = sku_.toBuilder(); + } + sku_ = input.readMessage(com.google.cloud.channel.v1.Sku.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sku_); + sku_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_PurchasableSku_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_PurchasableSku_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.PurchasableSku.class, + com.google.cloud.channel.v1.PurchasableSku.Builder.class); + } + + public static final int SKU_FIELD_NUMBER = 1; + private com.google.cloud.channel.v1.Sku sku_; + /** + * + * + *
+   * SKU
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + * + * @return Whether the sku field is set. + */ + @java.lang.Override + public boolean hasSku() { + return sku_ != null; + } + /** + * + * + *
+   * SKU
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + * + * @return The sku. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Sku getSku() { + return sku_ == null ? com.google.cloud.channel.v1.Sku.getDefaultInstance() : sku_; + } + /** + * + * + *
+   * SKU
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.SkuOrBuilder getSkuOrBuilder() { + return getSku(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (sku_ != null) { + output.writeMessage(1, getSku()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (sku_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getSku()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.PurchasableSku)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.PurchasableSku other = + (com.google.cloud.channel.v1.PurchasableSku) obj; + + if (hasSku() != other.hasSku()) return false; + if (hasSku()) { + if (!getSku().equals(other.getSku())) return false; + } + if (!unknownFields.equals(other.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 (hasSku()) { + hash = (37 * hash) + SKU_FIELD_NUMBER; + hash = (53 * hash) + getSku().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.PurchasableSku parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PurchasableSku parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PurchasableSku parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PurchasableSku parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PurchasableSku parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.PurchasableSku parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PurchasableSku parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PurchasableSku parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PurchasableSku parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PurchasableSku parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.PurchasableSku parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.PurchasableSku parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.PurchasableSku prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * SKU that can be used for a puchase. This is used in ListPurchasableSku API
+   * response.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.PurchasableSku} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.PurchasableSku) + com.google.cloud.channel.v1.PurchasableSkuOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_PurchasableSku_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_PurchasableSku_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.PurchasableSku.class, + com.google.cloud.channel.v1.PurchasableSku.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.PurchasableSku.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (skuBuilder_ == null) { + sku_ = null; + } else { + sku_ = null; + skuBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_PurchasableSku_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableSku getDefaultInstanceForType() { + return com.google.cloud.channel.v1.PurchasableSku.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableSku build() { + com.google.cloud.channel.v1.PurchasableSku result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableSku buildPartial() { + com.google.cloud.channel.v1.PurchasableSku result = + new com.google.cloud.channel.v1.PurchasableSku(this); + if (skuBuilder_ == null) { + result.sku_ = sku_; + } else { + result.sku_ = skuBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.PurchasableSku) { + return mergeFrom((com.google.cloud.channel.v1.PurchasableSku) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.PurchasableSku other) { + if (other == com.google.cloud.channel.v1.PurchasableSku.getDefaultInstance()) return this; + if (other.hasSku()) { + mergeSku(other.getSku()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.PurchasableSku parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.PurchasableSku) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.channel.v1.Sku sku_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder> + skuBuilder_; + /** + * + * + *
+     * SKU
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + * + * @return Whether the sku field is set. + */ + public boolean hasSku() { + return skuBuilder_ != null || sku_ != null; + } + /** + * + * + *
+     * SKU
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + * + * @return The sku. + */ + public com.google.cloud.channel.v1.Sku getSku() { + if (skuBuilder_ == null) { + return sku_ == null ? com.google.cloud.channel.v1.Sku.getDefaultInstance() : sku_; + } else { + return skuBuilder_.getMessage(); + } + } + /** + * + * + *
+     * SKU
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + */ + public Builder setSku(com.google.cloud.channel.v1.Sku value) { + if (skuBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sku_ = value; + onChanged(); + } else { + skuBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * SKU
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + */ + public Builder setSku(com.google.cloud.channel.v1.Sku.Builder builderForValue) { + if (skuBuilder_ == null) { + sku_ = builderForValue.build(); + onChanged(); + } else { + skuBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * SKU
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + */ + public Builder mergeSku(com.google.cloud.channel.v1.Sku value) { + if (skuBuilder_ == null) { + if (sku_ != null) { + sku_ = com.google.cloud.channel.v1.Sku.newBuilder(sku_).mergeFrom(value).buildPartial(); + } else { + sku_ = value; + } + onChanged(); + } else { + skuBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * SKU
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + */ + public Builder clearSku() { + if (skuBuilder_ == null) { + sku_ = null; + onChanged(); + } else { + sku_ = null; + skuBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * SKU
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + */ + public com.google.cloud.channel.v1.Sku.Builder getSkuBuilder() { + + onChanged(); + return getSkuFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * SKU
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + */ + public com.google.cloud.channel.v1.SkuOrBuilder getSkuOrBuilder() { + if (skuBuilder_ != null) { + return skuBuilder_.getMessageOrBuilder(); + } else { + return sku_ == null ? com.google.cloud.channel.v1.Sku.getDefaultInstance() : sku_; + } + } + /** + * + * + *
+     * SKU
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder> + getSkuFieldBuilder() { + if (skuBuilder_ == null) { + skuBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder>( + getSku(), getParentForChildren(), isClean()); + sku_ = null; + } + return skuBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.PurchasableSku) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.PurchasableSku) + private static final com.google.cloud.channel.v1.PurchasableSku DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.PurchasableSku(); + } + + public static com.google.cloud.channel.v1.PurchasableSku getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public PurchasableSku parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new PurchasableSku(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.PurchasableSku getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableSkuOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableSkuOrBuilder.java new file mode 100644 index 00000000..02e177e7 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/PurchasableSkuOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface PurchasableSkuOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.PurchasableSku) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * SKU
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + * + * @return Whether the sku field is set. + */ + boolean hasSku(); + /** + * + * + *
+   * SKU
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + * + * @return The sku. + */ + com.google.cloud.channel.v1.Sku getSku(); + /** + * + * + *
+   * SKU
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 1; + */ + com.google.cloud.channel.v1.SkuOrBuilder getSkuOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/RenewalSettings.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/RenewalSettings.java new file mode 100644 index 00000000..b9c3339b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/RenewalSettings.java @@ -0,0 +1,1079 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Renewal settings for renewable Offers.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.RenewalSettings} + */ +public final class RenewalSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.RenewalSettings) + RenewalSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use RenewalSettings.newBuilder() to construct. + private RenewalSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private RenewalSettings() { + paymentPlan_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new RenewalSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private RenewalSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + enableRenewal_ = input.readBool(); + break; + } + case 16: + { + resizeUnitCount_ = input.readBool(); + break; + } + case 40: + { + int rawValue = input.readEnum(); + + paymentPlan_ = rawValue; + break; + } + case 50: + { + com.google.cloud.channel.v1.Period.Builder subBuilder = null; + if (paymentCycle_ != null) { + subBuilder = paymentCycle_.toBuilder(); + } + paymentCycle_ = + input.readMessage(com.google.cloud.channel.v1.Period.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(paymentCycle_); + paymentCycle_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_RenewalSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_RenewalSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.RenewalSettings.class, + com.google.cloud.channel.v1.RenewalSettings.Builder.class); + } + + public static final int ENABLE_RENEWAL_FIELD_NUMBER = 1; + private boolean enableRenewal_; + /** + * + * + *
+   * If false, the plan will be completed at the end date.
+   * 
+ * + * bool enable_renewal = 1; + * + * @return The enableRenewal. + */ + @java.lang.Override + public boolean getEnableRenewal() { + return enableRenewal_; + } + + public static final int RESIZE_UNIT_COUNT_FIELD_NUMBER = 2; + private boolean resizeUnitCount_; + /** + * + * + *
+   * If true and enable_renewal = true, the unit (for example seats or licenses)
+   * will be set to the number of active units at renewal time.
+   * 
+ * + * bool resize_unit_count = 2; + * + * @return The resizeUnitCount. + */ + @java.lang.Override + public boolean getResizeUnitCount() { + return resizeUnitCount_; + } + + public static final int PAYMENT_PLAN_FIELD_NUMBER = 5; + private int paymentPlan_; + /** + * + * + *
+   * Describes how a reseller will be billed.
+   * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 5; + * + * @return The enum numeric value on the wire for paymentPlan. + */ + @java.lang.Override + public int getPaymentPlanValue() { + return paymentPlan_; + } + /** + * + * + *
+   * Describes how a reseller will be billed.
+   * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 5; + * + * @return The paymentPlan. + */ + @java.lang.Override + public com.google.cloud.channel.v1.PaymentPlan getPaymentPlan() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.PaymentPlan result = + com.google.cloud.channel.v1.PaymentPlan.valueOf(paymentPlan_); + return result == null ? com.google.cloud.channel.v1.PaymentPlan.UNRECOGNIZED : result; + } + + public static final int PAYMENT_CYCLE_FIELD_NUMBER = 6; + private com.google.cloud.channel.v1.Period paymentCycle_; + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + * + * @return Whether the paymentCycle field is set. + */ + @java.lang.Override + public boolean hasPaymentCycle() { + return paymentCycle_ != null; + } + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + * + * @return The paymentCycle. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Period getPaymentCycle() { + return paymentCycle_ == null + ? com.google.cloud.channel.v1.Period.getDefaultInstance() + : paymentCycle_; + } + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + */ + @java.lang.Override + public com.google.cloud.channel.v1.PeriodOrBuilder getPaymentCycleOrBuilder() { + return getPaymentCycle(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (enableRenewal_ != false) { + output.writeBool(1, enableRenewal_); + } + if (resizeUnitCount_ != false) { + output.writeBool(2, resizeUnitCount_); + } + if (paymentPlan_ + != com.google.cloud.channel.v1.PaymentPlan.PAYMENT_PLAN_UNSPECIFIED.getNumber()) { + output.writeEnum(5, paymentPlan_); + } + if (paymentCycle_ != null) { + output.writeMessage(6, getPaymentCycle()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (enableRenewal_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, enableRenewal_); + } + if (resizeUnitCount_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, resizeUnitCount_); + } + if (paymentPlan_ + != com.google.cloud.channel.v1.PaymentPlan.PAYMENT_PLAN_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, paymentPlan_); + } + if (paymentCycle_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getPaymentCycle()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.RenewalSettings)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.RenewalSettings other = + (com.google.cloud.channel.v1.RenewalSettings) obj; + + if (getEnableRenewal() != other.getEnableRenewal()) return false; + if (getResizeUnitCount() != other.getResizeUnitCount()) return false; + if (paymentPlan_ != other.paymentPlan_) return false; + if (hasPaymentCycle() != other.hasPaymentCycle()) return false; + if (hasPaymentCycle()) { + if (!getPaymentCycle().equals(other.getPaymentCycle())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + ENABLE_RENEWAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableRenewal()); + hash = (37 * hash) + RESIZE_UNIT_COUNT_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getResizeUnitCount()); + hash = (37 * hash) + PAYMENT_PLAN_FIELD_NUMBER; + hash = (53 * hash) + paymentPlan_; + if (hasPaymentCycle()) { + hash = (37 * hash) + PAYMENT_CYCLE_FIELD_NUMBER; + hash = (53 * hash) + getPaymentCycle().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.RenewalSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.RenewalSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.RenewalSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.RenewalSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.RenewalSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.RenewalSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.RenewalSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.RenewalSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.RenewalSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.RenewalSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.RenewalSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.RenewalSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.RenewalSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Renewal settings for renewable Offers.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.RenewalSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.RenewalSettings) + com.google.cloud.channel.v1.RenewalSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_RenewalSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_RenewalSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.RenewalSettings.class, + com.google.cloud.channel.v1.RenewalSettings.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.RenewalSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + enableRenewal_ = false; + + resizeUnitCount_ = false; + + paymentPlan_ = 0; + + if (paymentCycleBuilder_ == null) { + paymentCycle_ = null; + } else { + paymentCycle_ = null; + paymentCycleBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_RenewalSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.RenewalSettings getDefaultInstanceForType() { + return com.google.cloud.channel.v1.RenewalSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.RenewalSettings build() { + com.google.cloud.channel.v1.RenewalSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.RenewalSettings buildPartial() { + com.google.cloud.channel.v1.RenewalSettings result = + new com.google.cloud.channel.v1.RenewalSettings(this); + result.enableRenewal_ = enableRenewal_; + result.resizeUnitCount_ = resizeUnitCount_; + result.paymentPlan_ = paymentPlan_; + if (paymentCycleBuilder_ == null) { + result.paymentCycle_ = paymentCycle_; + } else { + result.paymentCycle_ = paymentCycleBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.RenewalSettings) { + return mergeFrom((com.google.cloud.channel.v1.RenewalSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.RenewalSettings other) { + if (other == com.google.cloud.channel.v1.RenewalSettings.getDefaultInstance()) return this; + if (other.getEnableRenewal() != false) { + setEnableRenewal(other.getEnableRenewal()); + } + if (other.getResizeUnitCount() != false) { + setResizeUnitCount(other.getResizeUnitCount()); + } + if (other.paymentPlan_ != 0) { + setPaymentPlanValue(other.getPaymentPlanValue()); + } + if (other.hasPaymentCycle()) { + mergePaymentCycle(other.getPaymentCycle()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.RenewalSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.RenewalSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean enableRenewal_; + /** + * + * + *
+     * If false, the plan will be completed at the end date.
+     * 
+ * + * bool enable_renewal = 1; + * + * @return The enableRenewal. + */ + @java.lang.Override + public boolean getEnableRenewal() { + return enableRenewal_; + } + /** + * + * + *
+     * If false, the plan will be completed at the end date.
+     * 
+ * + * bool enable_renewal = 1; + * + * @param value The enableRenewal to set. + * @return This builder for chaining. + */ + public Builder setEnableRenewal(boolean value) { + + enableRenewal_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If false, the plan will be completed at the end date.
+     * 
+ * + * bool enable_renewal = 1; + * + * @return This builder for chaining. + */ + public Builder clearEnableRenewal() { + + enableRenewal_ = false; + onChanged(); + return this; + } + + private boolean resizeUnitCount_; + /** + * + * + *
+     * If true and enable_renewal = true, the unit (for example seats or licenses)
+     * will be set to the number of active units at renewal time.
+     * 
+ * + * bool resize_unit_count = 2; + * + * @return The resizeUnitCount. + */ + @java.lang.Override + public boolean getResizeUnitCount() { + return resizeUnitCount_; + } + /** + * + * + *
+     * If true and enable_renewal = true, the unit (for example seats or licenses)
+     * will be set to the number of active units at renewal time.
+     * 
+ * + * bool resize_unit_count = 2; + * + * @param value The resizeUnitCount to set. + * @return This builder for chaining. + */ + public Builder setResizeUnitCount(boolean value) { + + resizeUnitCount_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true and enable_renewal = true, the unit (for example seats or licenses)
+     * will be set to the number of active units at renewal time.
+     * 
+ * + * bool resize_unit_count = 2; + * + * @return This builder for chaining. + */ + public Builder clearResizeUnitCount() { + + resizeUnitCount_ = false; + onChanged(); + return this; + } + + private int paymentPlan_ = 0; + /** + * + * + *
+     * Describes how a reseller will be billed.
+     * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 5; + * + * @return The enum numeric value on the wire for paymentPlan. + */ + @java.lang.Override + public int getPaymentPlanValue() { + return paymentPlan_; + } + /** + * + * + *
+     * Describes how a reseller will be billed.
+     * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 5; + * + * @param value The enum numeric value on the wire for paymentPlan to set. + * @return This builder for chaining. + */ + public Builder setPaymentPlanValue(int value) { + + paymentPlan_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Describes how a reseller will be billed.
+     * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 5; + * + * @return The paymentPlan. + */ + @java.lang.Override + public com.google.cloud.channel.v1.PaymentPlan getPaymentPlan() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.PaymentPlan result = + com.google.cloud.channel.v1.PaymentPlan.valueOf(paymentPlan_); + return result == null ? com.google.cloud.channel.v1.PaymentPlan.UNRECOGNIZED : result; + } + /** + * + * + *
+     * Describes how a reseller will be billed.
+     * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 5; + * + * @param value The paymentPlan to set. + * @return This builder for chaining. + */ + public Builder setPaymentPlan(com.google.cloud.channel.v1.PaymentPlan value) { + if (value == null) { + throw new NullPointerException(); + } + + paymentPlan_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Describes how a reseller will be billed.
+     * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 5; + * + * @return This builder for chaining. + */ + public Builder clearPaymentPlan() { + + paymentPlan_ = 0; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.Period paymentCycle_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Period, + com.google.cloud.channel.v1.Period.Builder, + com.google.cloud.channel.v1.PeriodOrBuilder> + paymentCycleBuilder_; + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + * + * @return Whether the paymentCycle field is set. + */ + public boolean hasPaymentCycle() { + return paymentCycleBuilder_ != null || paymentCycle_ != null; + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + * + * @return The paymentCycle. + */ + public com.google.cloud.channel.v1.Period getPaymentCycle() { + if (paymentCycleBuilder_ == null) { + return paymentCycle_ == null + ? com.google.cloud.channel.v1.Period.getDefaultInstance() + : paymentCycle_; + } else { + return paymentCycleBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + */ + public Builder setPaymentCycle(com.google.cloud.channel.v1.Period value) { + if (paymentCycleBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + paymentCycle_ = value; + onChanged(); + } else { + paymentCycleBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + */ + public Builder setPaymentCycle(com.google.cloud.channel.v1.Period.Builder builderForValue) { + if (paymentCycleBuilder_ == null) { + paymentCycle_ = builderForValue.build(); + onChanged(); + } else { + paymentCycleBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + */ + public Builder mergePaymentCycle(com.google.cloud.channel.v1.Period value) { + if (paymentCycleBuilder_ == null) { + if (paymentCycle_ != null) { + paymentCycle_ = + com.google.cloud.channel.v1.Period.newBuilder(paymentCycle_) + .mergeFrom(value) + .buildPartial(); + } else { + paymentCycle_ = value; + } + onChanged(); + } else { + paymentCycleBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + */ + public Builder clearPaymentCycle() { + if (paymentCycleBuilder_ == null) { + paymentCycle_ = null; + onChanged(); + } else { + paymentCycle_ = null; + paymentCycleBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + */ + public com.google.cloud.channel.v1.Period.Builder getPaymentCycleBuilder() { + + onChanged(); + return getPaymentCycleFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + */ + public com.google.cloud.channel.v1.PeriodOrBuilder getPaymentCycleOrBuilder() { + if (paymentCycleBuilder_ != null) { + return paymentCycleBuilder_.getMessageOrBuilder(); + } else { + return paymentCycle_ == null + ? com.google.cloud.channel.v1.Period.getDefaultInstance() + : paymentCycle_; + } + } + /** + * + * + *
+     * Describes how frequently the reseller will be billed, such as
+     * once per month.
+     * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Period, + com.google.cloud.channel.v1.Period.Builder, + com.google.cloud.channel.v1.PeriodOrBuilder> + getPaymentCycleFieldBuilder() { + if (paymentCycleBuilder_ == null) { + paymentCycleBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Period, + com.google.cloud.channel.v1.Period.Builder, + com.google.cloud.channel.v1.PeriodOrBuilder>( + getPaymentCycle(), getParentForChildren(), isClean()); + paymentCycle_ = null; + } + return paymentCycleBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.RenewalSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.RenewalSettings) + private static final com.google.cloud.channel.v1.RenewalSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.RenewalSettings(); + } + + public static com.google.cloud.channel.v1.RenewalSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public RenewalSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new RenewalSettings(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.RenewalSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/RenewalSettingsOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/RenewalSettingsOrBuilder.java new file mode 100644 index 00000000..c4e16914 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/RenewalSettingsOrBuilder.java @@ -0,0 +1,115 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +public interface RenewalSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.RenewalSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * If false, the plan will be completed at the end date.
+   * 
+ * + * bool enable_renewal = 1; + * + * @return The enableRenewal. + */ + boolean getEnableRenewal(); + + /** + * + * + *
+   * If true and enable_renewal = true, the unit (for example seats or licenses)
+   * will be set to the number of active units at renewal time.
+   * 
+ * + * bool resize_unit_count = 2; + * + * @return The resizeUnitCount. + */ + boolean getResizeUnitCount(); + + /** + * + * + *
+   * Describes how a reseller will be billed.
+   * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 5; + * + * @return The enum numeric value on the wire for paymentPlan. + */ + int getPaymentPlanValue(); + /** + * + * + *
+   * Describes how a reseller will be billed.
+   * 
+ * + * .google.cloud.channel.v1.PaymentPlan payment_plan = 5; + * + * @return The paymentPlan. + */ + com.google.cloud.channel.v1.PaymentPlan getPaymentPlan(); + + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + * + * @return Whether the paymentCycle field is set. + */ + boolean hasPaymentCycle(); + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + * + * @return The paymentCycle. + */ + com.google.cloud.channel.v1.Period getPaymentCycle(); + /** + * + * + *
+   * Describes how frequently the reseller will be billed, such as
+   * once per month.
+   * 
+ * + * .google.cloud.channel.v1.Period payment_cycle = 6; + */ + com.google.cloud.channel.v1.PeriodOrBuilder getPaymentCycleOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ResourceType.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ResourceType.java new file mode 100644 index 00000000..fae2a68b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ResourceType.java @@ -0,0 +1,296 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/offers.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Represents the type for a monetizable resource(any entity on which billing
+ * happens). For example, this could be MINUTES for Google Voice and GB for
+ * Google Drive. One SKU can map to multiple monetizable resources.
+ * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.ResourceType} + */ +public enum ResourceType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+   * Not used.
+   * 
+ * + * RESOURCE_TYPE_UNSPECIFIED = 0; + */ + RESOURCE_TYPE_UNSPECIFIED(0), + /** + * + * + *
+   * Seat.
+   * 
+ * + * SEAT = 1; + */ + SEAT(1), + /** + * + * + *
+   * Monthly active user.
+   * 
+ * + * MAU = 2; + */ + MAU(2), + /** + * + * + *
+   * GB (used for storage SKUs).
+   * 
+ * + * GB = 3; + */ + GB(3), + /** + * + * + *
+   * Active licensed users(for Voice SKUs).
+   * 
+ * + * LICENSED_USER = 4; + */ + LICENSED_USER(4), + /** + * + * + *
+   * Voice usage.
+   * 
+ * + * MINUTES = 5; + */ + MINUTES(5), + /** + * + * + *
+   * For IaaS SKUs like Google Cloud Platform, monetization is based on usage
+   * accrued on your billing account irrespective of the type of monetizable
+   * resource. This enum represents an aggregated resource/container for all
+   * usage SKUs on a billing account. Currently, only applicable to Google Cloud
+   * Platform.
+   * 
+ * + * IAAS_USAGE = 6; + */ + IAAS_USAGE(6), + /** + * + * + *
+   * For Google Cloud Platform subscriptions like Anthos or SAP.
+   * 
+ * + * SUBSCRIPTION = 7; + */ + SUBSCRIPTION(7), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+   * Not used.
+   * 
+ * + * RESOURCE_TYPE_UNSPECIFIED = 0; + */ + public static final int RESOURCE_TYPE_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+   * Seat.
+   * 
+ * + * SEAT = 1; + */ + public static final int SEAT_VALUE = 1; + /** + * + * + *
+   * Monthly active user.
+   * 
+ * + * MAU = 2; + */ + public static final int MAU_VALUE = 2; + /** + * + * + *
+   * GB (used for storage SKUs).
+   * 
+ * + * GB = 3; + */ + public static final int GB_VALUE = 3; + /** + * + * + *
+   * Active licensed users(for Voice SKUs).
+   * 
+ * + * LICENSED_USER = 4; + */ + public static final int LICENSED_USER_VALUE = 4; + /** + * + * + *
+   * Voice usage.
+   * 
+ * + * MINUTES = 5; + */ + public static final int MINUTES_VALUE = 5; + /** + * + * + *
+   * For IaaS SKUs like Google Cloud Platform, monetization is based on usage
+   * accrued on your billing account irrespective of the type of monetizable
+   * resource. This enum represents an aggregated resource/container for all
+   * usage SKUs on a billing account. Currently, only applicable to Google Cloud
+   * Platform.
+   * 
+ * + * IAAS_USAGE = 6; + */ + public static final int IAAS_USAGE_VALUE = 6; + /** + * + * + *
+   * For Google Cloud Platform subscriptions like Anthos or SAP.
+   * 
+ * + * SUBSCRIPTION = 7; + */ + public static final int SUBSCRIPTION_VALUE = 7; + + 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 ResourceType 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 ResourceType forNumber(int value) { + switch (value) { + case 0: + return RESOURCE_TYPE_UNSPECIFIED; + case 1: + return SEAT; + case 2: + return MAU; + case 3: + return GB; + case 4: + return LICENSED_USER; + case 5: + return MINUTES; + case 6: + return IAAS_USAGE; + case 7: + return SUBSCRIPTION; + 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 ResourceType findValueByNumber(int number) { + return ResourceType.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.OffersProto.getDescriptor().getEnumTypes().get(3); + } + + private static final ResourceType[] VALUES = values(); + + public static ResourceType 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 ResourceType(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.ResourceType) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ServiceProto.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ServiceProto.java new file mode 100644 index 00000000..1c1583fb --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ServiceProto.java @@ -0,0 +1,1052 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public final class ServiceProto { + private ServiceProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_CloudIdentityCustomerAccount_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_CloudIdentityCustomerAccount_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListCustomersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListCustomersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListCustomersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListCustomersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_GetCustomerRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_GetCustomerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_CreateCustomerRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_CreateCustomerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_UpdateCustomerRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_UpdateCustomerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_DeleteCustomerRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_DeleteCustomerRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ProvisionCloudIdentityRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ProvisionCloudIdentityRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListEntitlementsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListEntitlementsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListEntitlementsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListEntitlementsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListTransferableSkusRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListTransferableSkusRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListTransferableSkusResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListTransferableSkusResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListTransferableOffersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListTransferableOffersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListTransferableOffersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListTransferableOffersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_TransferableOffer_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_TransferableOffer_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_GetEntitlementRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_GetEntitlementRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListChannelPartnerLinksRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListChannelPartnerLinksRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListChannelPartnerLinksResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListChannelPartnerLinksResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_GetChannelPartnerLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_GetChannelPartnerLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_CreateChannelPartnerLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_CreateChannelPartnerLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_UpdateChannelPartnerLinkRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_UpdateChannelPartnerLinkRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_CreateEntitlementRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_CreateEntitlementRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_TransferEntitlementsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_TransferEntitlementsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_TransferEntitlementsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_TransferEntitlementsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_TransferEntitlementsToGoogleRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_TransferEntitlementsToGoogleRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ChangeParametersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ChangeParametersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ChangeRenewalSettingsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ChangeRenewalSettingsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ChangeOfferRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ChangeOfferRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_StartPaidServiceRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_StartPaidServiceRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_CancelEntitlementRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_CancelEntitlementRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_SuspendEntitlementRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_SuspendEntitlementRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ActivateEntitlementRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ActivateEntitlementRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListProductsRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListProductsRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListProductsResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListProductsResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListSkusRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListSkusRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListSkusResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListSkusResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListOffersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListOffersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListOffersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListOffersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_CreateEntitlementPurchase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_CreateEntitlementPurchase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_ChangeOfferPurchase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_ChangeOfferPurchase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListPurchasableSkusResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListPurchasableSkusResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_PurchasableSku_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_PurchasableSku_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_CreateEntitlementPurchase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_CreateEntitlementPurchase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_ChangeOfferPurchase_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_ChangeOfferPurchase_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_ListPurchasableOffersResponse_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_ListPurchasableOffersResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_cloud_channel_v1_PurchasableOffer_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_cloud_channel_v1_PurchasableOffer_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n%google/cloud/channel/v1/service.proto\022" + + "\027google.cloud.channel.v1\032\034google/api/ann" + + "otations.proto\032\027google/api/client.proto\032" + + "\037google/api/field_behavior.proto\032\031google" + + "/api/resource.proto\0323google/cloud/channe" + + "l/v1/channel_partner_links.proto\032$google" + + "/cloud/channel/v1/common.proto\032\'google/c" + + "loud/channel/v1/customers.proto\032*google/" + + "cloud/channel/v1/entitlements.proto\032$goo" + + "gle/cloud/channel/v1/offers.proto\032&googl" + + "e/cloud/channel/v1/products.proto\032#googl" + + "e/longrunning/operations.proto\032\033google/p" + + "rotobuf/empty.proto\032 google/protobuf/fie" + + "ld_mask.proto\"R\n&CheckCloudIdentityAccou" + + "ntsExistRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\023\n\006" + + "domain\030\002 \001(\tB\003\340A\002\"z\n\034CloudIdentityCustom" + + "erAccount\022\020\n\010existing\030\001 \001(\010\022\r\n\005owned\030\002 \001" + + "(\010\022\025\n\rcustomer_name\030\003 \001(\t\022\"\n\032customer_cl" + + "oud_identity_id\030\004 \001(\t\"\201\001\n\'CheckCloudIden" + + "tityAccountsExistResponse\022V\n\027cloud_ident" + + "ity_accounts\030\001 \003(\01325.google.cloud.channe" + + "l.v1.CloudIdentityCustomerAccount\"\\\n\024Lis" + + "tCustomersRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\026" + + "\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001" + + "(\tB\003\340A\001\"f\n\025ListCustomersResponse\0224\n\tcust" + + "omers\030\001 \003(\0132!.google.cloud.channel.v1.Cu" + + "stomer\022\027\n\017next_page_token\030\002 \001(\t\"P\n\022GetCu" + + "stomerRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$clo" + + "udchannel.googleapis.com/Customer\"f\n\025Cre" + + "ateCustomerRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022" + + "8\n\010customer\030\002 \001(\0132!.google.cloud.channel" + + ".v1.CustomerB\003\340A\002\"\202\001\n\025UpdateCustomerRequ" + + "est\0228\n\010customer\030\002 \001(\0132!.google.cloud.cha" + + "nnel.v1.CustomerB\003\340A\002\022/\n\013update_mask\030\003 \001" + + "(\0132\032.google.protobuf.FieldMask\"S\n\025Delete" + + "CustomerRequest\022:\n\004name\030\001 \001(\tB,\340A\002\372A&\n$c" + + "loudchannel.googleapis.com/Customer\"\361\001\n\035" + + "ProvisionCloudIdentityRequest\022>\n\010custome" + + "r\030\001 \001(\tB,\340A\002\372A&\n$cloudchannel.googleapis" + + ".com/Customer\022G\n\023cloud_identity_info\030\002 \001" + + "(\0132*.google.cloud.channel.v1.CloudIdenti" + + "tyInfo\0220\n\004user\030\003 \001(\0132\".google.cloud.chan" + + "nel.v1.AdminUser\022\025\n\rvalidate_only\030\004 \001(\010\"" + + "\210\001\n\027ListEntitlementsRequest\022<\n\006parent\030\001 " + + "\001(\tB,\340A\002\372A&\n$cloudchannel.googleapis.com" + + "/Customer\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npag" + + "e_token\030\003 \001(\tB\003\340A\001\"o\n\030ListEntitlementsRe" + + "sponse\022:\n\014entitlements\030\001 \003(\0132$.google.cl" + + "oud.channel.v1.Entitlement\022\027\n\017next_page_" + + "token\030\002 \001(\t\"\333\001\n\033ListTransferableSkusRequ" + + "est\022\033\n\021cloud_identity_id\030\004 \001(\tH\000\022\027\n\rcust" + + "omer_name\030\007 \001(\tH\000\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021" + + "\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\022\n" + + "\nauth_token\030\005 \001(\t\022\025\n\rlanguage_code\030\006 \001(\t" + + "B\037\n\035transferred_customer_identity\"|\n\034Lis" + + "tTransferableSkusResponse\022C\n\021transferabl" + + "e_skus\030\001 \003(\0132(.google.cloud.channel.v1.T" + + "ransferableSku\022\027\n\017next_page_token\030\002 \001(\t\"" + + "\333\001\n\035ListTransferableOffersRequest\022\033\n\021clo" + + "ud_identity_id\030\004 \001(\tH\000\022\027\n\rcustomer_name\030" + + "\005 \001(\tH\000\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\021\n\tpage_siz" + + "e\030\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\022\020\n\003sku\030\006 \001(\t" + + "B\003\340A\002\022\025\n\rlanguage_code\030\007 \001(\tB\037\n\035transfer" + + "red_customer_identity\"\202\001\n\036ListTransferab" + + "leOffersResponse\022G\n\023transferable_offers\030" + + "\001 \003(\0132*.google.cloud.channel.v1.Transfer" + + "ableOffer\022\027\n\017next_page_token\030\002 \001(\t\"B\n\021Tr" + + "ansferableOffer\022-\n\005offer\030\001 \001(\0132\036.google." + + "cloud.channel.v1.Offer\"V\n\025GetEntitlement" + + "Request\022=\n\004name\030\001 \001(\tB/\340A\002\372A)\n\'cloudchan" + + "nel.googleapis.com/Entitlement\"\252\001\n\036ListC" + + "hannelPartnerLinksRequest\022\023\n\006parent\030\001 \001(" + + "\tB\003\340A\002\022\026\n\tpage_size\030\002 \001(\005B\003\340A\001\022\027\n\npage_t" + + "oken\030\003 \001(\tB\003\340A\001\022B\n\004view\030\004 \001(\0162/.google.c" + + "loud.channel.v1.ChannelPartnerLinkViewB\003" + + "\340A\001\"\206\001\n\037ListChannelPartnerLinksResponse\022" + + "J\n\025channel_partner_links\030\001 \003(\0132+.google." + + "cloud.channel.v1.ChannelPartnerLink\022\027\n\017n" + + "ext_page_token\030\002 \001(\t\"u\n\034GetChannelPartne" + + "rLinkRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022B\n\004view\030" + + "\002 \001(\0162/.google.cloud.channel.v1.ChannelP" + + "artnerLinkViewB\003\340A\001\"\233\001\n\037CreateChannelPar" + + "tnerLinkRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022N\n\024" + + "channel_partner_link\030\002 \001(\0132+.google.clou" + + "d.channel.v1.ChannelPartnerLinkB\003\340A\002\022\023\n\006" + + "domain\030\003 \001(\tB\003\340A\001\"\272\001\n\037UpdateChannelPartn" + + "erLinkRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022N\n\024chan" + + "nel_partner_link\030\002 \001(\0132+.google.cloud.ch" + + "annel.v1.ChannelPartnerLinkB\003\340A\002\0224\n\013upda" + + "te_mask\030\003 \001(\0132\032.google.protobuf.FieldMas" + + "kB\003\340A\002\"\261\001\n\030CreateEntitlementRequest\022<\n\006p" + + "arent\030\001 \001(\tB,\340A\002\372A&\n$cloudchannel.google" + + "apis.com/Customer\022>\n\013entitlement\030\002 \001(\0132$" + + ".google.cloud.channel.v1.EntitlementB\003\340A" + + "\002\022\027\n\nrequest_id\030\005 \001(\tB\003\340A\001\"\240\001\n\033TransferE" + + "ntitlementsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022" + + "?\n\014entitlements\030\002 \003(\0132$.google.cloud.cha" + + "nnel.v1.EntitlementB\003\340A\002\022\022\n\nauth_token\030\004" + + " \001(\t\022\027\n\nrequest_id\030\006 \001(\tB\003\340A\001\"Z\n\034Transfe" + + "rEntitlementsResponse\022:\n\014entitlements\030\001 " + + "\003(\0132$.google.cloud.channel.v1.Entitlemen" + + "t\"\224\001\n#TransferEntitlementsToGoogleReques" + + "t\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022?\n\014entitlements\030\002" + + " \003(\0132$.google.cloud.channel.v1.Entitleme" + + "ntB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"\242\001\n\027Cha" + + "ngeParametersRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022" + + ";\n\nparameters\030\002 \003(\0132\".google.cloud.chann" + + "el.v1.ParameterB\003\340A\002\022\027\n\nrequest_id\030\004 \001(\t" + + "B\003\340A\001\022\036\n\021purchase_order_id\030\005 \001(\tB\003\340A\001\"\223\001" + + "\n\034ChangeRenewalSettingsRequest\022\021\n\004name\030\001" + + " \001(\tB\003\340A\002\022G\n\020renewal_settings\030\004 \001(\0132(.go" + + "ogle.cloud.channel.v1.RenewalSettingsB\003\340" + + "A\002\022\027\n\nrequest_id\030\005 \001(\tB\003\340A\001\"\327\001\n\022ChangeOf" + + "ferRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\0228\n\005offer\030\002" + + " \001(\tB)\340A\002\372A#\n!cloudchannel.googleapis.co" + + "m/Offer\022;\n\nparameters\030\003 \003(\0132\".google.clo" + + "ud.channel.v1.ParameterB\003\340A\001\022\036\n\021purchase" + + "_order_id\030\005 \001(\tB\003\340A\001\022\027\n\nrequest_id\030\006 \001(\t" + + "B\003\340A\001\"E\n\027StartPaidServiceRequest\022\021\n\004name" + + "\030\001 \001(\tB\003\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"F\n\030" + + "CancelEntitlementRequest\022\021\n\004name\030\001 \001(\tB\003" + + "\340A\002\022\027\n\nrequest_id\030\003 \001(\tB\003\340A\001\"G\n\031SuspendE" + + "ntitlementRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\027\n\n" + + "request_id\030\003 \001(\tB\003\340A\001\"H\n\032ActivateEntitle" + + "mentRequest\022\021\n\004name\030\001 \001(\tB\003\340A\002\022\027\n\nreques" + + "t_id\030\003 \001(\tB\003\340A\001\"x\n\023ListProductsRequest\022\024" + + "\n\007account\030\001 \001(\tB\003\340A\002\022\026\n\tpage_size\030\002 \001(\005B" + + "\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022\032\n\rlanguag" + + "e_code\030\004 \001(\tB\003\340A\001\"c\n\024ListProductsRespons" + + "e\0222\n\010products\030\001 \003(\0132 .google.cloud.chann" + + "el.v1.Product\022\027\n\017next_page_token\030\002 \001(\t\"\261" + + "\001\n\017ListSkusRequest\022;\n\006parent\030\001 \001(\tB+\340A\002\372" + + "A%\n#cloudchannel.googleapis.com/Product\022" + + "\024\n\007account\030\002 \001(\tB\003\340A\002\022\026\n\tpage_size\030\003 \001(\005" + + "B\003\340A\001\022\027\n\npage_token\030\004 \001(\tB\003\340A\001\022\032\n\rlangua" + + "ge_code\030\005 \001(\tB\003\340A\001\"W\n\020ListSkusResponse\022*" + + "\n\004skus\030\001 \003(\0132\034.google.cloud.channel.v1.S" + + "ku\022\027\n\017next_page_token\030\002 \001(\t\"\212\001\n\021ListOffe" + + "rsRequest\022\023\n\006parent\030\001 \001(\tB\003\340A\002\022\026\n\tpage_s" + + "ize\030\002 \001(\005B\003\340A\001\022\027\n\npage_token\030\003 \001(\tB\003\340A\001\022" + + "\023\n\006filter\030\004 \001(\tB\003\340A\001\022\032\n\rlanguage_code\030\005 " + + "\001(\tB\003\340A\001\"]\n\022ListOffersResponse\022.\n\006offers" + + "\030\001 \003(\0132\036.google.cloud.channel.v1.Offer\022\027" + + "\n\017next_page_token\030\002 \001(\t\"\266\005\n\032ListPurchasa" + + "bleSkusRequest\022t\n\033create_entitlement_pur" + + "chase\030\002 \001(\0132M.google.cloud.channel.v1.Li" + + "stPurchasableSkusRequest.CreateEntitleme" + + "ntPurchaseH\000\022h\n\025change_offer_purchase\030\003 " + + "\001(\0132G.google.cloud.channel.v1.ListPurcha" + + "sableSkusRequest.ChangeOfferPurchaseH\000\022>" + + "\n\010customer\030\001 \001(\tB,\340A\002\372A&\n$cloudchannel.g" + + "oogleapis.com/Customer\022\026\n\tpage_size\030\004 \001(" + + "\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003\340A\001\022\032\n\rlangu" + + "age_code\030\006 \001(\tB\003\340A\001\0321\n\031CreateEntitlement" + + "Purchase\022\024\n\007product\030\001 \001(\tB\003\340A\002\032\344\001\n\023Chang" + + "eOfferPurchase\022\030\n\013entitlement\030\001 \001(\tB\003\340A\002" + + "\022l\n\013change_type\030\002 \001(\0162R.google.cloud.cha" + + "nnel.v1.ListPurchasableSkusRequest.Chang" + + "eOfferPurchase.ChangeTypeB\003\340A\002\"E\n\nChange" + + "Type\022\033\n\027CHANGE_TYPE_UNSPECIFIED\020\000\022\013\n\007UPG" + + "RADE\020\001\022\r\n\tDOWNGRADE\020\002B\021\n\017purchase_option" + + "\"y\n\033ListPurchasableSkusResponse\022A\n\020purch" + + "asable_skus\030\001 \003(\0132\'.google.cloud.channel" + + ".v1.PurchasableSku\022\027\n\017next_page_token\030\002 " + + "\001(\t\";\n\016PurchasableSku\022)\n\003sku\030\001 \001(\0132\034.goo" + + "gle.cloud.channel.v1.Sku\"\230\004\n\034ListPurchas" + + "ableOffersRequest\022v\n\033create_entitlement_" + + "purchase\030\002 \001(\0132O.google.cloud.channel.v1" + + ".ListPurchasableOffersRequest.CreateEnti" + + "tlementPurchaseH\000\022j\n\025change_offer_purcha" + + "se\030\003 \001(\0132I.google.cloud.channel.v1.ListP" + + "urchasableOffersRequest.ChangeOfferPurch" + + "aseH\000\022>\n\010customer\030\001 \001(\tB,\340A\002\372A&\n$cloudch" + + "annel.googleapis.com/Customer\022\026\n\tpage_si" + + "ze\030\004 \001(\005B\003\340A\001\022\027\n\npage_token\030\005 \001(\tB\003\340A\001\022\032" + + "\n\rlanguage_code\030\006 \001(\tB\003\340A\001\032-\n\031CreateEnti" + + "tlementPurchase\022\020\n\003sku\030\001 \001(\tB\003\340A\002\032E\n\023Cha" + + "ngeOfferPurchase\022\030\n\013entitlement\030\001 \001(\tB\003\340" + + "A\002\022\024\n\007new_sku\030\002 \001(\tB\003\340A\001B\021\n\017purchase_opt" + + "ion\"\177\n\035ListPurchasableOffersResponse\022E\n\022" + + "purchasable_offers\030\001 \003(\0132).google.cloud." + + "channel.v1.PurchasableOffer\022\027\n\017next_page" + + "_token\030\002 \001(\t\"A\n\020PurchasableOffer\022-\n\005offe" + + "r\030\001 \001(\0132\036.google.cloud.channel.v1.Offer2" + + "\264-\n\023CloudChannelService\022\231\001\n\rListCustomer" + + "s\022-.google.cloud.channel.v1.ListCustomer" + + "sRequest\032..google.cloud.channel.v1.ListC" + + "ustomersResponse\")\202\323\344\223\002#\022!/v1/{parent=ac" + + "counts/*}/customers\022\217\001\n\013GetCustomer\022+.go" + + "ogle.cloud.channel.v1.GetCustomerRequest" + + "\032!.google.cloud.channel.v1.Customer\"0\202\323\344" + + "\223\002#\022!/v1/{name=accounts/*/customers/*}\332A" + + "\004name\022\350\001\n\037CheckCloudIdentityAccountsExis" + + "t\022?.google.cloud.channel.v1.CheckCloudId" + + "entityAccountsExistRequest\032@.google.clou" + + "d.channel.v1.CheckCloudIdentityAccountsE" + + "xistResponse\"B\202\323\344\223\002<\"7/v1/{parent=accoun" + + "ts/*}:checkCloudIdentityAccountsExist:\001*" + + "\022\230\001\n\016CreateCustomer\022..google.cloud.chann" + + "el.v1.CreateCustomerRequest\032!.google.clo" + + "ud.channel.v1.Customer\"3\202\323\344\223\002-\"!/v1/{par" + + "ent=accounts/*}/customers:\010customer\022\241\001\n\016" + + "UpdateCustomer\022..google.cloud.channel.v1" + + ".UpdateCustomerRequest\032!.google.cloud.ch" + + "annel.v1.Customer\"<\202\323\344\223\00262*/v1/{customer" + + ".name=accounts/*/customers/*}:\010customer\022" + + "\212\001\n\016DeleteCustomer\022..google.cloud.channe" + + "l.v1.DeleteCustomerRequest\032\026.google.prot" + + "obuf.Empty\"0\202\323\344\223\002#*!/v1/{name=accounts/*" + + "/customers/*}\332A\004name\022\330\001\n\026ProvisionCloudI" + + "dentity\0226.google.cloud.channel.v1.Provis" + + "ionCloudIdentityRequest\032\035.google.longrun" + + "ning.Operation\"g\202\323\344\223\002A\"\"9/v1/{name=accounts/*/cu" + + "stomers/*/entitlements/*}:activate:\001*\312A " + + "\n\013Entitlement\022\021OperationMetadata\022\344\001\n\024Tra" + + "nsferEntitlements\0224.google.cloud.channel" + + ".v1.TransferEntitlementsRequest\032\035.google" + + ".longrunning.Operation\"w\202\323\344\223\002=\"8/v1/{par" + + "ent=accounts/*/customers/*}:transferEnti" + + "tlements:\001*\312A1\n\034TransferEntitlementsResp" + + "onse\022\021OperationMetadata\022\365\001\n\034TransferEnti" + + "tlementsToGoogle\022<.google.cloud.channel." + + "v1.TransferEntitlementsToGoogleRequest\032\035" + + ".google.longrunning.Operation\"x\202\323\344\223\002E\"@/" + + "v1/{parent=accounts/*/customers/*}:trans" + + "ferEntitlementsToGoogle:\001*\312A*\n\025google.pr" + + "otobuf.Empty\022\021OperationMetadata\022\301\001\n\027List" + + "ChannelPartnerLinks\0227.google.cloud.chann" + + "el.v1.ListChannelPartnerLinksRequest\0328.g" + + "oogle.cloud.channel.v1.ListChannelPartne" + + "rLinksResponse\"3\202\323\344\223\002-\022+/v1/{parent=acco" + + "unts/*}/channelPartnerLinks\022\260\001\n\025GetChann" + + "elPartnerLink\0225.google.cloud.channel.v1." + + "GetChannelPartnerLinkRequest\032+.google.cl" + + "oud.channel.v1.ChannelPartnerLink\"3\202\323\344\223\002" + + "-\022+/v1/{name=accounts/*/channelPartnerLi" + + "nks/*}\022\314\001\n\030CreateChannelPartnerLink\0228.go" + + "ogle.cloud.channel.v1.CreateChannelPartn" + + "erLinkRequest\032+.google.cloud.channel.v1." + + "ChannelPartnerLink\"I\202\323\344\223\002C\"+/v1/{parent=" + + "accounts/*}/channelPartnerLinks:\024channel" + + "_partner_link\022\271\001\n\030UpdateChannelPartnerLi" + + "nk\0228.google.cloud.channel.v1.UpdateChann" + + "elPartnerLinkRequest\032+.google.cloud.chan" + + "nel.v1.ChannelPartnerLink\"6\202\323\344\223\00202+/v1/{" + + "name=accounts/*/channelPartnerLinks/*}:\001" + + "*\022\201\001\n\014ListProducts\022,.google.cloud.channe" + + "l.v1.ListProductsRequest\032-.google.cloud." + + "channel.v1.ListProductsResponse\"\024\202\323\344\223\002\016\022" + + "\014/v1/products\022\205\001\n\010ListSkus\022(.google.clou" + + "d.channel.v1.ListSkusRequest\032).google.cl" + + "oud.channel.v1.ListSkusResponse\"$\202\323\344\223\002\036\022" + + "\034/v1/{parent=products/*}/skus\022\215\001\n\nListOf" + + "fers\022*.google.cloud.channel.v1.ListOffer" + + "sRequest\032+.google.cloud.channel.v1.ListO" + + "ffersResponse\"&\202\323\344\223\002 \022\036/v1/{parent=accou" + + "nts/*}/offers\022\303\001\n\023ListPurchasableSkus\0223." + + "google.cloud.channel.v1.ListPurchasableS" + + "kusRequest\0324.google.cloud.channel.v1.Lis" + + "tPurchasableSkusResponse\"A\202\323\344\223\002;\0229/v1/{c" + + "ustomer=accounts/*/customers/*}:listPurc" + + "hasableSkus\022\313\001\n\025ListPurchasableOffers\0225." + + "google.cloud.channel.v1.ListPurchasableO" + + "ffersRequest\0326.google.cloud.channel.v1.L" + + "istPurchasableOffersResponse\"C\202\323\344\223\002=\022;/v" + + "1/{customer=accounts/*/customers/*}:list" + + "PurchasableOffers\032K\312A\033cloudchannel.googl" + + "eapis.com\322A*https://www.googleapis.com/a" + + "uth/apps.orderBm\n\033com.google.cloud.chann" + + "el.v1B\014ServiceProtoP\001Z>google.golang.org" + + "/genproto/googleapis/cloud/channel/v1;ch" + + "annelb\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.api.AnnotationsProto.getDescriptor(), + com.google.api.ClientProto.getDescriptor(), + com.google.api.FieldBehaviorProto.getDescriptor(), + com.google.api.ResourceProto.getDescriptor(), + com.google.cloud.channel.v1.ChannelPartnerLinksProto.getDescriptor(), + com.google.cloud.channel.v1.CommonProto.getDescriptor(), + com.google.cloud.channel.v1.CustomersProto.getDescriptor(), + com.google.cloud.channel.v1.EntitlementsProto.getDescriptor(), + com.google.cloud.channel.v1.OffersProto.getDescriptor(), + com.google.cloud.channel.v1.ProductsProto.getDescriptor(), + com.google.longrunning.OperationsProto.getDescriptor(), + com.google.protobuf.EmptyProto.getDescriptor(), + com.google.protobuf.FieldMaskProto.getDescriptor(), + }); + internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistRequest_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistRequest_descriptor, + new java.lang.String[] { + "Parent", "Domain", + }); + internal_static_google_cloud_channel_v1_CloudIdentityCustomerAccount_descriptor = + getDescriptor().getMessageTypes().get(1); + internal_static_google_cloud_channel_v1_CloudIdentityCustomerAccount_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_CloudIdentityCustomerAccount_descriptor, + new java.lang.String[] { + "Existing", "Owned", "CustomerName", "CustomerCloudIdentityId", + }); + internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistResponse_descriptor = + getDescriptor().getMessageTypes().get(2); + internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_CheckCloudIdentityAccountsExistResponse_descriptor, + new java.lang.String[] { + "CloudIdentityAccounts", + }); + internal_static_google_cloud_channel_v1_ListCustomersRequest_descriptor = + getDescriptor().getMessageTypes().get(3); + internal_static_google_cloud_channel_v1_ListCustomersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListCustomersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_channel_v1_ListCustomersResponse_descriptor = + getDescriptor().getMessageTypes().get(4); + internal_static_google_cloud_channel_v1_ListCustomersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListCustomersResponse_descriptor, + new java.lang.String[] { + "Customers", "NextPageToken", + }); + internal_static_google_cloud_channel_v1_GetCustomerRequest_descriptor = + getDescriptor().getMessageTypes().get(5); + internal_static_google_cloud_channel_v1_GetCustomerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_GetCustomerRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_channel_v1_CreateCustomerRequest_descriptor = + getDescriptor().getMessageTypes().get(6); + internal_static_google_cloud_channel_v1_CreateCustomerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_CreateCustomerRequest_descriptor, + new java.lang.String[] { + "Parent", "Customer", + }); + internal_static_google_cloud_channel_v1_UpdateCustomerRequest_descriptor = + getDescriptor().getMessageTypes().get(7); + internal_static_google_cloud_channel_v1_UpdateCustomerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_UpdateCustomerRequest_descriptor, + new java.lang.String[] { + "Customer", "UpdateMask", + }); + internal_static_google_cloud_channel_v1_DeleteCustomerRequest_descriptor = + getDescriptor().getMessageTypes().get(8); + internal_static_google_cloud_channel_v1_DeleteCustomerRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_DeleteCustomerRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_channel_v1_ProvisionCloudIdentityRequest_descriptor = + getDescriptor().getMessageTypes().get(9); + internal_static_google_cloud_channel_v1_ProvisionCloudIdentityRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ProvisionCloudIdentityRequest_descriptor, + new java.lang.String[] { + "Customer", "CloudIdentityInfo", "User", "ValidateOnly", + }); + internal_static_google_cloud_channel_v1_ListEntitlementsRequest_descriptor = + getDescriptor().getMessageTypes().get(10); + internal_static_google_cloud_channel_v1_ListEntitlementsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListEntitlementsRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", + }); + internal_static_google_cloud_channel_v1_ListEntitlementsResponse_descriptor = + getDescriptor().getMessageTypes().get(11); + internal_static_google_cloud_channel_v1_ListEntitlementsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListEntitlementsResponse_descriptor, + new java.lang.String[] { + "Entitlements", "NextPageToken", + }); + internal_static_google_cloud_channel_v1_ListTransferableSkusRequest_descriptor = + getDescriptor().getMessageTypes().get(12); + internal_static_google_cloud_channel_v1_ListTransferableSkusRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListTransferableSkusRequest_descriptor, + new java.lang.String[] { + "CloudIdentityId", + "CustomerName", + "Parent", + "PageSize", + "PageToken", + "AuthToken", + "LanguageCode", + "TransferredCustomerIdentity", + }); + internal_static_google_cloud_channel_v1_ListTransferableSkusResponse_descriptor = + getDescriptor().getMessageTypes().get(13); + internal_static_google_cloud_channel_v1_ListTransferableSkusResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListTransferableSkusResponse_descriptor, + new java.lang.String[] { + "TransferableSkus", "NextPageToken", + }); + internal_static_google_cloud_channel_v1_ListTransferableOffersRequest_descriptor = + getDescriptor().getMessageTypes().get(14); + internal_static_google_cloud_channel_v1_ListTransferableOffersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListTransferableOffersRequest_descriptor, + new java.lang.String[] { + "CloudIdentityId", + "CustomerName", + "Parent", + "PageSize", + "PageToken", + "Sku", + "LanguageCode", + "TransferredCustomerIdentity", + }); + internal_static_google_cloud_channel_v1_ListTransferableOffersResponse_descriptor = + getDescriptor().getMessageTypes().get(15); + internal_static_google_cloud_channel_v1_ListTransferableOffersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListTransferableOffersResponse_descriptor, + new java.lang.String[] { + "TransferableOffers", "NextPageToken", + }); + internal_static_google_cloud_channel_v1_TransferableOffer_descriptor = + getDescriptor().getMessageTypes().get(16); + internal_static_google_cloud_channel_v1_TransferableOffer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_TransferableOffer_descriptor, + new java.lang.String[] { + "Offer", + }); + internal_static_google_cloud_channel_v1_GetEntitlementRequest_descriptor = + getDescriptor().getMessageTypes().get(17); + internal_static_google_cloud_channel_v1_GetEntitlementRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_GetEntitlementRequest_descriptor, + new java.lang.String[] { + "Name", + }); + internal_static_google_cloud_channel_v1_ListChannelPartnerLinksRequest_descriptor = + getDescriptor().getMessageTypes().get(18); + internal_static_google_cloud_channel_v1_ListChannelPartnerLinksRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListChannelPartnerLinksRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "View", + }); + internal_static_google_cloud_channel_v1_ListChannelPartnerLinksResponse_descriptor = + getDescriptor().getMessageTypes().get(19); + internal_static_google_cloud_channel_v1_ListChannelPartnerLinksResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListChannelPartnerLinksResponse_descriptor, + new java.lang.String[] { + "ChannelPartnerLinks", "NextPageToken", + }); + internal_static_google_cloud_channel_v1_GetChannelPartnerLinkRequest_descriptor = + getDescriptor().getMessageTypes().get(20); + internal_static_google_cloud_channel_v1_GetChannelPartnerLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_GetChannelPartnerLinkRequest_descriptor, + new java.lang.String[] { + "Name", "View", + }); + internal_static_google_cloud_channel_v1_CreateChannelPartnerLinkRequest_descriptor = + getDescriptor().getMessageTypes().get(21); + internal_static_google_cloud_channel_v1_CreateChannelPartnerLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_CreateChannelPartnerLinkRequest_descriptor, + new java.lang.String[] { + "Parent", "ChannelPartnerLink", "Domain", + }); + internal_static_google_cloud_channel_v1_UpdateChannelPartnerLinkRequest_descriptor = + getDescriptor().getMessageTypes().get(22); + internal_static_google_cloud_channel_v1_UpdateChannelPartnerLinkRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_UpdateChannelPartnerLinkRequest_descriptor, + new java.lang.String[] { + "Name", "ChannelPartnerLink", "UpdateMask", + }); + internal_static_google_cloud_channel_v1_CreateEntitlementRequest_descriptor = + getDescriptor().getMessageTypes().get(23); + internal_static_google_cloud_channel_v1_CreateEntitlementRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_CreateEntitlementRequest_descriptor, + new java.lang.String[] { + "Parent", "Entitlement", "RequestId", + }); + internal_static_google_cloud_channel_v1_TransferEntitlementsRequest_descriptor = + getDescriptor().getMessageTypes().get(24); + internal_static_google_cloud_channel_v1_TransferEntitlementsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_TransferEntitlementsRequest_descriptor, + new java.lang.String[] { + "Parent", "Entitlements", "AuthToken", "RequestId", + }); + internal_static_google_cloud_channel_v1_TransferEntitlementsResponse_descriptor = + getDescriptor().getMessageTypes().get(25); + internal_static_google_cloud_channel_v1_TransferEntitlementsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_TransferEntitlementsResponse_descriptor, + new java.lang.String[] { + "Entitlements", + }); + internal_static_google_cloud_channel_v1_TransferEntitlementsToGoogleRequest_descriptor = + getDescriptor().getMessageTypes().get(26); + internal_static_google_cloud_channel_v1_TransferEntitlementsToGoogleRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_TransferEntitlementsToGoogleRequest_descriptor, + new java.lang.String[] { + "Parent", "Entitlements", "RequestId", + }); + internal_static_google_cloud_channel_v1_ChangeParametersRequest_descriptor = + getDescriptor().getMessageTypes().get(27); + internal_static_google_cloud_channel_v1_ChangeParametersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ChangeParametersRequest_descriptor, + new java.lang.String[] { + "Name", "Parameters", "RequestId", "PurchaseOrderId", + }); + internal_static_google_cloud_channel_v1_ChangeRenewalSettingsRequest_descriptor = + getDescriptor().getMessageTypes().get(28); + internal_static_google_cloud_channel_v1_ChangeRenewalSettingsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ChangeRenewalSettingsRequest_descriptor, + new java.lang.String[] { + "Name", "RenewalSettings", "RequestId", + }); + internal_static_google_cloud_channel_v1_ChangeOfferRequest_descriptor = + getDescriptor().getMessageTypes().get(29); + internal_static_google_cloud_channel_v1_ChangeOfferRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ChangeOfferRequest_descriptor, + new java.lang.String[] { + "Name", "Offer", "Parameters", "PurchaseOrderId", "RequestId", + }); + internal_static_google_cloud_channel_v1_StartPaidServiceRequest_descriptor = + getDescriptor().getMessageTypes().get(30); + internal_static_google_cloud_channel_v1_StartPaidServiceRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_StartPaidServiceRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_channel_v1_CancelEntitlementRequest_descriptor = + getDescriptor().getMessageTypes().get(31); + internal_static_google_cloud_channel_v1_CancelEntitlementRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_CancelEntitlementRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_channel_v1_SuspendEntitlementRequest_descriptor = + getDescriptor().getMessageTypes().get(32); + internal_static_google_cloud_channel_v1_SuspendEntitlementRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_SuspendEntitlementRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_channel_v1_ActivateEntitlementRequest_descriptor = + getDescriptor().getMessageTypes().get(33); + internal_static_google_cloud_channel_v1_ActivateEntitlementRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ActivateEntitlementRequest_descriptor, + new java.lang.String[] { + "Name", "RequestId", + }); + internal_static_google_cloud_channel_v1_ListProductsRequest_descriptor = + getDescriptor().getMessageTypes().get(34); + internal_static_google_cloud_channel_v1_ListProductsRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListProductsRequest_descriptor, + new java.lang.String[] { + "Account", "PageSize", "PageToken", "LanguageCode", + }); + internal_static_google_cloud_channel_v1_ListProductsResponse_descriptor = + getDescriptor().getMessageTypes().get(35); + internal_static_google_cloud_channel_v1_ListProductsResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListProductsResponse_descriptor, + new java.lang.String[] { + "Products", "NextPageToken", + }); + internal_static_google_cloud_channel_v1_ListSkusRequest_descriptor = + getDescriptor().getMessageTypes().get(36); + internal_static_google_cloud_channel_v1_ListSkusRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListSkusRequest_descriptor, + new java.lang.String[] { + "Parent", "Account", "PageSize", "PageToken", "LanguageCode", + }); + internal_static_google_cloud_channel_v1_ListSkusResponse_descriptor = + getDescriptor().getMessageTypes().get(37); + internal_static_google_cloud_channel_v1_ListSkusResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListSkusResponse_descriptor, + new java.lang.String[] { + "Skus", "NextPageToken", + }); + internal_static_google_cloud_channel_v1_ListOffersRequest_descriptor = + getDescriptor().getMessageTypes().get(38); + internal_static_google_cloud_channel_v1_ListOffersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListOffersRequest_descriptor, + new java.lang.String[] { + "Parent", "PageSize", "PageToken", "Filter", "LanguageCode", + }); + internal_static_google_cloud_channel_v1_ListOffersResponse_descriptor = + getDescriptor().getMessageTypes().get(39); + internal_static_google_cloud_channel_v1_ListOffersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListOffersResponse_descriptor, + new java.lang.String[] { + "Offers", "NextPageToken", + }); + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_descriptor = + getDescriptor().getMessageTypes().get(40); + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_descriptor, + new java.lang.String[] { + "CreateEntitlementPurchase", + "ChangeOfferPurchase", + "Customer", + "PageSize", + "PageToken", + "LanguageCode", + "PurchaseOption", + }); + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_CreateEntitlementPurchase_descriptor = + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_CreateEntitlementPurchase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_CreateEntitlementPurchase_descriptor, + new java.lang.String[] { + "Product", + }); + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_ChangeOfferPurchase_descriptor = + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_ChangeOfferPurchase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListPurchasableSkusRequest_ChangeOfferPurchase_descriptor, + new java.lang.String[] { + "Entitlement", "ChangeType", + }); + internal_static_google_cloud_channel_v1_ListPurchasableSkusResponse_descriptor = + getDescriptor().getMessageTypes().get(41); + internal_static_google_cloud_channel_v1_ListPurchasableSkusResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListPurchasableSkusResponse_descriptor, + new java.lang.String[] { + "PurchasableSkus", "NextPageToken", + }); + internal_static_google_cloud_channel_v1_PurchasableSku_descriptor = + getDescriptor().getMessageTypes().get(42); + internal_static_google_cloud_channel_v1_PurchasableSku_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_PurchasableSku_descriptor, + new java.lang.String[] { + "Sku", + }); + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_descriptor = + getDescriptor().getMessageTypes().get(43); + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_descriptor, + new java.lang.String[] { + "CreateEntitlementPurchase", + "ChangeOfferPurchase", + "Customer", + "PageSize", + "PageToken", + "LanguageCode", + "PurchaseOption", + }); + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_CreateEntitlementPurchase_descriptor = + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_descriptor + .getNestedTypes() + .get(0); + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_CreateEntitlementPurchase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_CreateEntitlementPurchase_descriptor, + new java.lang.String[] { + "Sku", + }); + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_ChangeOfferPurchase_descriptor = + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_descriptor + .getNestedTypes() + .get(1); + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_ChangeOfferPurchase_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListPurchasableOffersRequest_ChangeOfferPurchase_descriptor, + new java.lang.String[] { + "Entitlement", "NewSku", + }); + internal_static_google_cloud_channel_v1_ListPurchasableOffersResponse_descriptor = + getDescriptor().getMessageTypes().get(44); + internal_static_google_cloud_channel_v1_ListPurchasableOffersResponse_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_ListPurchasableOffersResponse_descriptor, + new java.lang.String[] { + "PurchasableOffers", "NextPageToken", + }); + internal_static_google_cloud_channel_v1_PurchasableOffer_descriptor = + getDescriptor().getMessageTypes().get(45); + internal_static_google_cloud_channel_v1_PurchasableOffer_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_cloud_channel_v1_PurchasableOffer_descriptor, + new java.lang.String[] { + "Offer", + }); + com.google.protobuf.ExtensionRegistry registry = + com.google.protobuf.ExtensionRegistry.newInstance(); + registry.add(com.google.api.ClientProto.defaultHost); + registry.add(com.google.api.FieldBehaviorProto.fieldBehavior); + registry.add(com.google.api.AnnotationsProto.http); + registry.add(com.google.api.ClientProto.methodSignature); + registry.add(com.google.api.ClientProto.oauthScopes); + registry.add(com.google.api.ResourceProto.resourceReference); + registry.add(com.google.longrunning.OperationsProto.operationInfo); + com.google.protobuf.Descriptors.FileDescriptor.internalUpdateFileDescriptor( + descriptor, registry); + com.google.api.AnnotationsProto.getDescriptor(); + com.google.api.ClientProto.getDescriptor(); + com.google.api.FieldBehaviorProto.getDescriptor(); + com.google.api.ResourceProto.getDescriptor(); + com.google.cloud.channel.v1.ChannelPartnerLinksProto.getDescriptor(); + com.google.cloud.channel.v1.CommonProto.getDescriptor(); + com.google.cloud.channel.v1.CustomersProto.getDescriptor(); + com.google.cloud.channel.v1.EntitlementsProto.getDescriptor(); + com.google.cloud.channel.v1.OffersProto.getDescriptor(); + com.google.cloud.channel.v1.ProductsProto.getDescriptor(); + com.google.longrunning.OperationsProto.getDescriptor(); + com.google.protobuf.EmptyProto.getDescriptor(); + com.google.protobuf.FieldMaskProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Sku.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Sku.java new file mode 100644 index 00000000..e35872cc --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Sku.java @@ -0,0 +1,1195 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/products.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Represents a product's purchasable Stock Keeping Unit (SKU).
+ * SKUs represent the different variations of the product. For example, Google
+ * Workspace Business Standard and Google Workspace Business Plus are Google
+ * Workspace product SKUs.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Sku} + */ +public final class Sku extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Sku) + SkuOrBuilder { + private static final long serialVersionUID = 0L; + // Use Sku.newBuilder() to construct. + private Sku(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Sku() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Sku(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Sku( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.channel.v1.MarketingInfo.Builder subBuilder = null; + if (marketingInfo_ != null) { + subBuilder = marketingInfo_.toBuilder(); + } + marketingInfo_ = + input.readMessage( + com.google.cloud.channel.v1.MarketingInfo.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(marketingInfo_); + marketingInfo_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.cloud.channel.v1.Product.Builder subBuilder = null; + if (product_ != null) { + subBuilder = product_.toBuilder(); + } + product_ = + input.readMessage( + com.google.cloud.channel.v1.Product.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(product_); + product_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Sku_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Sku_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Sku.class, com.google.cloud.channel.v1.Sku.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Resource Name of the SKU.
+   * Format: products/{product_id}/skus/{sku_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 the SKU.
+   * Format: products/{product_id}/skus/{sku_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; + } + } + + public static final int MARKETING_INFO_FIELD_NUMBER = 2; + private com.google.cloud.channel.v1.MarketingInfo marketingInfo_; + /** + * + * + *
+   * Marketing information for the SKU.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return Whether the marketingInfo field is set. + */ + @java.lang.Override + public boolean hasMarketingInfo() { + return marketingInfo_ != null; + } + /** + * + * + *
+   * Marketing information for the SKU.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return The marketingInfo. + */ + @java.lang.Override + public com.google.cloud.channel.v1.MarketingInfo getMarketingInfo() { + return marketingInfo_ == null + ? com.google.cloud.channel.v1.MarketingInfo.getDefaultInstance() + : marketingInfo_; + } + /** + * + * + *
+   * Marketing information for the SKU.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + @java.lang.Override + public com.google.cloud.channel.v1.MarketingInfoOrBuilder getMarketingInfoOrBuilder() { + return getMarketingInfo(); + } + + public static final int PRODUCT_FIELD_NUMBER = 3; + private com.google.cloud.channel.v1.Product product_; + /** + * + * + *
+   * Product the SKU is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Product product = 3; + * + * @return Whether the product field is set. + */ + @java.lang.Override + public boolean hasProduct() { + return product_ != null; + } + /** + * + * + *
+   * Product the SKU is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Product product = 3; + * + * @return The product. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Product getProduct() { + return product_ == null ? com.google.cloud.channel.v1.Product.getDefaultInstance() : product_; + } + /** + * + * + *
+   * Product the SKU is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Product product = 3; + */ + @java.lang.Override + public com.google.cloud.channel.v1.ProductOrBuilder getProductOrBuilder() { + return getProduct(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (marketingInfo_ != null) { + output.writeMessage(2, getMarketingInfo()); + } + if (product_ != null) { + output.writeMessage(3, getProduct()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (marketingInfo_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getMarketingInfo()); + } + if (product_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getProduct()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Sku)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Sku other = (com.google.cloud.channel.v1.Sku) obj; + + if (!getName().equals(other.getName())) return false; + if (hasMarketingInfo() != other.hasMarketingInfo()) return false; + if (hasMarketingInfo()) { + if (!getMarketingInfo().equals(other.getMarketingInfo())) return false; + } + if (hasProduct() != other.hasProduct()) return false; + if (hasProduct()) { + if (!getProduct().equals(other.getProduct())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasMarketingInfo()) { + hash = (37 * hash) + MARKETING_INFO_FIELD_NUMBER; + hash = (53 * hash) + getMarketingInfo().hashCode(); + } + if (hasProduct()) { + hash = (37 * hash) + PRODUCT_FIELD_NUMBER; + hash = (53 * hash) + getProduct().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Sku parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Sku parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Sku parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Sku parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Sku parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Sku parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Sku parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Sku parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Sku parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Sku parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Sku parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Sku parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Sku prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 product's purchasable Stock Keeping Unit (SKU).
+   * SKUs represent the different variations of the product. For example, Google
+   * Workspace Business Standard and Google Workspace Business Plus are Google
+   * Workspace product SKUs.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Sku} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Sku) + com.google.cloud.channel.v1.SkuOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Sku_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Sku_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Sku.class, com.google.cloud.channel.v1.Sku.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Sku.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (marketingInfoBuilder_ == null) { + marketingInfo_ = null; + } else { + marketingInfo_ = null; + marketingInfoBuilder_ = null; + } + if (productBuilder_ == null) { + product_ = null; + } else { + product_ = null; + productBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ProductsProto + .internal_static_google_cloud_channel_v1_Sku_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Sku getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Sku.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Sku build() { + com.google.cloud.channel.v1.Sku result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Sku buildPartial() { + com.google.cloud.channel.v1.Sku result = new com.google.cloud.channel.v1.Sku(this); + result.name_ = name_; + if (marketingInfoBuilder_ == null) { + result.marketingInfo_ = marketingInfo_; + } else { + result.marketingInfo_ = marketingInfoBuilder_.build(); + } + if (productBuilder_ == null) { + result.product_ = product_; + } else { + result.product_ = productBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Sku) { + return mergeFrom((com.google.cloud.channel.v1.Sku) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Sku other) { + if (other == com.google.cloud.channel.v1.Sku.getDefaultInstance()) return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasMarketingInfo()) { + mergeMarketingInfo(other.getMarketingInfo()); + } + if (other.hasProduct()) { + mergeProduct(other.getProduct()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Sku parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Sku) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Resource Name of the SKU.
+     * Format: products/{product_id}/skus/{sku_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 the SKU.
+     * Format: products/{product_id}/skus/{sku_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 the SKU.
+     * Format: products/{product_id}/skus/{sku_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 the SKU.
+     * Format: products/{product_id}/skus/{sku_id}
+     * 
+ * + * string name = 1; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Resource Name of the SKU.
+     * Format: products/{product_id}/skus/{sku_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; + } + + private com.google.cloud.channel.v1.MarketingInfo marketingInfo_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.MarketingInfo, + com.google.cloud.channel.v1.MarketingInfo.Builder, + com.google.cloud.channel.v1.MarketingInfoOrBuilder> + marketingInfoBuilder_; + /** + * + * + *
+     * Marketing information for the SKU.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return Whether the marketingInfo field is set. + */ + public boolean hasMarketingInfo() { + return marketingInfoBuilder_ != null || marketingInfo_ != null; + } + /** + * + * + *
+     * Marketing information for the SKU.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return The marketingInfo. + */ + public com.google.cloud.channel.v1.MarketingInfo getMarketingInfo() { + if (marketingInfoBuilder_ == null) { + return marketingInfo_ == null + ? com.google.cloud.channel.v1.MarketingInfo.getDefaultInstance() + : marketingInfo_; + } else { + return marketingInfoBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Marketing information for the SKU.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder setMarketingInfo(com.google.cloud.channel.v1.MarketingInfo value) { + if (marketingInfoBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + marketingInfo_ = value; + onChanged(); + } else { + marketingInfoBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Marketing information for the SKU.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder setMarketingInfo( + com.google.cloud.channel.v1.MarketingInfo.Builder builderForValue) { + if (marketingInfoBuilder_ == null) { + marketingInfo_ = builderForValue.build(); + onChanged(); + } else { + marketingInfoBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Marketing information for the SKU.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder mergeMarketingInfo(com.google.cloud.channel.v1.MarketingInfo value) { + if (marketingInfoBuilder_ == null) { + if (marketingInfo_ != null) { + marketingInfo_ = + com.google.cloud.channel.v1.MarketingInfo.newBuilder(marketingInfo_) + .mergeFrom(value) + .buildPartial(); + } else { + marketingInfo_ = value; + } + onChanged(); + } else { + marketingInfoBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Marketing information for the SKU.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public Builder clearMarketingInfo() { + if (marketingInfoBuilder_ == null) { + marketingInfo_ = null; + onChanged(); + } else { + marketingInfo_ = null; + marketingInfoBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Marketing information for the SKU.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public com.google.cloud.channel.v1.MarketingInfo.Builder getMarketingInfoBuilder() { + + onChanged(); + return getMarketingInfoFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Marketing information for the SKU.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + public com.google.cloud.channel.v1.MarketingInfoOrBuilder getMarketingInfoOrBuilder() { + if (marketingInfoBuilder_ != null) { + return marketingInfoBuilder_.getMessageOrBuilder(); + } else { + return marketingInfo_ == null + ? com.google.cloud.channel.v1.MarketingInfo.getDefaultInstance() + : marketingInfo_; + } + } + /** + * + * + *
+     * Marketing information for the SKU.
+     * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.MarketingInfo, + com.google.cloud.channel.v1.MarketingInfo.Builder, + com.google.cloud.channel.v1.MarketingInfoOrBuilder> + getMarketingInfoFieldBuilder() { + if (marketingInfoBuilder_ == null) { + marketingInfoBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.MarketingInfo, + com.google.cloud.channel.v1.MarketingInfo.Builder, + com.google.cloud.channel.v1.MarketingInfoOrBuilder>( + getMarketingInfo(), getParentForChildren(), isClean()); + marketingInfo_ = null; + } + return marketingInfoBuilder_; + } + + private com.google.cloud.channel.v1.Product product_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Product, + com.google.cloud.channel.v1.Product.Builder, + com.google.cloud.channel.v1.ProductOrBuilder> + productBuilder_; + /** + * + * + *
+     * Product the SKU is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Product product = 3; + * + * @return Whether the product field is set. + */ + public boolean hasProduct() { + return productBuilder_ != null || product_ != null; + } + /** + * + * + *
+     * Product the SKU is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Product product = 3; + * + * @return The product. + */ + public com.google.cloud.channel.v1.Product getProduct() { + if (productBuilder_ == null) { + return product_ == null + ? com.google.cloud.channel.v1.Product.getDefaultInstance() + : product_; + } else { + return productBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Product the SKU is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Product product = 3; + */ + public Builder setProduct(com.google.cloud.channel.v1.Product value) { + if (productBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + product_ = value; + onChanged(); + } else { + productBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Product the SKU is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Product product = 3; + */ + public Builder setProduct(com.google.cloud.channel.v1.Product.Builder builderForValue) { + if (productBuilder_ == null) { + product_ = builderForValue.build(); + onChanged(); + } else { + productBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Product the SKU is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Product product = 3; + */ + public Builder mergeProduct(com.google.cloud.channel.v1.Product value) { + if (productBuilder_ == null) { + if (product_ != null) { + product_ = + com.google.cloud.channel.v1.Product.newBuilder(product_) + .mergeFrom(value) + .buildPartial(); + } else { + product_ = value; + } + onChanged(); + } else { + productBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Product the SKU is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Product product = 3; + */ + public Builder clearProduct() { + if (productBuilder_ == null) { + product_ = null; + onChanged(); + } else { + product_ = null; + productBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Product the SKU is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Product product = 3; + */ + public com.google.cloud.channel.v1.Product.Builder getProductBuilder() { + + onChanged(); + return getProductFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Product the SKU is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Product product = 3; + */ + public com.google.cloud.channel.v1.ProductOrBuilder getProductOrBuilder() { + if (productBuilder_ != null) { + return productBuilder_.getMessageOrBuilder(); + } else { + return product_ == null + ? com.google.cloud.channel.v1.Product.getDefaultInstance() + : product_; + } + } + /** + * + * + *
+     * Product the SKU is associated with.
+     * 
+ * + * .google.cloud.channel.v1.Product product = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Product, + com.google.cloud.channel.v1.Product.Builder, + com.google.cloud.channel.v1.ProductOrBuilder> + getProductFieldBuilder() { + if (productBuilder_ == null) { + productBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Product, + com.google.cloud.channel.v1.Product.Builder, + com.google.cloud.channel.v1.ProductOrBuilder>( + getProduct(), getParentForChildren(), isClean()); + product_ = null; + } + return productBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Sku) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Sku) + private static final com.google.cloud.channel.v1.Sku DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Sku(); + } + + public static com.google.cloud.channel.v1.Sku getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Sku parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Sku(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Sku getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuName.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuName.java new file mode 100644 index 00000000..51476822 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuName.java @@ -0,0 +1,191 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +package com.google.cloud.channel.v1; + +import com.google.api.pathtemplate.PathTemplate; +import com.google.api.resourcenames.ResourceName; +import com.google.common.base.Preconditions; +import com.google.common.collect.ImmutableMap; +import java.util.ArrayList; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import javax.annotation.Generated; + +// AUTO-GENERATED DOCUMENTATION AND CLASS. +@Generated("by gapic-generator-java") +public class SkuName implements ResourceName { + private static final PathTemplate PRODUCT_SKU = + PathTemplate.createWithoutUrlEncoding("products/{product}/skus/{sku}"); + private volatile Map fieldValuesMap; + private final String product; + private final String sku; + + @Deprecated + protected SkuName() { + product = null; + sku = null; + } + + private SkuName(Builder builder) { + product = Preconditions.checkNotNull(builder.getProduct()); + sku = Preconditions.checkNotNull(builder.getSku()); + } + + public String getProduct() { + return product; + } + + public String getSku() { + return sku; + } + + public static Builder newBuilder() { + return new Builder(); + } + + public Builder toBuilder() { + return new Builder(this); + } + + public static SkuName of(String product, String sku) { + return newBuilder().setProduct(product).setSku(sku).build(); + } + + public static String format(String product, String sku) { + return newBuilder().setProduct(product).setSku(sku).build().toString(); + } + + public static SkuName parse(String formattedString) { + if (formattedString.isEmpty()) { + return null; + } + Map matchMap = + PRODUCT_SKU.validatedMatch( + formattedString, "SkuName.parse: formattedString not in valid format"); + return of(matchMap.get("product"), matchMap.get("sku")); + } + + public static List parseList(List formattedStrings) { + List list = new ArrayList<>(formattedStrings.size()); + for (String formattedString : formattedStrings) { + list.add(parse(formattedString)); + } + return list; + } + + public static List toStringList(List values) { + List list = new ArrayList<>(values.size()); + for (SkuName value : values) { + if (value == null) { + list.add(""); + } else { + list.add(value.toString()); + } + } + return list; + } + + public static boolean isParsableFrom(String formattedString) { + return PRODUCT_SKU.matches(formattedString); + } + + @Override + public Map getFieldValuesMap() { + if (fieldValuesMap == null) { + synchronized (this) { + if (fieldValuesMap == null) { + ImmutableMap.Builder fieldMapBuilder = ImmutableMap.builder(); + if (product != null) { + fieldMapBuilder.put("product", product); + } + if (sku != null) { + fieldMapBuilder.put("sku", sku); + } + fieldValuesMap = fieldMapBuilder.build(); + } + } + } + return fieldValuesMap; + } + + public String getFieldValue(String fieldName) { + return getFieldValuesMap().get(fieldName); + } + + @Override + public String toString() { + return PRODUCT_SKU.instantiate("product", product, "sku", sku); + } + + @Override + public boolean equals(Object o) { + if (o == this) { + return true; + } + if (o != null || getClass() == o.getClass()) { + SkuName that = ((SkuName) o); + return Objects.equals(this.product, that.product) && Objects.equals(this.sku, that.sku); + } + return false; + } + + @Override + public int hashCode() { + int h = 1; + h *= 1000003; + h ^= Objects.hashCode(product); + h *= 1000003; + h ^= Objects.hashCode(sku); + return h; + } + + /** Builder for products/{product}/skus/{sku}. */ + public static class Builder { + private String product; + private String sku; + + protected Builder() {} + + public String getProduct() { + return product; + } + + public String getSku() { + return sku; + } + + public Builder setProduct(String product) { + this.product = product; + return this; + } + + public Builder setSku(String sku) { + this.sku = sku; + return this; + } + + private Builder(SkuName skuName) { + product = skuName.product; + sku = skuName.sku; + } + + public SkuName build() { + return new SkuName(this); + } + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuOrBuilder.java new file mode 100644 index 00000000..51aecf74 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SkuOrBuilder.java @@ -0,0 +1,122 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/products.proto + +package com.google.cloud.channel.v1; + +public interface SkuOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Sku) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Resource Name of the SKU.
+   * Format: products/{product_id}/skus/{sku_id}
+   * 
+ * + * string name = 1; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Resource Name of the SKU.
+   * Format: products/{product_id}/skus/{sku_id}
+   * 
+ * + * string name = 1; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Marketing information for the SKU.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return Whether the marketingInfo field is set. + */ + boolean hasMarketingInfo(); + /** + * + * + *
+   * Marketing information for the SKU.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + * + * @return The marketingInfo. + */ + com.google.cloud.channel.v1.MarketingInfo getMarketingInfo(); + /** + * + * + *
+   * Marketing information for the SKU.
+   * 
+ * + * .google.cloud.channel.v1.MarketingInfo marketing_info = 2; + */ + com.google.cloud.channel.v1.MarketingInfoOrBuilder getMarketingInfoOrBuilder(); + + /** + * + * + *
+   * Product the SKU is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Product product = 3; + * + * @return Whether the product field is set. + */ + boolean hasProduct(); + /** + * + * + *
+   * Product the SKU is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Product product = 3; + * + * @return The product. + */ + com.google.cloud.channel.v1.Product getProduct(); + /** + * + * + *
+   * Product the SKU is associated with.
+   * 
+ * + * .google.cloud.channel.v1.Product product = 3; + */ + com.google.cloud.channel.v1.ProductOrBuilder getProductOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/StartPaidServiceRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/StartPaidServiceRequest.java new file mode 100644 index 00000000..6433bb49 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/StartPaidServiceRequest.java @@ -0,0 +1,892 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.StartPaidService][google.cloud.channel.v1.CloudChannelService.StartPaidService].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.StartPaidServiceRequest} + */ +public final class StartPaidServiceRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.StartPaidServiceRequest) + StartPaidServiceRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use StartPaidServiceRequest.newBuilder() to construct. + private StartPaidServiceRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private StartPaidServiceRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new StartPaidServiceRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private StartPaidServiceRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_StartPaidServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_StartPaidServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.StartPaidServiceRequest.class, + com.google.cloud.channel.v1.StartPaidServiceRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The name of the entitlement for which paid service is being started.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The name of the entitlement for which paid service is being started.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.StartPaidServiceRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.StartPaidServiceRequest other = + (com.google.cloud.channel.v1.StartPaidServiceRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.StartPaidServiceRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.StartPaidService][google.cloud.channel.v1.CloudChannelService.StartPaidService].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.StartPaidServiceRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.StartPaidServiceRequest) + com.google.cloud.channel.v1.StartPaidServiceRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_StartPaidServiceRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_StartPaidServiceRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.StartPaidServiceRequest.class, + com.google.cloud.channel.v1.StartPaidServiceRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.StartPaidServiceRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_StartPaidServiceRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.StartPaidServiceRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.StartPaidServiceRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.StartPaidServiceRequest build() { + com.google.cloud.channel.v1.StartPaidServiceRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.StartPaidServiceRequest buildPartial() { + com.google.cloud.channel.v1.StartPaidServiceRequest result = + new com.google.cloud.channel.v1.StartPaidServiceRequest(this); + result.name_ = name_; + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.StartPaidServiceRequest) { + return mergeFrom((com.google.cloud.channel.v1.StartPaidServiceRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.StartPaidServiceRequest other) { + if (other == com.google.cloud.channel.v1.StartPaidServiceRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.StartPaidServiceRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.StartPaidServiceRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The name of the entitlement for which paid service is being started.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The name of the entitlement for which paid service is being started.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The name of the entitlement for which paid service is being started.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entitlement for which paid service is being started.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The name of the entitlement for which paid service is being started.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.StartPaidServiceRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.StartPaidServiceRequest) + private static final com.google.cloud.channel.v1.StartPaidServiceRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.StartPaidServiceRequest(); + } + + public static com.google.cloud.channel.v1.StartPaidServiceRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public StartPaidServiceRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new StartPaidServiceRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.StartPaidServiceRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/StartPaidServiceRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/StartPaidServiceRequestOrBuilder.java new file mode 100644 index 00000000..3c489410 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/StartPaidServiceRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface StartPaidServiceRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.StartPaidServiceRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The name of the entitlement for which paid service is being started.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The name of the entitlement for which paid service is being started.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SuspendEntitlementRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SuspendEntitlementRequest.java new file mode 100644 index 00000000..a62b3dd9 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SuspendEntitlementRequest.java @@ -0,0 +1,893 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.SuspendEntitlement][google.cloud.channel.v1.CloudChannelService.SuspendEntitlement].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.SuspendEntitlementRequest} + */ +public final class SuspendEntitlementRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.SuspendEntitlementRequest) + SuspendEntitlementRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use SuspendEntitlementRequest.newBuilder() to construct. + private SuspendEntitlementRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SuspendEntitlementRequest() { + name_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SuspendEntitlementRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SuspendEntitlementRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_SuspendEntitlementRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_SuspendEntitlementRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.SuspendEntitlementRequest.class, + com.google.cloud.channel.v1.SuspendEntitlementRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the entitlement to suspend.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the entitlement to suspend.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.SuspendEntitlementRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.SuspendEntitlementRequest other = + (com.google.cloud.channel.v1.SuspendEntitlementRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.SuspendEntitlementRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.SuspendEntitlement][google.cloud.channel.v1.CloudChannelService.SuspendEntitlement].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.SuspendEntitlementRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.SuspendEntitlementRequest) + com.google.cloud.channel.v1.SuspendEntitlementRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_SuspendEntitlementRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_SuspendEntitlementRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.SuspendEntitlementRequest.class, + com.google.cloud.channel.v1.SuspendEntitlementRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.SuspendEntitlementRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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_ = ""; + + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_SuspendEntitlementRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.SuspendEntitlementRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.SuspendEntitlementRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.SuspendEntitlementRequest build() { + com.google.cloud.channel.v1.SuspendEntitlementRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.SuspendEntitlementRequest buildPartial() { + com.google.cloud.channel.v1.SuspendEntitlementRequest result = + new com.google.cloud.channel.v1.SuspendEntitlementRequest(this); + result.name_ = name_; + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.SuspendEntitlementRequest) { + return mergeFrom((com.google.cloud.channel.v1.SuspendEntitlementRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.SuspendEntitlementRequest other) { + if (other == com.google.cloud.channel.v1.SuspendEntitlementRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.SuspendEntitlementRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.SuspendEntitlementRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the entitlement to suspend.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the entitlement to suspend.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the entitlement to suspend.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the entitlement to suspend.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the entitlement to suspend.
+     * The name takes the format:
+     * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.SuspendEntitlementRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.SuspendEntitlementRequest) + private static final com.google.cloud.channel.v1.SuspendEntitlementRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.SuspendEntitlementRequest(); + } + + public static com.google.cloud.channel.v1.SuspendEntitlementRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SuspendEntitlementRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SuspendEntitlementRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.SuspendEntitlementRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SuspendEntitlementRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SuspendEntitlementRequestOrBuilder.java new file mode 100644 index 00000000..b82333f2 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/SuspendEntitlementRequestOrBuilder.java @@ -0,0 +1,97 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface SuspendEntitlementRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.SuspendEntitlementRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the entitlement to suspend.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the entitlement to suspend.
+   * The name takes the format:
+   * accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEligibility.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEligibility.java new file mode 100644 index 00000000..89e1336d --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEligibility.java @@ -0,0 +1,1061 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Specifies transfer eligibility of a SKU.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferEligibility} + */ +public final class TransferEligibility extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.TransferEligibility) + TransferEligibilityOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransferEligibility.newBuilder() to construct. + private TransferEligibility(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransferEligibility() { + description_ = ""; + ineligibilityReason_ = 0; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransferEligibility(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransferEligibility( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + isEligible_ = input.readBool(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + + description_ = s; + break; + } + case 24: + { + int rawValue = input.readEnum(); + + ineligibilityReason_ = rawValue; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TransferEligibility_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TransferEligibility_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferEligibility.class, + com.google.cloud.channel.v1.TransferEligibility.Builder.class); + } + + /** + * + * + *
+   * Reason of ineligibility.
+   * 
+ * + * Protobuf enum {@code google.cloud.channel.v1.TransferEligibility.Reason} + */ + public enum Reason implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+     * Reason is not available.
+     * 
+ * + * REASON_UNSPECIFIED = 0; + */ + REASON_UNSPECIFIED(0), + /** + * + * + *
+     * Reseller needs to accept TOS before transferring the SKU.
+     * 
+ * + * PENDING_TOS_ACCEPTANCE = 1; + */ + PENDING_TOS_ACCEPTANCE(1), + /** + * + * + *
+     * Reseller not eligible to sell the SKU.
+     * 
+ * + * SKU_NOT_ELIGIBLE = 2; + */ + SKU_NOT_ELIGIBLE(2), + /** + * + * + *
+     * SKU subscription is suspended
+     * 
+ * + * SKU_SUSPENDED = 3; + */ + SKU_SUSPENDED(3), + UNRECOGNIZED(-1), + ; + + /** + * + * + *
+     * Reason is not available.
+     * 
+ * + * REASON_UNSPECIFIED = 0; + */ + public static final int REASON_UNSPECIFIED_VALUE = 0; + /** + * + * + *
+     * Reseller needs to accept TOS before transferring the SKU.
+     * 
+ * + * PENDING_TOS_ACCEPTANCE = 1; + */ + public static final int PENDING_TOS_ACCEPTANCE_VALUE = 1; + /** + * + * + *
+     * Reseller not eligible to sell the SKU.
+     * 
+ * + * SKU_NOT_ELIGIBLE = 2; + */ + public static final int SKU_NOT_ELIGIBLE_VALUE = 2; + /** + * + * + *
+     * SKU subscription is suspended
+     * 
+ * + * SKU_SUSPENDED = 3; + */ + public static final int SKU_SUSPENDED_VALUE = 3; + + public final int getNumber() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalArgumentException( + "Can't get the number of an unknown enum value."); + } + return value; + } + + /** + * @param value The numeric wire value of the corresponding enum entry. + * @return The enum associated with the given numeric wire value. + * @deprecated Use {@link #forNumber(int)} instead. + */ + @java.lang.Deprecated + public static Reason 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 Reason forNumber(int value) { + switch (value) { + case 0: + return REASON_UNSPECIFIED; + case 1: + return PENDING_TOS_ACCEPTANCE; + case 2: + return SKU_NOT_ELIGIBLE; + case 3: + return SKU_SUSPENDED; + 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 Reason findValueByNumber(int number) { + return Reason.forNumber(number); + } + }; + + public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() { + if (this == UNRECOGNIZED) { + throw new java.lang.IllegalStateException( + "Can't get the descriptor of an unrecognized enum value."); + } + return getDescriptor().getValues().get(ordinal()); + } + + public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() { + return getDescriptor(); + } + + public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() { + return com.google.cloud.channel.v1.TransferEligibility.getDescriptor().getEnumTypes().get(0); + } + + private static final Reason[] VALUES = values(); + + public static Reason 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 Reason(int value) { + this.value = value; + } + + // @@protoc_insertion_point(enum_scope:google.cloud.channel.v1.TransferEligibility.Reason) + } + + public static final int IS_ELIGIBLE_FIELD_NUMBER = 1; + private boolean isEligible_; + /** + * + * + *
+   * Whether reseller is eligible to transfer the SKU.
+   * 
+ * + * bool is_eligible = 1; + * + * @return The isEligible. + */ + @java.lang.Override + public boolean getIsEligible() { + return isEligible_; + } + + public static final int DESCRIPTION_FIELD_NUMBER = 2; + private volatile java.lang.Object description_; + /** + * + * + *
+   * Localized description if reseller is not eligible to transfer the SKU.
+   * 
+ * + * 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; + } + } + /** + * + * + *
+   * Localized description if reseller is not eligible to transfer the SKU.
+   * 
+ * + * 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 INELIGIBILITY_REASON_FIELD_NUMBER = 3; + private int ineligibilityReason_; + /** + * + * + *
+   * Specified the reason for ineligibility.
+   * 
+ * + * .google.cloud.channel.v1.TransferEligibility.Reason ineligibility_reason = 3; + * + * @return The enum numeric value on the wire for ineligibilityReason. + */ + @java.lang.Override + public int getIneligibilityReasonValue() { + return ineligibilityReason_; + } + /** + * + * + *
+   * Specified the reason for ineligibility.
+   * 
+ * + * .google.cloud.channel.v1.TransferEligibility.Reason ineligibility_reason = 3; + * + * @return The ineligibilityReason. + */ + @java.lang.Override + public com.google.cloud.channel.v1.TransferEligibility.Reason getIneligibilityReason() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.TransferEligibility.Reason result = + com.google.cloud.channel.v1.TransferEligibility.Reason.valueOf(ineligibilityReason_); + return result == null + ? com.google.cloud.channel.v1.TransferEligibility.Reason.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 (isEligible_ != false) { + output.writeBool(1, isEligible_); + } + if (!getDescriptionBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, description_); + } + if (ineligibilityReason_ + != com.google.cloud.channel.v1.TransferEligibility.Reason.REASON_UNSPECIFIED.getNumber()) { + output.writeEnum(3, ineligibilityReason_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (isEligible_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, isEligible_); + } + if (!getDescriptionBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, description_); + } + if (ineligibilityReason_ + != com.google.cloud.channel.v1.TransferEligibility.Reason.REASON_UNSPECIFIED.getNumber()) { + size += com.google.protobuf.CodedOutputStream.computeEnumSize(3, ineligibilityReason_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.TransferEligibility)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.TransferEligibility other = + (com.google.cloud.channel.v1.TransferEligibility) obj; + + if (getIsEligible() != other.getIsEligible()) return false; + if (!getDescription().equals(other.getDescription())) return false; + if (ineligibilityReason_ != other.ineligibilityReason_) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + IS_ELIGIBLE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsEligible()); + hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER; + hash = (53 * hash) + getDescription().hashCode(); + hash = (37 * hash) + INELIGIBILITY_REASON_FIELD_NUMBER; + hash = (53 * hash) + ineligibilityReason_; + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.TransferEligibility parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEligibility parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEligibility parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEligibility parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEligibility parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEligibility parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEligibility parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEligibility parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEligibility parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEligibility parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEligibility parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEligibility parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.TransferEligibility prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Specifies transfer eligibility of a SKU.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferEligibility} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.TransferEligibility) + com.google.cloud.channel.v1.TransferEligibilityOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TransferEligibility_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TransferEligibility_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferEligibility.class, + com.google.cloud.channel.v1.TransferEligibility.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.TransferEligibility.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + isEligible_ = false; + + description_ = ""; + + ineligibilityReason_ = 0; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TransferEligibility_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEligibility getDefaultInstanceForType() { + return com.google.cloud.channel.v1.TransferEligibility.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEligibility build() { + com.google.cloud.channel.v1.TransferEligibility result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEligibility buildPartial() { + com.google.cloud.channel.v1.TransferEligibility result = + new com.google.cloud.channel.v1.TransferEligibility(this); + result.isEligible_ = isEligible_; + result.description_ = description_; + result.ineligibilityReason_ = ineligibilityReason_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.TransferEligibility) { + return mergeFrom((com.google.cloud.channel.v1.TransferEligibility) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.TransferEligibility other) { + if (other == com.google.cloud.channel.v1.TransferEligibility.getDefaultInstance()) + return this; + if (other.getIsEligible() != false) { + setIsEligible(other.getIsEligible()); + } + if (!other.getDescription().isEmpty()) { + description_ = other.description_; + onChanged(); + } + if (other.ineligibilityReason_ != 0) { + setIneligibilityReasonValue(other.getIneligibilityReasonValue()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.TransferEligibility parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.TransferEligibility) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean isEligible_; + /** + * + * + *
+     * Whether reseller is eligible to transfer the SKU.
+     * 
+ * + * bool is_eligible = 1; + * + * @return The isEligible. + */ + @java.lang.Override + public boolean getIsEligible() { + return isEligible_; + } + /** + * + * + *
+     * Whether reseller is eligible to transfer the SKU.
+     * 
+ * + * bool is_eligible = 1; + * + * @param value The isEligible to set. + * @return This builder for chaining. + */ + public Builder setIsEligible(boolean value) { + + isEligible_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Whether reseller is eligible to transfer the SKU.
+     * 
+ * + * bool is_eligible = 1; + * + * @return This builder for chaining. + */ + public Builder clearIsEligible() { + + isEligible_ = false; + onChanged(); + return this; + } + + private java.lang.Object description_ = ""; + /** + * + * + *
+     * Localized description if reseller is not eligible to transfer the SKU.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Localized description if reseller is not eligible to transfer the SKU.
+     * 
+ * + * 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; + } + } + /** + * + * + *
+     * Localized description if reseller is not eligible to transfer the SKU.
+     * 
+ * + * 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; + } + /** + * + * + *
+     * Localized description if reseller is not eligible to transfer the SKU.
+     * 
+ * + * string description = 2; + * + * @return This builder for chaining. + */ + public Builder clearDescription() { + + description_ = getDefaultInstance().getDescription(); + onChanged(); + return this; + } + /** + * + * + *
+     * Localized description if reseller is not eligible to transfer the SKU.
+     * 
+ * + * 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 ineligibilityReason_ = 0; + /** + * + * + *
+     * Specified the reason for ineligibility.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility.Reason ineligibility_reason = 3; + * + * @return The enum numeric value on the wire for ineligibilityReason. + */ + @java.lang.Override + public int getIneligibilityReasonValue() { + return ineligibilityReason_; + } + /** + * + * + *
+     * Specified the reason for ineligibility.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility.Reason ineligibility_reason = 3; + * + * @param value The enum numeric value on the wire for ineligibilityReason to set. + * @return This builder for chaining. + */ + public Builder setIneligibilityReasonValue(int value) { + + ineligibilityReason_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Specified the reason for ineligibility.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility.Reason ineligibility_reason = 3; + * + * @return The ineligibilityReason. + */ + @java.lang.Override + public com.google.cloud.channel.v1.TransferEligibility.Reason getIneligibilityReason() { + @SuppressWarnings("deprecation") + com.google.cloud.channel.v1.TransferEligibility.Reason result = + com.google.cloud.channel.v1.TransferEligibility.Reason.valueOf(ineligibilityReason_); + return result == null + ? com.google.cloud.channel.v1.TransferEligibility.Reason.UNRECOGNIZED + : result; + } + /** + * + * + *
+     * Specified the reason for ineligibility.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility.Reason ineligibility_reason = 3; + * + * @param value The ineligibilityReason to set. + * @return This builder for chaining. + */ + public Builder setIneligibilityReason( + com.google.cloud.channel.v1.TransferEligibility.Reason value) { + if (value == null) { + throw new NullPointerException(); + } + + ineligibilityReason_ = value.getNumber(); + onChanged(); + return this; + } + /** + * + * + *
+     * Specified the reason for ineligibility.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility.Reason ineligibility_reason = 3; + * + * @return This builder for chaining. + */ + public Builder clearIneligibilityReason() { + + ineligibilityReason_ = 0; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.TransferEligibility) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.TransferEligibility) + private static final com.google.cloud.channel.v1.TransferEligibility DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.TransferEligibility(); + } + + public static com.google.cloud.channel.v1.TransferEligibility getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransferEligibility parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransferEligibility(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEligibility getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEligibilityOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEligibilityOrBuilder.java new file mode 100644 index 00000000..f1967b64 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEligibilityOrBuilder.java @@ -0,0 +1,88 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +public interface TransferEligibilityOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.TransferEligibility) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether reseller is eligible to transfer the SKU.
+   * 
+ * + * bool is_eligible = 1; + * + * @return The isEligible. + */ + boolean getIsEligible(); + + /** + * + * + *
+   * Localized description if reseller is not eligible to transfer the SKU.
+   * 
+ * + * string description = 2; + * + * @return The description. + */ + java.lang.String getDescription(); + /** + * + * + *
+   * Localized description if reseller is not eligible to transfer the SKU.
+   * 
+ * + * string description = 2; + * + * @return The bytes for description. + */ + com.google.protobuf.ByteString getDescriptionBytes(); + + /** + * + * + *
+   * Specified the reason for ineligibility.
+   * 
+ * + * .google.cloud.channel.v1.TransferEligibility.Reason ineligibility_reason = 3; + * + * @return The enum numeric value on the wire for ineligibilityReason. + */ + int getIneligibilityReasonValue(); + /** + * + * + *
+   * Specified the reason for ineligibility.
+   * 
+ * + * .google.cloud.channel.v1.TransferEligibility.Reason ineligibility_reason = 3; + * + * @return The ineligibilityReason. + */ + com.google.cloud.channel.v1.TransferEligibility.Reason getIneligibilityReason(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsRequest.java new file mode 100644 index 00000000..fdee6ac0 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsRequest.java @@ -0,0 +1,1640 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferEntitlementsRequest} + */ +public final class TransferEntitlementsRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.TransferEntitlementsRequest) + TransferEntitlementsRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransferEntitlementsRequest.newBuilder() to construct. + private TransferEntitlementsRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransferEntitlementsRequest() { + parent_ = ""; + entitlements_ = java.util.Collections.emptyList(); + authToken_ = ""; + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransferEntitlementsRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransferEntitlementsRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + entitlements_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + entitlements_.add( + input.readMessage( + com.google.cloud.channel.v1.Entitlement.parser(), extensionRegistry)); + break; + } + case 34: + { + java.lang.String s = input.readStringRequireUtf8(); + + authToken_ = s; + break; + } + case 50: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + entitlements_ = java.util.Collections.unmodifiableList(entitlements_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferEntitlementsRequest.class, + com.google.cloud.channel.v1.TransferEntitlementsRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of reseller's customer account where the entitlements
+   * transfer to.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of reseller's customer account where the entitlements
+   * transfer to.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITLEMENTS_FIELD_NUMBER = 2; + private java.util.List entitlements_; + /** + * + * + *
+   * Required. The new entitlements to be created or transferred.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getEntitlementsList() { + return entitlements_; + } + /** + * + * + *
+   * Required. The new entitlements to be created or transferred.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getEntitlementsOrBuilderList() { + return entitlements_; + } + /** + * + * + *
+   * Required. The new entitlements to be created or transferred.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getEntitlementsCount() { + return entitlements_.size(); + } + /** + * + * + *
+   * Required. The new entitlements to be created or transferred.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement getEntitlements(int index) { + return entitlements_.get(index); + } + /** + * + * + *
+   * Required. The new entitlements to be created or transferred.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index) { + return entitlements_.get(index); + } + + public static final int AUTH_TOKEN_FIELD_NUMBER = 4; + private volatile java.lang.Object authToken_; + /** + * + * + *
+   * This token is generated by the Super Admin of the resold customer to
+   * authorize a reseller to access their Cloud Identity and purchase
+   * entitlements on their behalf. This token can be omitted once the
+   * authorization is generated. See https://support.google.com/a/answer/7643790
+   * for more details.
+   * 
+ * + * string auth_token = 4; + * + * @return The authToken. + */ + @java.lang.Override + public java.lang.String getAuthToken() { + java.lang.Object ref = authToken_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authToken_ = s; + return s; + } + } + /** + * + * + *
+   * This token is generated by the Super Admin of the resold customer to
+   * authorize a reseller to access their Cloud Identity and purchase
+   * entitlements on their behalf. This token can be omitted once the
+   * authorization is generated. See https://support.google.com/a/answer/7643790
+   * for more details.
+   * 
+ * + * string auth_token = 4; + * + * @return The bytes for authToken. + */ + @java.lang.Override + public com.google.protobuf.ByteString getAuthTokenBytes() { + java.lang.Object ref = authToken_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int REQUEST_ID_FIELD_NUMBER = 6; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < entitlements_.size(); i++) { + output.writeMessage(2, entitlements_.get(i)); + } + if (!getAuthTokenBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 4, authToken_); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 6, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (int i = 0; i < entitlements_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, entitlements_.get(i)); + } + if (!getAuthTokenBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, authToken_); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.TransferEntitlementsRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.TransferEntitlementsRequest other = + (com.google.cloud.channel.v1.TransferEntitlementsRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getEntitlementsList().equals(other.getEntitlementsList())) return false; + if (!getAuthToken().equals(other.getAuthToken())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getEntitlementsCount() > 0) { + hash = (37 * hash) + ENTITLEMENTS_FIELD_NUMBER; + hash = (53 * hash) + getEntitlementsList().hashCode(); + } + hash = (37 * hash) + AUTH_TOKEN_FIELD_NUMBER; + hash = (53 * hash) + getAuthToken().hashCode(); + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.TransferEntitlementsRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferEntitlementsRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.TransferEntitlementsRequest) + com.google.cloud.channel.v1.TransferEntitlementsRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferEntitlementsRequest.class, + com.google.cloud.channel.v1.TransferEntitlementsRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.TransferEntitlementsRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEntitlementsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (entitlementsBuilder_ == null) { + entitlements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + entitlementsBuilder_.clear(); + } + authToken_ = ""; + + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.TransferEntitlementsRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsRequest build() { + com.google.cloud.channel.v1.TransferEntitlementsRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsRequest buildPartial() { + com.google.cloud.channel.v1.TransferEntitlementsRequest result = + new com.google.cloud.channel.v1.TransferEntitlementsRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (entitlementsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entitlements_ = java.util.Collections.unmodifiableList(entitlements_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entitlements_ = entitlements_; + } else { + result.entitlements_ = entitlementsBuilder_.build(); + } + result.authToken_ = authToken_; + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.TransferEntitlementsRequest) { + return mergeFrom((com.google.cloud.channel.v1.TransferEntitlementsRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.TransferEntitlementsRequest other) { + if (other == com.google.cloud.channel.v1.TransferEntitlementsRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (entitlementsBuilder_ == null) { + if (!other.entitlements_.isEmpty()) { + if (entitlements_.isEmpty()) { + entitlements_ = other.entitlements_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntitlementsIsMutable(); + entitlements_.addAll(other.entitlements_); + } + onChanged(); + } + } else { + if (!other.entitlements_.isEmpty()) { + if (entitlementsBuilder_.isEmpty()) { + entitlementsBuilder_.dispose(); + entitlementsBuilder_ = null; + entitlements_ = other.entitlements_; + bitField0_ = (bitField0_ & ~0x00000001); + entitlementsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntitlementsFieldBuilder() + : null; + } else { + entitlementsBuilder_.addAllMessages(other.entitlements_); + } + } + } + if (!other.getAuthToken().isEmpty()) { + authToken_ = other.authToken_; + onChanged(); + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.TransferEntitlementsRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.TransferEntitlementsRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of reseller's customer account where the entitlements
+     * transfer to.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account where the entitlements
+     * transfer to.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account where the entitlements
+     * transfer to.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account where the entitlements
+     * transfer to.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account where the entitlements
+     * transfer to.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.util.List entitlements_ = + java.util.Collections.emptyList(); + + private void ensureEntitlementsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entitlements_ = + new java.util.ArrayList(entitlements_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder> + entitlementsBuilder_; + + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getEntitlementsList() { + if (entitlementsBuilder_ == null) { + return java.util.Collections.unmodifiableList(entitlements_); + } else { + return entitlementsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getEntitlementsCount() { + if (entitlementsBuilder_ == null) { + return entitlements_.size(); + } else { + return entitlementsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Entitlement getEntitlements(int index) { + if (entitlementsBuilder_ == null) { + return entitlements_.get(index); + } else { + return entitlementsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntitlements(int index, com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.set(index, value); + onChanged(); + } else { + entitlementsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntitlements( + int index, com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.set(index, builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntitlements(com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.add(value); + onChanged(); + } else { + entitlementsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntitlements(int index, com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.add(index, value); + onChanged(); + } else { + entitlementsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntitlements( + com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.add(builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntitlements( + int index, com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.add(index, builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllEntitlements( + java.lang.Iterable values) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entitlements_); + onChanged(); + } else { + entitlementsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEntitlements() { + if (entitlementsBuilder_ == null) { + entitlements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entitlementsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeEntitlements(int index) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.remove(index); + onChanged(); + } else { + entitlementsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Entitlement.Builder getEntitlementsBuilder(int index) { + return getEntitlementsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index) { + if (entitlementsBuilder_ == null) { + return entitlements_.get(index); + } else { + return entitlementsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getEntitlementsOrBuilderList() { + if (entitlementsBuilder_ != null) { + return entitlementsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entitlements_); + } + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Entitlement.Builder addEntitlementsBuilder() { + return getEntitlementsFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.Entitlement.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Entitlement.Builder addEntitlementsBuilder(int index) { + return getEntitlementsFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Entitlement.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The new entitlements to be created or transferred.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getEntitlementsBuilderList() { + return getEntitlementsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder> + getEntitlementsFieldBuilder() { + if (entitlementsBuilder_ == null) { + entitlementsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder>( + entitlements_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entitlements_ = null; + } + return entitlementsBuilder_; + } + + private java.lang.Object authToken_ = ""; + /** + * + * + *
+     * This token is generated by the Super Admin of the resold customer to
+     * authorize a reseller to access their Cloud Identity and purchase
+     * entitlements on their behalf. This token can be omitted once the
+     * authorization is generated. See https://support.google.com/a/answer/7643790
+     * for more details.
+     * 
+ * + * string auth_token = 4; + * + * @return The authToken. + */ + public java.lang.String getAuthToken() { + java.lang.Object ref = authToken_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + authToken_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * This token is generated by the Super Admin of the resold customer to
+     * authorize a reseller to access their Cloud Identity and purchase
+     * entitlements on their behalf. This token can be omitted once the
+     * authorization is generated. See https://support.google.com/a/answer/7643790
+     * for more details.
+     * 
+ * + * string auth_token = 4; + * + * @return The bytes for authToken. + */ + public com.google.protobuf.ByteString getAuthTokenBytes() { + java.lang.Object ref = authToken_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + authToken_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * This token is generated by the Super Admin of the resold customer to
+     * authorize a reseller to access their Cloud Identity and purchase
+     * entitlements on their behalf. This token can be omitted once the
+     * authorization is generated. See https://support.google.com/a/answer/7643790
+     * for more details.
+     * 
+ * + * string auth_token = 4; + * + * @param value The authToken to set. + * @return This builder for chaining. + */ + public Builder setAuthToken(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + authToken_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * This token is generated by the Super Admin of the resold customer to
+     * authorize a reseller to access their Cloud Identity and purchase
+     * entitlements on their behalf. This token can be omitted once the
+     * authorization is generated. See https://support.google.com/a/answer/7643790
+     * for more details.
+     * 
+ * + * string auth_token = 4; + * + * @return This builder for chaining. + */ + public Builder clearAuthToken() { + + authToken_ = getDefaultInstance().getAuthToken(); + onChanged(); + return this; + } + /** + * + * + *
+     * This token is generated by the Super Admin of the resold customer to
+     * authorize a reseller to access their Cloud Identity and purchase
+     * entitlements on their behalf. This token can be omitted once the
+     * authorization is generated. See https://support.google.com/a/answer/7643790
+     * for more details.
+     * 
+ * + * string auth_token = 4; + * + * @param value The bytes for authToken to set. + * @return This builder for chaining. + */ + public Builder setAuthTokenBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + authToken_ = value; + onChanged(); + return this; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.TransferEntitlementsRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.TransferEntitlementsRequest) + private static final com.google.cloud.channel.v1.TransferEntitlementsRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.TransferEntitlementsRequest(); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransferEntitlementsRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransferEntitlementsRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsRequestOrBuilder.java new file mode 100644 index 00000000..7ef9e6e0 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsRequestOrBuilder.java @@ -0,0 +1,192 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface TransferEntitlementsRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.TransferEntitlementsRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of reseller's customer account where the entitlements
+   * transfer to.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of reseller's customer account where the entitlements
+   * transfer to.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The new entitlements to be created or transferred.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getEntitlementsList(); + /** + * + * + *
+   * Required. The new entitlements to be created or transferred.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.Entitlement getEntitlements(int index); + /** + * + * + *
+   * Required. The new entitlements to be created or transferred.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getEntitlementsCount(); + /** + * + * + *
+   * Required. The new entitlements to be created or transferred.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getEntitlementsOrBuilderList(); + /** + * + * + *
+   * Required. The new entitlements to be created or transferred.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index); + + /** + * + * + *
+   * This token is generated by the Super Admin of the resold customer to
+   * authorize a reseller to access their Cloud Identity and purchase
+   * entitlements on their behalf. This token can be omitted once the
+   * authorization is generated. See https://support.google.com/a/answer/7643790
+   * for more details.
+   * 
+ * + * string auth_token = 4; + * + * @return The authToken. + */ + java.lang.String getAuthToken(); + /** + * + * + *
+   * This token is generated by the Super Admin of the resold customer to
+   * authorize a reseller to access their Cloud Identity and purchase
+   * entitlements on their behalf. This token can be omitted once the
+   * authorization is generated. See https://support.google.com/a/answer/7643790
+   * for more details.
+   * 
+ * + * string auth_token = 4; + * + * @return The bytes for authToken. + */ + com.google.protobuf.ByteString getAuthTokenBytes(); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 6 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsResponse.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsResponse.java new file mode 100644 index 00000000..de2975ea --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsResponse.java @@ -0,0 +1,954 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Response message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
+ * This will be put into the response field of google.longrunning.Operation.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferEntitlementsResponse} + */ +public final class TransferEntitlementsResponse extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.TransferEntitlementsResponse) + TransferEntitlementsResponseOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransferEntitlementsResponse.newBuilder() to construct. + private TransferEntitlementsResponse(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransferEntitlementsResponse() { + entitlements_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransferEntitlementsResponse(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransferEntitlementsResponse( + 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)) { + entitlements_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + entitlements_.add( + input.readMessage( + com.google.cloud.channel.v1.Entitlement.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)) { + entitlements_ = java.util.Collections.unmodifiableList(entitlements_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferEntitlementsResponse.class, + com.google.cloud.channel.v1.TransferEntitlementsResponse.Builder.class); + } + + public static final int ENTITLEMENTS_FIELD_NUMBER = 1; + private java.util.List entitlements_; + /** + * + * + *
+   * The entitlements that have been transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + @java.lang.Override + public java.util.List getEntitlementsList() { + return entitlements_; + } + /** + * + * + *
+   * The entitlements that have been transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + @java.lang.Override + public java.util.List + getEntitlementsOrBuilderList() { + return entitlements_; + } + /** + * + * + *
+   * The entitlements that have been transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + @java.lang.Override + public int getEntitlementsCount() { + return entitlements_.size(); + } + /** + * + * + *
+   * The entitlements that have been transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement getEntitlements(int index) { + return entitlements_.get(index); + } + /** + * + * + *
+   * The entitlements that have been transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index) { + return entitlements_.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 < entitlements_.size(); i++) { + output.writeMessage(1, entitlements_.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 < entitlements_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, entitlements_.get(i)); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.TransferEntitlementsResponse)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.TransferEntitlementsResponse other = + (com.google.cloud.channel.v1.TransferEntitlementsResponse) obj; + + if (!getEntitlementsList().equals(other.getEntitlementsList())) return false; + if (!unknownFields.equals(other.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 (getEntitlementsCount() > 0) { + hash = (37 * hash) + ENTITLEMENTS_FIELD_NUMBER; + hash = (53 * hash) + getEntitlementsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.TransferEntitlementsResponse prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements].
+   * This will be put into the response field of google.longrunning.Operation.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferEntitlementsResponse} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.TransferEntitlementsResponse) + com.google.cloud.channel.v1.TransferEntitlementsResponseOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsResponse_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferEntitlementsResponse.class, + com.google.cloud.channel.v1.TransferEntitlementsResponse.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.TransferEntitlementsResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEntitlementsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (entitlementsBuilder_ == null) { + entitlements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + entitlementsBuilder_.clear(); + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsResponse_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsResponse getDefaultInstanceForType() { + return com.google.cloud.channel.v1.TransferEntitlementsResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsResponse build() { + com.google.cloud.channel.v1.TransferEntitlementsResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsResponse buildPartial() { + com.google.cloud.channel.v1.TransferEntitlementsResponse result = + new com.google.cloud.channel.v1.TransferEntitlementsResponse(this); + int from_bitField0_ = bitField0_; + if (entitlementsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entitlements_ = java.util.Collections.unmodifiableList(entitlements_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entitlements_ = entitlements_; + } else { + result.entitlements_ = entitlementsBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.TransferEntitlementsResponse) { + return mergeFrom((com.google.cloud.channel.v1.TransferEntitlementsResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.TransferEntitlementsResponse other) { + if (other == com.google.cloud.channel.v1.TransferEntitlementsResponse.getDefaultInstance()) + return this; + if (entitlementsBuilder_ == null) { + if (!other.entitlements_.isEmpty()) { + if (entitlements_.isEmpty()) { + entitlements_ = other.entitlements_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntitlementsIsMutable(); + entitlements_.addAll(other.entitlements_); + } + onChanged(); + } + } else { + if (!other.entitlements_.isEmpty()) { + if (entitlementsBuilder_.isEmpty()) { + entitlementsBuilder_.dispose(); + entitlementsBuilder_ = null; + entitlements_ = other.entitlements_; + bitField0_ = (bitField0_ & ~0x00000001); + entitlementsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntitlementsFieldBuilder() + : null; + } else { + entitlementsBuilder_.addAllMessages(other.entitlements_); + } + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.TransferEntitlementsResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.TransferEntitlementsResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.util.List entitlements_ = + java.util.Collections.emptyList(); + + private void ensureEntitlementsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entitlements_ = + new java.util.ArrayList(entitlements_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder> + entitlementsBuilder_; + + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public java.util.List getEntitlementsList() { + if (entitlementsBuilder_ == null) { + return java.util.Collections.unmodifiableList(entitlements_); + } else { + return entitlementsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public int getEntitlementsCount() { + if (entitlementsBuilder_ == null) { + return entitlements_.size(); + } else { + return entitlementsBuilder_.getCount(); + } + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public com.google.cloud.channel.v1.Entitlement getEntitlements(int index) { + if (entitlementsBuilder_ == null) { + return entitlements_.get(index); + } else { + return entitlementsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder setEntitlements(int index, com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.set(index, value); + onChanged(); + } else { + entitlementsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder setEntitlements( + int index, com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.set(index, builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder addEntitlements(com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.add(value); + onChanged(); + } else { + entitlementsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder addEntitlements(int index, com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.add(index, value); + onChanged(); + } else { + entitlementsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder addEntitlements( + com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.add(builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder addEntitlements( + int index, com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.add(index, builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder addAllEntitlements( + java.lang.Iterable values) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entitlements_); + onChanged(); + } else { + entitlementsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder clearEntitlements() { + if (entitlementsBuilder_ == null) { + entitlements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entitlementsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public Builder removeEntitlements(int index) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.remove(index); + onChanged(); + } else { + entitlementsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public com.google.cloud.channel.v1.Entitlement.Builder getEntitlementsBuilder(int index) { + return getEntitlementsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index) { + if (entitlementsBuilder_ == null) { + return entitlements_.get(index); + } else { + return entitlementsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public java.util.List + getEntitlementsOrBuilderList() { + if (entitlementsBuilder_ != null) { + return entitlementsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entitlements_); + } + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public com.google.cloud.channel.v1.Entitlement.Builder addEntitlementsBuilder() { + return getEntitlementsFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.Entitlement.getDefaultInstance()); + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public com.google.cloud.channel.v1.Entitlement.Builder addEntitlementsBuilder(int index) { + return getEntitlementsFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Entitlement.getDefaultInstance()); + } + /** + * + * + *
+     * The entitlements that have been transferred.
+     * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + public java.util.List + getEntitlementsBuilderList() { + return getEntitlementsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder> + getEntitlementsFieldBuilder() { + if (entitlementsBuilder_ == null) { + entitlementsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder>( + entitlements_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entitlements_ = null; + } + return entitlementsBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.TransferEntitlementsResponse) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.TransferEntitlementsResponse) + private static final com.google.cloud.channel.v1.TransferEntitlementsResponse DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.TransferEntitlementsResponse(); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsResponse getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransferEntitlementsResponse parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransferEntitlementsResponse(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsResponse getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsResponseOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsResponseOrBuilder.java new file mode 100644 index 00000000..70e92c9c --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsResponseOrBuilder.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/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface TransferEntitlementsResponseOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.TransferEntitlementsResponse) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * The entitlements that have been transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + java.util.List getEntitlementsList(); + /** + * + * + *
+   * The entitlements that have been transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + com.google.cloud.channel.v1.Entitlement getEntitlements(int index); + /** + * + * + *
+   * The entitlements that have been transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + int getEntitlementsCount(); + /** + * + * + *
+   * The entitlements that have been transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + java.util.List + getEntitlementsOrBuilderList(); + /** + * + * + *
+   * The entitlements that have been transferred.
+   * 
+ * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 1; + */ + com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsToGoogleRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsToGoogleRequest.java new file mode 100644 index 00000000..f18a6b86 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsToGoogleRequest.java @@ -0,0 +1,1442 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.TransferEntitlementsToGoogle][google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferEntitlementsToGoogleRequest} + */ +public final class TransferEntitlementsToGoogleRequest + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.TransferEntitlementsToGoogleRequest) + TransferEntitlementsToGoogleRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransferEntitlementsToGoogleRequest.newBuilder() to construct. + private TransferEntitlementsToGoogleRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransferEntitlementsToGoogleRequest() { + parent_ = ""; + entitlements_ = java.util.Collections.emptyList(); + requestId_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransferEntitlementsToGoogleRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransferEntitlementsToGoogleRequest( + 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(); + + parent_ = s; + break; + } + case 18: + { + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + entitlements_ = new java.util.ArrayList(); + mutable_bitField0_ |= 0x00000001; + } + entitlements_.add( + input.readMessage( + com.google.cloud.channel.v1.Entitlement.parser(), extensionRegistry)); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + + requestId_ = s; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + entitlements_ = java.util.Collections.unmodifiableList(entitlements_); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsToGoogleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsToGoogleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest.class, + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest.Builder.class); + } + + public static final int PARENT_FIELD_NUMBER = 1; + private volatile java.lang.Object parent_; + /** + * + * + *
+   * Required. The resource name of reseller's customer account where the entitlements
+   * transfer from.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + @java.lang.Override + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of reseller's customer account where the entitlements
+   * transfer from.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + @java.lang.Override + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int ENTITLEMENTS_FIELD_NUMBER = 2; + private java.util.List entitlements_; + /** + * + * + *
+   * Required. The entitlements to be transferred to Google.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List getEntitlementsList() { + return entitlements_; + } + /** + * + * + *
+   * Required. The entitlements to be transferred to Google.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public java.util.List + getEntitlementsOrBuilderList() { + return entitlements_; + } + /** + * + * + *
+   * Required. The entitlements to be transferred to Google.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public int getEntitlementsCount() { + return entitlements_.size(); + } + /** + * + * + *
+   * Required. The entitlements to be transferred to Google.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.Entitlement getEntitlements(int index) { + return entitlements_.get(index); + } + /** + * + * + *
+   * Required. The entitlements to be transferred to Google.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index) { + return entitlements_.get(index); + } + + public static final int REQUEST_ID_FIELD_NUMBER = 3; + private volatile java.lang.Object requestId_; + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + @java.lang.Override + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } + } + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + @java.lang.Override + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getParentBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, parent_); + } + for (int i = 0; i < entitlements_.size(); i++) { + output.writeMessage(2, entitlements_.get(i)); + } + if (!getRequestIdBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, requestId_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getParentBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, parent_); + } + for (int i = 0; i < entitlements_.size(); i++) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, entitlements_.get(i)); + } + if (!getRequestIdBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, requestId_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest other = + (com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest) obj; + + if (!getParent().equals(other.getParent())) return false; + if (!getEntitlementsList().equals(other.getEntitlementsList())) return false; + if (!getRequestId().equals(other.getRequestId())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + PARENT_FIELD_NUMBER; + hash = (53 * hash) + getParent().hashCode(); + if (getEntitlementsCount() > 0) { + hash = (37 * hash) + ENTITLEMENTS_FIELD_NUMBER; + hash = (53 * hash) + getEntitlementsList().hashCode(); + } + hash = (37 * hash) + REQUEST_ID_FIELD_NUMBER; + hash = (53 * hash) + getRequestId().hashCode(); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.TransferEntitlementsToGoogle][google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferEntitlementsToGoogleRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.TransferEntitlementsToGoogleRequest) + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsToGoogleRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsToGoogleRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest.class, + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getEntitlementsFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + parent_ = ""; + + if (entitlementsBuilder_ == null) { + entitlements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + entitlementsBuilder_.clear(); + } + requestId_ = ""; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferEntitlementsToGoogleRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest + getDefaultInstanceForType() { + return com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest build() { + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest buildPartial() { + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest result = + new com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest(this); + int from_bitField0_ = bitField0_; + result.parent_ = parent_; + if (entitlementsBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + entitlements_ = java.util.Collections.unmodifiableList(entitlements_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.entitlements_ = entitlements_; + } else { + result.entitlements_ = entitlementsBuilder_.build(); + } + result.requestId_ = requestId_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest) { + return mergeFrom((com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest other) { + if (other + == com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest.getDefaultInstance()) + return this; + if (!other.getParent().isEmpty()) { + parent_ = other.parent_; + onChanged(); + } + if (entitlementsBuilder_ == null) { + if (!other.entitlements_.isEmpty()) { + if (entitlements_.isEmpty()) { + entitlements_ = other.entitlements_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureEntitlementsIsMutable(); + entitlements_.addAll(other.entitlements_); + } + onChanged(); + } + } else { + if (!other.entitlements_.isEmpty()) { + if (entitlementsBuilder_.isEmpty()) { + entitlementsBuilder_.dispose(); + entitlementsBuilder_ = null; + entitlements_ = other.entitlements_; + bitField0_ = (bitField0_ & ~0x00000001); + entitlementsBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getEntitlementsFieldBuilder() + : null; + } else { + entitlementsBuilder_.addAllMessages(other.entitlements_); + } + } + } + if (!other.getRequestId().isEmpty()) { + requestId_ = other.requestId_; + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private java.lang.Object parent_ = ""; + /** + * + * + *
+     * Required. The resource name of reseller's customer account where the entitlements
+     * transfer from.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + public java.lang.String getParent() { + java.lang.Object ref = parent_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + parent_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account where the entitlements
+     * transfer from.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + public com.google.protobuf.ByteString getParentBytes() { + java.lang.Object ref = parent_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + parent_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account where the entitlements
+     * transfer from.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The parent to set. + * @return This builder for chaining. + */ + public Builder setParent(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + parent_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account where the entitlements
+     * transfer from.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearParent() { + + parent_ = getDefaultInstance().getParent(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of reseller's customer account where the entitlements
+     * transfer from.
+     * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+     * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for parent to set. + * @return This builder for chaining. + */ + public Builder setParentBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + parent_ = value; + onChanged(); + return this; + } + + private java.util.List entitlements_ = + java.util.Collections.emptyList(); + + private void ensureEntitlementsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + entitlements_ = + new java.util.ArrayList(entitlements_); + bitField0_ |= 0x00000001; + } + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder> + entitlementsBuilder_; + + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List getEntitlementsList() { + if (entitlementsBuilder_ == null) { + return java.util.Collections.unmodifiableList(entitlements_); + } else { + return entitlementsBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public int getEntitlementsCount() { + if (entitlementsBuilder_ == null) { + return entitlements_.size(); + } else { + return entitlementsBuilder_.getCount(); + } + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Entitlement getEntitlements(int index) { + if (entitlementsBuilder_ == null) { + return entitlements_.get(index); + } else { + return entitlementsBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntitlements(int index, com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.set(index, value); + onChanged(); + } else { + entitlementsBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setEntitlements( + int index, com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.set(index, builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntitlements(com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.add(value); + onChanged(); + } else { + entitlementsBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntitlements(int index, com.google.cloud.channel.v1.Entitlement value) { + if (entitlementsBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureEntitlementsIsMutable(); + entitlements_.add(index, value); + onChanged(); + } else { + entitlementsBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntitlements( + com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.add(builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addEntitlements( + int index, com.google.cloud.channel.v1.Entitlement.Builder builderForValue) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.add(index, builderForValue.build()); + onChanged(); + } else { + entitlementsBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder addAllEntitlements( + java.lang.Iterable values) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, entitlements_); + onChanged(); + } else { + entitlementsBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearEntitlements() { + if (entitlementsBuilder_ == null) { + entitlements_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + } else { + entitlementsBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder removeEntitlements(int index) { + if (entitlementsBuilder_ == null) { + ensureEntitlementsIsMutable(); + entitlements_.remove(index); + onChanged(); + } else { + entitlementsBuilder_.remove(index); + } + return this; + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Entitlement.Builder getEntitlementsBuilder(int index) { + return getEntitlementsFieldBuilder().getBuilder(index); + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index) { + if (entitlementsBuilder_ == null) { + return entitlements_.get(index); + } else { + return entitlementsBuilder_.getMessageOrBuilder(index); + } + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getEntitlementsOrBuilderList() { + if (entitlementsBuilder_ != null) { + return entitlementsBuilder_.getMessageOrBuilderList(); + } else { + return java.util.Collections.unmodifiableList(entitlements_); + } + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Entitlement.Builder addEntitlementsBuilder() { + return getEntitlementsFieldBuilder() + .addBuilder(com.google.cloud.channel.v1.Entitlement.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Entitlement.Builder addEntitlementsBuilder(int index) { + return getEntitlementsFieldBuilder() + .addBuilder(index, com.google.cloud.channel.v1.Entitlement.getDefaultInstance()); + } + /** + * + * + *
+     * Required. The entitlements to be transferred to Google.
+     * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public java.util.List + getEntitlementsBuilderList() { + return getEntitlementsFieldBuilder().getBuilderList(); + } + + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder> + getEntitlementsFieldBuilder() { + if (entitlementsBuilder_ == null) { + entitlementsBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.cloud.channel.v1.Entitlement, + com.google.cloud.channel.v1.Entitlement.Builder, + com.google.cloud.channel.v1.EntitlementOrBuilder>( + entitlements_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); + entitlements_ = null; + } + return entitlementsBuilder_; + } + + private java.lang.Object requestId_ = ""; + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + public java.lang.String getRequestId() { + java.lang.Object ref = requestId_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + requestId_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + public com.google.protobuf.ByteString getRequestIdBytes() { + java.lang.Object ref = requestId_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + requestId_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestId(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + requestId_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return This builder for chaining. + */ + public Builder clearRequestId() { + + requestId_ = getDefaultInstance().getRequestId(); + onChanged(); + return this; + } + /** + * + * + *
+     * Optional. An optional request ID to identify requests. Specify a unique request ID so
+     * that if you must retry your request, the server will know to ignore the
+     * request if it has already been completed.
+     * For example, consider a situation where you make an initial request and
+     * the request times out. If you make the request again with the same
+     * request ID, the server can check if the original operation with the same
+     * request ID was received, and if so, will ignore the second request.
+     * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+     * with the exception that zero UUID is not supported
+     * (`00000000-0000-0000-0000-000000000000`).
+     * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @param value The bytes for requestId to set. + * @return This builder for chaining. + */ + public Builder setRequestIdBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + requestId_ = value; + onChanged(); + return this; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.TransferEntitlementsToGoogleRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.TransferEntitlementsToGoogleRequest) + private static final com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest(); + } + + public static com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransferEntitlementsToGoogleRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransferEntitlementsToGoogleRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferEntitlementsToGoogleRequest + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsToGoogleRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsToGoogleRequestOrBuilder.java new file mode 100644 index 00000000..596e4098 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferEntitlementsToGoogleRequestOrBuilder.java @@ -0,0 +1,159 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface TransferEntitlementsToGoogleRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.TransferEntitlementsToGoogleRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of reseller's customer account where the entitlements
+   * transfer from.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The parent. + */ + java.lang.String getParent(); + /** + * + * + *
+   * Required. The resource name of reseller's customer account where the entitlements
+   * transfer from.
+   * The parent takes the format: accounts/{account_id}/customers/{customer_id}
+   * 
+ * + * string parent = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for parent. + */ + com.google.protobuf.ByteString getParentBytes(); + + /** + * + * + *
+   * Required. The entitlements to be transferred to Google.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List getEntitlementsList(); + /** + * + * + *
+   * Required. The entitlements to be transferred to Google.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.Entitlement getEntitlements(int index); + /** + * + * + *
+   * Required. The entitlements to be transferred to Google.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + int getEntitlementsCount(); + /** + * + * + *
+   * Required. The entitlements to be transferred to Google.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + java.util.List + getEntitlementsOrBuilderList(); + /** + * + * + *
+   * Required. The entitlements to be transferred to Google.
+   * 
+ * + * + * repeated .google.cloud.channel.v1.Entitlement entitlements = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.EntitlementOrBuilder getEntitlementsOrBuilder(int index); + + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The requestId. + */ + java.lang.String getRequestId(); + /** + * + * + *
+   * Optional. An optional request ID to identify requests. Specify a unique request ID so
+   * that if you must retry your request, the server will know to ignore the
+   * request if it has already been completed.
+   * For example, consider a situation where you make an initial request and
+   * the request times out. If you make the request again with the same
+   * request ID, the server can check if the original operation with the same
+   * request ID was received, and if so, will ignore the second request.
+   * The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122)
+   * with the exception that zero UUID is not supported
+   * (`00000000-0000-0000-0000-000000000000`).
+   * 
+ * + * string request_id = 3 [(.google.api.field_behavior) = OPTIONAL]; + * + * @return The bytes for requestId. + */ + com.google.protobuf.ByteString getRequestIdBytes(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableOffer.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableOffer.java new file mode 100644 index 00000000..c468a4b9 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableOffer.java @@ -0,0 +1,724 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * TransferableOffer represents an Offer that can be used in Transfer.
+ * Read-only.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferableOffer} + */ +public final class TransferableOffer extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.TransferableOffer) + TransferableOfferOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransferableOffer.newBuilder() to construct. + private TransferableOffer(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransferableOffer() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransferableOffer(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransferableOffer( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + com.google.cloud.channel.v1.Offer.Builder subBuilder = null; + if (offer_ != null) { + subBuilder = offer_.toBuilder(); + } + offer_ = + input.readMessage(com.google.cloud.channel.v1.Offer.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(offer_); + offer_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferableOffer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferableOffer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferableOffer.class, + com.google.cloud.channel.v1.TransferableOffer.Builder.class); + } + + public static final int OFFER_FIELD_NUMBER = 1; + private com.google.cloud.channel.v1.Offer offer_; + /** + * + * + *
+   * Offer with parameter constraints updated to allow the Transfer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return Whether the offer field is set. + */ + @java.lang.Override + public boolean hasOffer() { + return offer_ != null; + } + /** + * + * + *
+   * Offer with parameter constraints updated to allow the Transfer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return The offer. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Offer getOffer() { + return offer_ == null ? com.google.cloud.channel.v1.Offer.getDefaultInstance() : offer_; + } + /** + * + * + *
+   * Offer with parameter constraints updated to allow the Transfer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + @java.lang.Override + public com.google.cloud.channel.v1.OfferOrBuilder getOfferOrBuilder() { + return getOffer(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (offer_ != null) { + output.writeMessage(1, getOffer()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (offer_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getOffer()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.TransferableOffer)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.TransferableOffer other = + (com.google.cloud.channel.v1.TransferableOffer) obj; + + if (hasOffer() != other.hasOffer()) return false; + if (hasOffer()) { + if (!getOffer().equals(other.getOffer())) return false; + } + if (!unknownFields.equals(other.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 (hasOffer()) { + hash = (37 * hash) + OFFER_FIELD_NUMBER; + hash = (53 * hash) + getOffer().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.TransferableOffer parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferableOffer parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferableOffer parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferableOffer parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferableOffer parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferableOffer parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferableOffer parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferableOffer parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferableOffer parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferableOffer parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferableOffer parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferableOffer parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.TransferableOffer prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * TransferableOffer represents an Offer that can be used in Transfer.
+   * Read-only.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferableOffer} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.TransferableOffer) + com.google.cloud.channel.v1.TransferableOfferOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferableOffer_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferableOffer_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferableOffer.class, + com.google.cloud.channel.v1.TransferableOffer.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.TransferableOffer.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (offerBuilder_ == null) { + offer_ = null; + } else { + offer_ = null; + offerBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_TransferableOffer_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferableOffer getDefaultInstanceForType() { + return com.google.cloud.channel.v1.TransferableOffer.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferableOffer build() { + com.google.cloud.channel.v1.TransferableOffer result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferableOffer buildPartial() { + com.google.cloud.channel.v1.TransferableOffer result = + new com.google.cloud.channel.v1.TransferableOffer(this); + if (offerBuilder_ == null) { + result.offer_ = offer_; + } else { + result.offer_ = offerBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.TransferableOffer) { + return mergeFrom((com.google.cloud.channel.v1.TransferableOffer) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.TransferableOffer other) { + if (other == com.google.cloud.channel.v1.TransferableOffer.getDefaultInstance()) return this; + if (other.hasOffer()) { + mergeOffer(other.getOffer()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.TransferableOffer parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.TransferableOffer) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.channel.v1.Offer offer_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Offer, + com.google.cloud.channel.v1.Offer.Builder, + com.google.cloud.channel.v1.OfferOrBuilder> + offerBuilder_; + /** + * + * + *
+     * Offer with parameter constraints updated to allow the Transfer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return Whether the offer field is set. + */ + public boolean hasOffer() { + return offerBuilder_ != null || offer_ != null; + } + /** + * + * + *
+     * Offer with parameter constraints updated to allow the Transfer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return The offer. + */ + public com.google.cloud.channel.v1.Offer getOffer() { + if (offerBuilder_ == null) { + return offer_ == null ? com.google.cloud.channel.v1.Offer.getDefaultInstance() : offer_; + } else { + return offerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Offer with parameter constraints updated to allow the Transfer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public Builder setOffer(com.google.cloud.channel.v1.Offer value) { + if (offerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + offer_ = value; + onChanged(); + } else { + offerBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Offer with parameter constraints updated to allow the Transfer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public Builder setOffer(com.google.cloud.channel.v1.Offer.Builder builderForValue) { + if (offerBuilder_ == null) { + offer_ = builderForValue.build(); + onChanged(); + } else { + offerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Offer with parameter constraints updated to allow the Transfer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public Builder mergeOffer(com.google.cloud.channel.v1.Offer value) { + if (offerBuilder_ == null) { + if (offer_ != null) { + offer_ = + com.google.cloud.channel.v1.Offer.newBuilder(offer_).mergeFrom(value).buildPartial(); + } else { + offer_ = value; + } + onChanged(); + } else { + offerBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Offer with parameter constraints updated to allow the Transfer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public Builder clearOffer() { + if (offerBuilder_ == null) { + offer_ = null; + onChanged(); + } else { + offer_ = null; + offerBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Offer with parameter constraints updated to allow the Transfer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public com.google.cloud.channel.v1.Offer.Builder getOfferBuilder() { + + onChanged(); + return getOfferFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Offer with parameter constraints updated to allow the Transfer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + public com.google.cloud.channel.v1.OfferOrBuilder getOfferOrBuilder() { + if (offerBuilder_ != null) { + return offerBuilder_.getMessageOrBuilder(); + } else { + return offer_ == null ? com.google.cloud.channel.v1.Offer.getDefaultInstance() : offer_; + } + } + /** + * + * + *
+     * Offer with parameter constraints updated to allow the Transfer.
+     * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Offer, + com.google.cloud.channel.v1.Offer.Builder, + com.google.cloud.channel.v1.OfferOrBuilder> + getOfferFieldBuilder() { + if (offerBuilder_ == null) { + offerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Offer, + com.google.cloud.channel.v1.Offer.Builder, + com.google.cloud.channel.v1.OfferOrBuilder>( + getOffer(), getParentForChildren(), isClean()); + offer_ = null; + } + return offerBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.TransferableOffer) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.TransferableOffer) + private static final com.google.cloud.channel.v1.TransferableOffer DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.TransferableOffer(); + } + + public static com.google.cloud.channel.v1.TransferableOffer getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransferableOffer parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransferableOffer(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferableOffer getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableOfferOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableOfferOrBuilder.java new file mode 100644 index 00000000..93668c54 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableOfferOrBuilder.java @@ -0,0 +1,60 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface TransferableOfferOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.TransferableOffer) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Offer with parameter constraints updated to allow the Transfer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return Whether the offer field is set. + */ + boolean hasOffer(); + /** + * + * + *
+   * Offer with parameter constraints updated to allow the Transfer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + * + * @return The offer. + */ + com.google.cloud.channel.v1.Offer getOffer(); + /** + * + * + *
+   * Offer with parameter constraints updated to allow the Transfer.
+   * 
+ * + * .google.cloud.channel.v1.Offer offer = 1; + */ + com.google.cloud.channel.v1.OfferOrBuilder getOfferOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableSku.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableSku.java new file mode 100644 index 00000000..29d29e84 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableSku.java @@ -0,0 +1,1558 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * TransferableSku represents information a reseller needs to view existing
+ * provisioned services for a customer that they do not own.
+ * Read-only.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferableSku} + */ +public final class TransferableSku extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.TransferableSku) + TransferableSkuOrBuilder { + private static final long serialVersionUID = 0L; + // Use TransferableSku.newBuilder() to construct. + private TransferableSku(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TransferableSku() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TransferableSku(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TransferableSku( + 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 50: + { + com.google.protobuf.BoolValue.Builder subBuilder = null; + if (isCommitment_ != null) { + subBuilder = isCommitment_.toBuilder(); + } + isCommitment_ = + input.readMessage(com.google.protobuf.BoolValue.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(isCommitment_); + isCommitment_ = subBuilder.buildPartial(); + } + + break; + } + case 58: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (commitmentEndTimestamp_ != null) { + subBuilder = commitmentEndTimestamp_.toBuilder(); + } + commitmentEndTimestamp_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(commitmentEndTimestamp_); + commitmentEndTimestamp_ = subBuilder.buildPartial(); + } + + break; + } + case 74: + { + com.google.cloud.channel.v1.TransferEligibility.Builder subBuilder = null; + if (transferEligibility_ != null) { + subBuilder = transferEligibility_.toBuilder(); + } + transferEligibility_ = + input.readMessage( + com.google.cloud.channel.v1.TransferEligibility.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(transferEligibility_); + transferEligibility_ = subBuilder.buildPartial(); + } + + break; + } + case 90: + { + com.google.cloud.channel.v1.Sku.Builder subBuilder = null; + if (sku_ != null) { + subBuilder = sku_.toBuilder(); + } + sku_ = input.readMessage(com.google.cloud.channel.v1.Sku.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(sku_); + sku_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TransferableSku_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TransferableSku_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferableSku.class, + com.google.cloud.channel.v1.TransferableSku.Builder.class); + } + + public static final int IS_COMMITMENT_FIELD_NUMBER = 6; + private com.google.protobuf.BoolValue isCommitment_; + /** + * + * + *
+   * Whether a transferable SKU is commitment-based or not.
+   * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + * + * @return Whether the isCommitment field is set. + */ + @java.lang.Override + public boolean hasIsCommitment() { + return isCommitment_ != null; + } + /** + * + * + *
+   * Whether a transferable SKU is commitment-based or not.
+   * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + * + * @return The isCommitment. + */ + @java.lang.Override + public com.google.protobuf.BoolValue getIsCommitment() { + return isCommitment_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : isCommitment_; + } + /** + * + * + *
+   * Whether a transferable SKU is commitment-based or not.
+   * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + */ + @java.lang.Override + public com.google.protobuf.BoolValueOrBuilder getIsCommitmentOrBuilder() { + return getIsCommitment(); + } + + public static final int COMMITMENT_END_TIMESTAMP_FIELD_NUMBER = 7; + private com.google.protobuf.Timestamp commitmentEndTimestamp_; + /** + * + * + *
+   * Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + * + * @return Whether the commitmentEndTimestamp field is set. + */ + @java.lang.Override + public boolean hasCommitmentEndTimestamp() { + return commitmentEndTimestamp_ != null; + } + /** + * + * + *
+   * Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + * + * @return The commitmentEndTimestamp. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getCommitmentEndTimestamp() { + return commitmentEndTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitmentEndTimestamp_; + } + /** + * + * + *
+   * Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getCommitmentEndTimestampOrBuilder() { + return getCommitmentEndTimestamp(); + } + + public static final int TRANSFER_ELIGIBILITY_FIELD_NUMBER = 9; + private com.google.cloud.channel.v1.TransferEligibility transferEligibility_; + /** + * + * + *
+   * Describes the transfer eligibility of a SKU.
+   * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + * + * @return Whether the transferEligibility field is set. + */ + @java.lang.Override + public boolean hasTransferEligibility() { + return transferEligibility_ != null; + } + /** + * + * + *
+   * Describes the transfer eligibility of a SKU.
+   * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + * + * @return The transferEligibility. + */ + @java.lang.Override + public com.google.cloud.channel.v1.TransferEligibility getTransferEligibility() { + return transferEligibility_ == null + ? com.google.cloud.channel.v1.TransferEligibility.getDefaultInstance() + : transferEligibility_; + } + /** + * + * + *
+   * Describes the transfer eligibility of a SKU.
+   * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + */ + @java.lang.Override + public com.google.cloud.channel.v1.TransferEligibilityOrBuilder + getTransferEligibilityOrBuilder() { + return getTransferEligibility(); + } + + public static final int SKU_FIELD_NUMBER = 11; + private com.google.cloud.channel.v1.Sku sku_; + /** + * + * + *
+   * The SKU pertaining to the provisioning resource as specified in the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + * + * @return Whether the sku field is set. + */ + @java.lang.Override + public boolean hasSku() { + return sku_ != null; + } + /** + * + * + *
+   * The SKU pertaining to the provisioning resource as specified in the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + * + * @return The sku. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Sku getSku() { + return sku_ == null ? com.google.cloud.channel.v1.Sku.getDefaultInstance() : sku_; + } + /** + * + * + *
+   * The SKU pertaining to the provisioning resource as specified in the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + */ + @java.lang.Override + public com.google.cloud.channel.v1.SkuOrBuilder getSkuOrBuilder() { + return getSku(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (isCommitment_ != null) { + output.writeMessage(6, getIsCommitment()); + } + if (commitmentEndTimestamp_ != null) { + output.writeMessage(7, getCommitmentEndTimestamp()); + } + if (transferEligibility_ != null) { + output.writeMessage(9, getTransferEligibility()); + } + if (sku_ != null) { + output.writeMessage(11, getSku()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (isCommitment_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getIsCommitment()); + } + if (commitmentEndTimestamp_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(7, getCommitmentEndTimestamp()); + } + if (transferEligibility_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getTransferEligibility()); + } + if (sku_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, getSku()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.TransferableSku)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.TransferableSku other = + (com.google.cloud.channel.v1.TransferableSku) obj; + + if (hasIsCommitment() != other.hasIsCommitment()) return false; + if (hasIsCommitment()) { + if (!getIsCommitment().equals(other.getIsCommitment())) return false; + } + if (hasCommitmentEndTimestamp() != other.hasCommitmentEndTimestamp()) return false; + if (hasCommitmentEndTimestamp()) { + if (!getCommitmentEndTimestamp().equals(other.getCommitmentEndTimestamp())) return false; + } + if (hasTransferEligibility() != other.hasTransferEligibility()) return false; + if (hasTransferEligibility()) { + if (!getTransferEligibility().equals(other.getTransferEligibility())) return false; + } + if (hasSku() != other.hasSku()) return false; + if (hasSku()) { + if (!getSku().equals(other.getSku())) return false; + } + if (!unknownFields.equals(other.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 (hasIsCommitment()) { + hash = (37 * hash) + IS_COMMITMENT_FIELD_NUMBER; + hash = (53 * hash) + getIsCommitment().hashCode(); + } + if (hasCommitmentEndTimestamp()) { + hash = (37 * hash) + COMMITMENT_END_TIMESTAMP_FIELD_NUMBER; + hash = (53 * hash) + getCommitmentEndTimestamp().hashCode(); + } + if (hasTransferEligibility()) { + hash = (37 * hash) + TRANSFER_ELIGIBILITY_FIELD_NUMBER; + hash = (53 * hash) + getTransferEligibility().hashCode(); + } + if (hasSku()) { + hash = (37 * hash) + SKU_FIELD_NUMBER; + hash = (53 * hash) + getSku().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.TransferableSku parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferableSku parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferableSku parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferableSku parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferableSku parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TransferableSku parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferableSku parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferableSku parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferableSku parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferableSku parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TransferableSku parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TransferableSku parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.TransferableSku prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * TransferableSku represents information a reseller needs to view existing
+   * provisioned services for a customer that they do not own.
+   * Read-only.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TransferableSku} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.TransferableSku) + com.google.cloud.channel.v1.TransferableSkuOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TransferableSku_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TransferableSku_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TransferableSku.class, + com.google.cloud.channel.v1.TransferableSku.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.TransferableSku.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (isCommitmentBuilder_ == null) { + isCommitment_ = null; + } else { + isCommitment_ = null; + isCommitmentBuilder_ = null; + } + if (commitmentEndTimestampBuilder_ == null) { + commitmentEndTimestamp_ = null; + } else { + commitmentEndTimestamp_ = null; + commitmentEndTimestampBuilder_ = null; + } + if (transferEligibilityBuilder_ == null) { + transferEligibility_ = null; + } else { + transferEligibility_ = null; + transferEligibilityBuilder_ = null; + } + if (skuBuilder_ == null) { + sku_ = null; + } else { + sku_ = null; + skuBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TransferableSku_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferableSku getDefaultInstanceForType() { + return com.google.cloud.channel.v1.TransferableSku.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferableSku build() { + com.google.cloud.channel.v1.TransferableSku result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferableSku buildPartial() { + com.google.cloud.channel.v1.TransferableSku result = + new com.google.cloud.channel.v1.TransferableSku(this); + if (isCommitmentBuilder_ == null) { + result.isCommitment_ = isCommitment_; + } else { + result.isCommitment_ = isCommitmentBuilder_.build(); + } + if (commitmentEndTimestampBuilder_ == null) { + result.commitmentEndTimestamp_ = commitmentEndTimestamp_; + } else { + result.commitmentEndTimestamp_ = commitmentEndTimestampBuilder_.build(); + } + if (transferEligibilityBuilder_ == null) { + result.transferEligibility_ = transferEligibility_; + } else { + result.transferEligibility_ = transferEligibilityBuilder_.build(); + } + if (skuBuilder_ == null) { + result.sku_ = sku_; + } else { + result.sku_ = skuBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.TransferableSku) { + return mergeFrom((com.google.cloud.channel.v1.TransferableSku) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.TransferableSku other) { + if (other == com.google.cloud.channel.v1.TransferableSku.getDefaultInstance()) return this; + if (other.hasIsCommitment()) { + mergeIsCommitment(other.getIsCommitment()); + } + if (other.hasCommitmentEndTimestamp()) { + mergeCommitmentEndTimestamp(other.getCommitmentEndTimestamp()); + } + if (other.hasTransferEligibility()) { + mergeTransferEligibility(other.getTransferEligibility()); + } + if (other.hasSku()) { + mergeSku(other.getSku()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.TransferableSku parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.TransferableSku) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.protobuf.BoolValue isCommitment_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + isCommitmentBuilder_; + /** + * + * + *
+     * Whether a transferable SKU is commitment-based or not.
+     * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + * + * @return Whether the isCommitment field is set. + */ + public boolean hasIsCommitment() { + return isCommitmentBuilder_ != null || isCommitment_ != null; + } + /** + * + * + *
+     * Whether a transferable SKU is commitment-based or not.
+     * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + * + * @return The isCommitment. + */ + public com.google.protobuf.BoolValue getIsCommitment() { + if (isCommitmentBuilder_ == null) { + return isCommitment_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : isCommitment_; + } else { + return isCommitmentBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Whether a transferable SKU is commitment-based or not.
+     * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + */ + public Builder setIsCommitment(com.google.protobuf.BoolValue value) { + if (isCommitmentBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + isCommitment_ = value; + onChanged(); + } else { + isCommitmentBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Whether a transferable SKU is commitment-based or not.
+     * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + */ + public Builder setIsCommitment(com.google.protobuf.BoolValue.Builder builderForValue) { + if (isCommitmentBuilder_ == null) { + isCommitment_ = builderForValue.build(); + onChanged(); + } else { + isCommitmentBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Whether a transferable SKU is commitment-based or not.
+     * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + */ + public Builder mergeIsCommitment(com.google.protobuf.BoolValue value) { + if (isCommitmentBuilder_ == null) { + if (isCommitment_ != null) { + isCommitment_ = + com.google.protobuf.BoolValue.newBuilder(isCommitment_) + .mergeFrom(value) + .buildPartial(); + } else { + isCommitment_ = value; + } + onChanged(); + } else { + isCommitmentBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Whether a transferable SKU is commitment-based or not.
+     * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + */ + public Builder clearIsCommitment() { + if (isCommitmentBuilder_ == null) { + isCommitment_ = null; + onChanged(); + } else { + isCommitment_ = null; + isCommitmentBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Whether a transferable SKU is commitment-based or not.
+     * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + */ + public com.google.protobuf.BoolValue.Builder getIsCommitmentBuilder() { + + onChanged(); + return getIsCommitmentFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Whether a transferable SKU is commitment-based or not.
+     * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + */ + public com.google.protobuf.BoolValueOrBuilder getIsCommitmentOrBuilder() { + if (isCommitmentBuilder_ != null) { + return isCommitmentBuilder_.getMessageOrBuilder(); + } else { + return isCommitment_ == null + ? com.google.protobuf.BoolValue.getDefaultInstance() + : isCommitment_; + } + } + /** + * + * + *
+     * Whether a transferable SKU is commitment-based or not.
+     * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder> + getIsCommitmentFieldBuilder() { + if (isCommitmentBuilder_ == null) { + isCommitmentBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.BoolValue, + com.google.protobuf.BoolValue.Builder, + com.google.protobuf.BoolValueOrBuilder>( + getIsCommitment(), getParentForChildren(), isClean()); + isCommitment_ = null; + } + return isCommitmentBuilder_; + } + + private com.google.protobuf.Timestamp commitmentEndTimestamp_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + commitmentEndTimestampBuilder_; + /** + * + * + *
+     * Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + * + * @return Whether the commitmentEndTimestamp field is set. + */ + public boolean hasCommitmentEndTimestamp() { + return commitmentEndTimestampBuilder_ != null || commitmentEndTimestamp_ != null; + } + /** + * + * + *
+     * Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + * + * @return The commitmentEndTimestamp. + */ + public com.google.protobuf.Timestamp getCommitmentEndTimestamp() { + if (commitmentEndTimestampBuilder_ == null) { + return commitmentEndTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitmentEndTimestamp_; + } else { + return commitmentEndTimestampBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + */ + public Builder setCommitmentEndTimestamp(com.google.protobuf.Timestamp value) { + if (commitmentEndTimestampBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + commitmentEndTimestamp_ = value; + onChanged(); + } else { + commitmentEndTimestampBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + */ + public Builder setCommitmentEndTimestamp( + com.google.protobuf.Timestamp.Builder builderForValue) { + if (commitmentEndTimestampBuilder_ == null) { + commitmentEndTimestamp_ = builderForValue.build(); + onChanged(); + } else { + commitmentEndTimestampBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + */ + public Builder mergeCommitmentEndTimestamp(com.google.protobuf.Timestamp value) { + if (commitmentEndTimestampBuilder_ == null) { + if (commitmentEndTimestamp_ != null) { + commitmentEndTimestamp_ = + com.google.protobuf.Timestamp.newBuilder(commitmentEndTimestamp_) + .mergeFrom(value) + .buildPartial(); + } else { + commitmentEndTimestamp_ = value; + } + onChanged(); + } else { + commitmentEndTimestampBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + */ + public Builder clearCommitmentEndTimestamp() { + if (commitmentEndTimestampBuilder_ == null) { + commitmentEndTimestamp_ = null; + onChanged(); + } else { + commitmentEndTimestamp_ = null; + commitmentEndTimestampBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + */ + public com.google.protobuf.Timestamp.Builder getCommitmentEndTimestampBuilder() { + + onChanged(); + return getCommitmentEndTimestampFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + */ + public com.google.protobuf.TimestampOrBuilder getCommitmentEndTimestampOrBuilder() { + if (commitmentEndTimestampBuilder_ != null) { + return commitmentEndTimestampBuilder_.getMessageOrBuilder(); + } else { + return commitmentEndTimestamp_ == null + ? com.google.protobuf.Timestamp.getDefaultInstance() + : commitmentEndTimestamp_; + } + } + /** + * + * + *
+     * Commitment end timestamp.
+     * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getCommitmentEndTimestampFieldBuilder() { + if (commitmentEndTimestampBuilder_ == null) { + commitmentEndTimestampBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getCommitmentEndTimestamp(), getParentForChildren(), isClean()); + commitmentEndTimestamp_ = null; + } + return commitmentEndTimestampBuilder_; + } + + private com.google.cloud.channel.v1.TransferEligibility transferEligibility_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.TransferEligibility, + com.google.cloud.channel.v1.TransferEligibility.Builder, + com.google.cloud.channel.v1.TransferEligibilityOrBuilder> + transferEligibilityBuilder_; + /** + * + * + *
+     * Describes the transfer eligibility of a SKU.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + * + * @return Whether the transferEligibility field is set. + */ + public boolean hasTransferEligibility() { + return transferEligibilityBuilder_ != null || transferEligibility_ != null; + } + /** + * + * + *
+     * Describes the transfer eligibility of a SKU.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + * + * @return The transferEligibility. + */ + public com.google.cloud.channel.v1.TransferEligibility getTransferEligibility() { + if (transferEligibilityBuilder_ == null) { + return transferEligibility_ == null + ? com.google.cloud.channel.v1.TransferEligibility.getDefaultInstance() + : transferEligibility_; + } else { + return transferEligibilityBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Describes the transfer eligibility of a SKU.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + */ + public Builder setTransferEligibility(com.google.cloud.channel.v1.TransferEligibility value) { + if (transferEligibilityBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + transferEligibility_ = value; + onChanged(); + } else { + transferEligibilityBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Describes the transfer eligibility of a SKU.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + */ + public Builder setTransferEligibility( + com.google.cloud.channel.v1.TransferEligibility.Builder builderForValue) { + if (transferEligibilityBuilder_ == null) { + transferEligibility_ = builderForValue.build(); + onChanged(); + } else { + transferEligibilityBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Describes the transfer eligibility of a SKU.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + */ + public Builder mergeTransferEligibility(com.google.cloud.channel.v1.TransferEligibility value) { + if (transferEligibilityBuilder_ == null) { + if (transferEligibility_ != null) { + transferEligibility_ = + com.google.cloud.channel.v1.TransferEligibility.newBuilder(transferEligibility_) + .mergeFrom(value) + .buildPartial(); + } else { + transferEligibility_ = value; + } + onChanged(); + } else { + transferEligibilityBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Describes the transfer eligibility of a SKU.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + */ + public Builder clearTransferEligibility() { + if (transferEligibilityBuilder_ == null) { + transferEligibility_ = null; + onChanged(); + } else { + transferEligibility_ = null; + transferEligibilityBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Describes the transfer eligibility of a SKU.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + */ + public com.google.cloud.channel.v1.TransferEligibility.Builder getTransferEligibilityBuilder() { + + onChanged(); + return getTransferEligibilityFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Describes the transfer eligibility of a SKU.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + */ + public com.google.cloud.channel.v1.TransferEligibilityOrBuilder + getTransferEligibilityOrBuilder() { + if (transferEligibilityBuilder_ != null) { + return transferEligibilityBuilder_.getMessageOrBuilder(); + } else { + return transferEligibility_ == null + ? com.google.cloud.channel.v1.TransferEligibility.getDefaultInstance() + : transferEligibility_; + } + } + /** + * + * + *
+     * Describes the transfer eligibility of a SKU.
+     * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.TransferEligibility, + com.google.cloud.channel.v1.TransferEligibility.Builder, + com.google.cloud.channel.v1.TransferEligibilityOrBuilder> + getTransferEligibilityFieldBuilder() { + if (transferEligibilityBuilder_ == null) { + transferEligibilityBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.TransferEligibility, + com.google.cloud.channel.v1.TransferEligibility.Builder, + com.google.cloud.channel.v1.TransferEligibilityOrBuilder>( + getTransferEligibility(), getParentForChildren(), isClean()); + transferEligibility_ = null; + } + return transferEligibilityBuilder_; + } + + private com.google.cloud.channel.v1.Sku sku_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder> + skuBuilder_; + /** + * + * + *
+     * The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + * + * @return Whether the sku field is set. + */ + public boolean hasSku() { + return skuBuilder_ != null || sku_ != null; + } + /** + * + * + *
+     * The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + * + * @return The sku. + */ + public com.google.cloud.channel.v1.Sku getSku() { + if (skuBuilder_ == null) { + return sku_ == null ? com.google.cloud.channel.v1.Sku.getDefaultInstance() : sku_; + } else { + return skuBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + */ + public Builder setSku(com.google.cloud.channel.v1.Sku value) { + if (skuBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + sku_ = value; + onChanged(); + } else { + skuBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + */ + public Builder setSku(com.google.cloud.channel.v1.Sku.Builder builderForValue) { + if (skuBuilder_ == null) { + sku_ = builderForValue.build(); + onChanged(); + } else { + skuBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + */ + public Builder mergeSku(com.google.cloud.channel.v1.Sku value) { + if (skuBuilder_ == null) { + if (sku_ != null) { + sku_ = com.google.cloud.channel.v1.Sku.newBuilder(sku_).mergeFrom(value).buildPartial(); + } else { + sku_ = value; + } + onChanged(); + } else { + skuBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + */ + public Builder clearSku() { + if (skuBuilder_ == null) { + sku_ = null; + onChanged(); + } else { + sku_ = null; + skuBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + */ + public com.google.cloud.channel.v1.Sku.Builder getSkuBuilder() { + + onChanged(); + return getSkuFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + */ + public com.google.cloud.channel.v1.SkuOrBuilder getSkuOrBuilder() { + if (skuBuilder_ != null) { + return skuBuilder_.getMessageOrBuilder(); + } else { + return sku_ == null ? com.google.cloud.channel.v1.Sku.getDefaultInstance() : sku_; + } + } + /** + * + * + *
+     * The SKU pertaining to the provisioning resource as specified in the Offer.
+     * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder> + getSkuFieldBuilder() { + if (skuBuilder_ == null) { + skuBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Sku, + com.google.cloud.channel.v1.Sku.Builder, + com.google.cloud.channel.v1.SkuOrBuilder>( + getSku(), getParentForChildren(), isClean()); + sku_ = null; + } + return skuBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.TransferableSku) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.TransferableSku) + private static final com.google.cloud.channel.v1.TransferableSku DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.TransferableSku(); + } + + public static com.google.cloud.channel.v1.TransferableSku getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TransferableSku parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TransferableSku(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TransferableSku getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableSkuOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableSkuOrBuilder.java new file mode 100644 index 00000000..a1e0c327 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TransferableSkuOrBuilder.java @@ -0,0 +1,165 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +public interface TransferableSkuOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.TransferableSku) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Whether a transferable SKU is commitment-based or not.
+   * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + * + * @return Whether the isCommitment field is set. + */ + boolean hasIsCommitment(); + /** + * + * + *
+   * Whether a transferable SKU is commitment-based or not.
+   * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + * + * @return The isCommitment. + */ + com.google.protobuf.BoolValue getIsCommitment(); + /** + * + * + *
+   * Whether a transferable SKU is commitment-based or not.
+   * 
+ * + * .google.protobuf.BoolValue is_commitment = 6; + */ + com.google.protobuf.BoolValueOrBuilder getIsCommitmentOrBuilder(); + + /** + * + * + *
+   * Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + * + * @return Whether the commitmentEndTimestamp field is set. + */ + boolean hasCommitmentEndTimestamp(); + /** + * + * + *
+   * Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + * + * @return The commitmentEndTimestamp. + */ + com.google.protobuf.Timestamp getCommitmentEndTimestamp(); + /** + * + * + *
+   * Commitment end timestamp.
+   * 
+ * + * .google.protobuf.Timestamp commitment_end_timestamp = 7; + */ + com.google.protobuf.TimestampOrBuilder getCommitmentEndTimestampOrBuilder(); + + /** + * + * + *
+   * Describes the transfer eligibility of a SKU.
+   * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + * + * @return Whether the transferEligibility field is set. + */ + boolean hasTransferEligibility(); + /** + * + * + *
+   * Describes the transfer eligibility of a SKU.
+   * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + * + * @return The transferEligibility. + */ + com.google.cloud.channel.v1.TransferEligibility getTransferEligibility(); + /** + * + * + *
+   * Describes the transfer eligibility of a SKU.
+   * 
+ * + * .google.cloud.channel.v1.TransferEligibility transfer_eligibility = 9; + */ + com.google.cloud.channel.v1.TransferEligibilityOrBuilder getTransferEligibilityOrBuilder(); + + /** + * + * + *
+   * The SKU pertaining to the provisioning resource as specified in the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + * + * @return Whether the sku field is set. + */ + boolean hasSku(); + /** + * + * + *
+   * The SKU pertaining to the provisioning resource as specified in the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + * + * @return The sku. + */ + com.google.cloud.channel.v1.Sku getSku(); + /** + * + * + *
+   * The SKU pertaining to the provisioning resource as specified in the Offer.
+   * 
+ * + * .google.cloud.channel.v1.Sku sku = 11; + */ + com.google.cloud.channel.v1.SkuOrBuilder getSkuOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TrialSettings.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TrialSettings.java new file mode 100644 index 00000000..7f4df161 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TrialSettings.java @@ -0,0 +1,844 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Settings for trial offers.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TrialSettings} + */ +public final class TrialSettings extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.TrialSettings) + TrialSettingsOrBuilder { + private static final long serialVersionUID = 0L; + // Use TrialSettings.newBuilder() to construct. + private TrialSettings(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private TrialSettings() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new TrialSettings(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private TrialSettings( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + trial_ = input.readBool(); + break; + } + case 18: + { + com.google.protobuf.Timestamp.Builder subBuilder = null; + if (endTime_ != null) { + subBuilder = endTime_.toBuilder(); + } + endTime_ = + input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(endTime_); + endTime_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TrialSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TrialSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TrialSettings.class, + com.google.cloud.channel.v1.TrialSettings.Builder.class); + } + + public static final int TRIAL_FIELD_NUMBER = 1; + private boolean trial_; + /** + * + * + *
+   * Determines if the entitlement is in a trial or not:
+   * * `true` - The entitlement is in trial.
+   * * `false` - The entitlement is not in trial.
+   * 
+ * + * bool trial = 1; + * + * @return The trial. + */ + @java.lang.Override + public boolean getTrial() { + return trial_; + } + + public static final int END_TIME_FIELD_NUMBER = 2; + private com.google.protobuf.Timestamp endTime_; + /** + * + * + *
+   * Date when the trial ends. The value is in milliseconds
+   * using the UNIX Epoch format. See an example [Epoch
+   * converter](https://www.epochconverter.com).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + @java.lang.Override + public boolean hasEndTime() { + return endTime_ != null; + } + /** + * + * + *
+   * Date when the trial ends. The value is in milliseconds
+   * using the UNIX Epoch format. See an example [Epoch
+   * converter](https://www.epochconverter.com).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + @java.lang.Override + public com.google.protobuf.Timestamp getEndTime() { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + /** + * + * + *
+   * Date when the trial ends. The value is in milliseconds
+   * using the UNIX Epoch format. See an example [Epoch
+   * converter](https://www.epochconverter.com).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + @java.lang.Override + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + return getEndTime(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (trial_ != false) { + output.writeBool(1, trial_); + } + if (endTime_ != null) { + output.writeMessage(2, getEndTime()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (trial_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(1, trial_); + } + if (endTime_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getEndTime()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.TrialSettings)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.TrialSettings other = + (com.google.cloud.channel.v1.TrialSettings) obj; + + if (getTrial() != other.getTrial()) return false; + if (hasEndTime() != other.hasEndTime()) return false; + if (hasEndTime()) { + if (!getEndTime().equals(other.getEndTime())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + TRIAL_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getTrial()); + if (hasEndTime()) { + hash = (37 * hash) + END_TIME_FIELD_NUMBER; + hash = (53 * hash) + getEndTime().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.TrialSettings parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TrialSettings parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TrialSettings parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TrialSettings parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TrialSettings parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.TrialSettings parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TrialSettings parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TrialSettings parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TrialSettings parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TrialSettings parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.TrialSettings parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.TrialSettings parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.TrialSettings prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Settings for trial offers.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.TrialSettings} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.TrialSettings) + com.google.cloud.channel.v1.TrialSettingsOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TrialSettings_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TrialSettings_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.TrialSettings.class, + com.google.cloud.channel.v1.TrialSettings.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.TrialSettings.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + trial_ = false; + + if (endTimeBuilder_ == null) { + endTime_ = null; + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.EntitlementsProto + .internal_static_google_cloud_channel_v1_TrialSettings_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TrialSettings getDefaultInstanceForType() { + return com.google.cloud.channel.v1.TrialSettings.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.TrialSettings build() { + com.google.cloud.channel.v1.TrialSettings result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TrialSettings buildPartial() { + com.google.cloud.channel.v1.TrialSettings result = + new com.google.cloud.channel.v1.TrialSettings(this); + result.trial_ = trial_; + if (endTimeBuilder_ == null) { + result.endTime_ = endTime_; + } else { + result.endTime_ = endTimeBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.TrialSettings) { + return mergeFrom((com.google.cloud.channel.v1.TrialSettings) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.TrialSettings other) { + if (other == com.google.cloud.channel.v1.TrialSettings.getDefaultInstance()) return this; + if (other.getTrial() != false) { + setTrial(other.getTrial()); + } + if (other.hasEndTime()) { + mergeEndTime(other.getEndTime()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.TrialSettings parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.TrialSettings) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean trial_; + /** + * + * + *
+     * Determines if the entitlement is in a trial or not:
+     * * `true` - The entitlement is in trial.
+     * * `false` - The entitlement is not in trial.
+     * 
+ * + * bool trial = 1; + * + * @return The trial. + */ + @java.lang.Override + public boolean getTrial() { + return trial_; + } + /** + * + * + *
+     * Determines if the entitlement is in a trial or not:
+     * * `true` - The entitlement is in trial.
+     * * `false` - The entitlement is not in trial.
+     * 
+ * + * bool trial = 1; + * + * @param value The trial to set. + * @return This builder for chaining. + */ + public Builder setTrial(boolean value) { + + trial_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Determines if the entitlement is in a trial or not:
+     * * `true` - The entitlement is in trial.
+     * * `false` - The entitlement is not in trial.
+     * 
+ * + * bool trial = 1; + * + * @return This builder for chaining. + */ + public Builder clearTrial() { + + trial_ = false; + onChanged(); + return this; + } + + private com.google.protobuf.Timestamp endTime_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + endTimeBuilder_; + /** + * + * + *
+     * Date when the trial ends. The value is in milliseconds
+     * using the UNIX Epoch format. See an example [Epoch
+     * converter](https://www.epochconverter.com).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + public boolean hasEndTime() { + return endTimeBuilder_ != null || endTime_ != null; + } + /** + * + * + *
+     * Date when the trial ends. The value is in milliseconds
+     * using the UNIX Epoch format. See an example [Epoch
+     * converter](https://www.epochconverter.com).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + public com.google.protobuf.Timestamp getEndTime() { + if (endTimeBuilder_ == null) { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } else { + return endTimeBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Date when the trial ends. The value is in milliseconds
+     * using the UNIX Epoch format. See an example [Epoch
+     * converter](https://www.epochconverter.com).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + endTime_ = value; + onChanged(); + } else { + endTimeBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Date when the trial ends. The value is in milliseconds
+     * using the UNIX Epoch format. See an example [Epoch
+     * converter](https://www.epochconverter.com).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder setEndTime(com.google.protobuf.Timestamp.Builder builderForValue) { + if (endTimeBuilder_ == null) { + endTime_ = builderForValue.build(); + onChanged(); + } else { + endTimeBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Date when the trial ends. The value is in milliseconds
+     * using the UNIX Epoch format. See an example [Epoch
+     * converter](https://www.epochconverter.com).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder mergeEndTime(com.google.protobuf.Timestamp value) { + if (endTimeBuilder_ == null) { + if (endTime_ != null) { + endTime_ = + com.google.protobuf.Timestamp.newBuilder(endTime_).mergeFrom(value).buildPartial(); + } else { + endTime_ = value; + } + onChanged(); + } else { + endTimeBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Date when the trial ends. The value is in milliseconds
+     * using the UNIX Epoch format. See an example [Epoch
+     * converter](https://www.epochconverter.com).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public Builder clearEndTime() { + if (endTimeBuilder_ == null) { + endTime_ = null; + onChanged(); + } else { + endTime_ = null; + endTimeBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Date when the trial ends. The value is in milliseconds
+     * using the UNIX Epoch format. See an example [Epoch
+     * converter](https://www.epochconverter.com).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.Timestamp.Builder getEndTimeBuilder() { + + onChanged(); + return getEndTimeFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Date when the trial ends. The value is in milliseconds
+     * using the UNIX Epoch format. See an example [Epoch
+     * converter](https://www.epochconverter.com).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + public com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder() { + if (endTimeBuilder_ != null) { + return endTimeBuilder_.getMessageOrBuilder(); + } else { + return endTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : endTime_; + } + } + /** + * + * + *
+     * Date when the trial ends. The value is in milliseconds
+     * using the UNIX Epoch format. See an example [Epoch
+     * converter](https://www.epochconverter.com).
+     * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder> + getEndTimeFieldBuilder() { + if (endTimeBuilder_ == null) { + endTimeBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Timestamp, + com.google.protobuf.Timestamp.Builder, + com.google.protobuf.TimestampOrBuilder>( + getEndTime(), getParentForChildren(), isClean()); + endTime_ = null; + } + return endTimeBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.TrialSettings) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.TrialSettings) + private static final com.google.cloud.channel.v1.TrialSettings DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.TrialSettings(); + } + + public static com.google.cloud.channel.v1.TrialSettings getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public TrialSettings parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new TrialSettings(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.TrialSettings getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TrialSettingsOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TrialSettingsOrBuilder.java new file mode 100644 index 00000000..a8754d02 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/TrialSettingsOrBuilder.java @@ -0,0 +1,81 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/entitlements.proto + +package com.google.cloud.channel.v1; + +public interface TrialSettingsOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.TrialSettings) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Determines if the entitlement is in a trial or not:
+   * * `true` - The entitlement is in trial.
+   * * `false` - The entitlement is not in trial.
+   * 
+ * + * bool trial = 1; + * + * @return The trial. + */ + boolean getTrial(); + + /** + * + * + *
+   * Date when the trial ends. The value is in milliseconds
+   * using the UNIX Epoch format. See an example [Epoch
+   * converter](https://www.epochconverter.com).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return Whether the endTime field is set. + */ + boolean hasEndTime(); + /** + * + * + *
+   * Date when the trial ends. The value is in milliseconds
+   * using the UNIX Epoch format. See an example [Epoch
+   * converter](https://www.epochconverter.com).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + * + * @return The endTime. + */ + com.google.protobuf.Timestamp getEndTime(); + /** + * + * + *
+   * Date when the trial ends. The value is in milliseconds
+   * using the UNIX Epoch format. See an example [Epoch
+   * converter](https://www.epochconverter.com).
+   * 
+ * + * .google.protobuf.Timestamp end_time = 2; + */ + com.google.protobuf.TimestampOrBuilder getEndTimeOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateChannelPartnerLinkRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateChannelPartnerLinkRequest.java new file mode 100644 index 00000000..122d07f0 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateChannelPartnerLinkRequest.java @@ -0,0 +1,1275 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.UpdateChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink]
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.UpdateChannelPartnerLinkRequest} + */ +public final class UpdateChannelPartnerLinkRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.UpdateChannelPartnerLinkRequest) + UpdateChannelPartnerLinkRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateChannelPartnerLinkRequest.newBuilder() to construct. + private UpdateChannelPartnerLinkRequest( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateChannelPartnerLinkRequest() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateChannelPartnerLinkRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateChannelPartnerLinkRequest( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + + name_ = s; + break; + } + case 18: + { + com.google.cloud.channel.v1.ChannelPartnerLink.Builder subBuilder = null; + if (channelPartnerLink_ != null) { + subBuilder = channelPartnerLink_.toBuilder(); + } + channelPartnerLink_ = + input.readMessage( + com.google.cloud.channel.v1.ChannelPartnerLink.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(channelPartnerLink_); + channelPartnerLink_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_UpdateChannelPartnerLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_UpdateChannelPartnerLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest.class, + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest.Builder.class); + } + + public static final int NAME_FIELD_NUMBER = 1; + private volatile java.lang.Object name_; + /** + * + * + *
+   * Required. The resource name of the channel partner link to cancel.
+   * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+   * where {id} is the Cloud Identity ID of the partner.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + @java.lang.Override + public java.lang.String getName() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } + } + /** + * + * + *
+   * Required. The resource name of the channel partner link to cancel.
+   * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+   * where {id} is the Cloud Identity ID of the partner.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + @java.lang.Override + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int CHANNEL_PARTNER_LINK_FIELD_NUMBER = 2; + private com.google.cloud.channel.v1.ChannelPartnerLink channelPartnerLink_; + /** + * + * + *
+   * Required. The channel partner link to update. Only field
+   * channel_partner_link.link_state is allowed to be updated.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the channelPartnerLink field is set. + */ + @java.lang.Override + public boolean hasChannelPartnerLink() { + return channelPartnerLink_ != null; + } + /** + * + * + *
+   * Required. The channel partner link to update. Only field
+   * channel_partner_link.link_state is allowed to be updated.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The channelPartnerLink. + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLink getChannelPartnerLink() { + return channelPartnerLink_ == null + ? com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance() + : channelPartnerLink_; + } + /** + * + * + *
+   * Required. The channel partner link to update. Only field
+   * channel_partner_link.link_state is allowed to be updated.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder getChannelPartnerLinkOrBuilder() { + return getChannelPartnerLink(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * Required. The update mask that applies to the resource.
+   * The only allowable value for update mask is
+   * channel_partner_link.link_state.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * Required. The update mask that applies to the resource.
+   * The only allowable value for update mask is
+   * channel_partner_link.link_state.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * Required. The update mask that applies to the resource.
+   * The only allowable value for update mask is
+   * channel_partner_link.link_state.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (!getNameBytes().isEmpty()) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_); + } + if (channelPartnerLink_ != null) { + output.writeMessage(2, getChannelPartnerLink()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (!getNameBytes().isEmpty()) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_); + } + if (channelPartnerLink_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getChannelPartnerLink()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest other = + (com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest) obj; + + if (!getName().equals(other.getName())) return false; + if (hasChannelPartnerLink() != other.hasChannelPartnerLink()) return false; + if (hasChannelPartnerLink()) { + if (!getChannelPartnerLink().equals(other.getChannelPartnerLink())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + hash = (37 * hash) + NAME_FIELD_NUMBER; + hash = (53 * hash) + getName().hashCode(); + if (hasChannelPartnerLink()) { + hash = (37 * hash) + CHANNEL_PARTNER_LINK_FIELD_NUMBER; + hash = (53 * hash) + getChannelPartnerLink().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder( + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.UpdateChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink]
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.UpdateChannelPartnerLinkRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.UpdateChannelPartnerLinkRequest) + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_UpdateChannelPartnerLinkRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_UpdateChannelPartnerLinkRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest.class, + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + name_ = ""; + + if (channelPartnerLinkBuilder_ == null) { + channelPartnerLink_ = null; + } else { + channelPartnerLink_ = null; + channelPartnerLinkBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_UpdateChannelPartnerLinkRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest build() { + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest buildPartial() { + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest result = + new com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest(this); + result.name_ = name_; + if (channelPartnerLinkBuilder_ == null) { + result.channelPartnerLink_ = channelPartnerLink_; + } else { + result.channelPartnerLink_ = channelPartnerLinkBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest) { + return mergeFrom((com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest other) { + if (other == com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest.getDefaultInstance()) + return this; + if (!other.getName().isEmpty()) { + name_ = other.name_; + onChanged(); + } + if (other.hasChannelPartnerLink()) { + mergeChannelPartnerLink(other.getChannelPartnerLink()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private java.lang.Object name_ = ""; + /** + * + * + *
+     * Required. The resource name of the channel partner link to cancel.
+     * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+     * where {id} is the Cloud Identity ID of the partner.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + public java.lang.String getName() { + java.lang.Object ref = name_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + name_ = s; + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the channel partner link to cancel.
+     * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+     * where {id} is the Cloud Identity ID of the partner.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + public com.google.protobuf.ByteString getNameBytes() { + java.lang.Object ref = name_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + name_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Required. The resource name of the channel partner link to cancel.
+     * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+     * where {id} is the Cloud Identity ID of the partner.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The name to set. + * @return This builder for chaining. + */ + public Builder setName(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + + name_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the channel partner link to cancel.
+     * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+     * where {id} is the Cloud Identity ID of the partner.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return This builder for chaining. + */ + public Builder clearName() { + + name_ = getDefaultInstance().getName(); + onChanged(); + return this; + } + /** + * + * + *
+     * Required. The resource name of the channel partner link to cancel.
+     * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+     * where {id} is the Cloud Identity ID of the partner.
+     * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @param value The bytes for name to set. + * @return This builder for chaining. + */ + public Builder setNameBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + + name_ = value; + onChanged(); + return this; + } + + private com.google.cloud.channel.v1.ChannelPartnerLink channelPartnerLink_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ChannelPartnerLink, + com.google.cloud.channel.v1.ChannelPartnerLink.Builder, + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder> + channelPartnerLinkBuilder_; + /** + * + * + *
+     * Required. The channel partner link to update. Only field
+     * channel_partner_link.link_state is allowed to be updated.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the channelPartnerLink field is set. + */ + public boolean hasChannelPartnerLink() { + return channelPartnerLinkBuilder_ != null || channelPartnerLink_ != null; + } + /** + * + * + *
+     * Required. The channel partner link to update. Only field
+     * channel_partner_link.link_state is allowed to be updated.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The channelPartnerLink. + */ + public com.google.cloud.channel.v1.ChannelPartnerLink getChannelPartnerLink() { + if (channelPartnerLinkBuilder_ == null) { + return channelPartnerLink_ == null + ? com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance() + : channelPartnerLink_; + } else { + return channelPartnerLinkBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The channel partner link to update. Only field
+     * channel_partner_link.link_state is allowed to be updated.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setChannelPartnerLink(com.google.cloud.channel.v1.ChannelPartnerLink value) { + if (channelPartnerLinkBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + channelPartnerLink_ = value; + onChanged(); + } else { + channelPartnerLinkBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The channel partner link to update. Only field
+     * channel_partner_link.link_state is allowed to be updated.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setChannelPartnerLink( + com.google.cloud.channel.v1.ChannelPartnerLink.Builder builderForValue) { + if (channelPartnerLinkBuilder_ == null) { + channelPartnerLink_ = builderForValue.build(); + onChanged(); + } else { + channelPartnerLinkBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The channel partner link to update. Only field
+     * channel_partner_link.link_state is allowed to be updated.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeChannelPartnerLink(com.google.cloud.channel.v1.ChannelPartnerLink value) { + if (channelPartnerLinkBuilder_ == null) { + if (channelPartnerLink_ != null) { + channelPartnerLink_ = + com.google.cloud.channel.v1.ChannelPartnerLink.newBuilder(channelPartnerLink_) + .mergeFrom(value) + .buildPartial(); + } else { + channelPartnerLink_ = value; + } + onChanged(); + } else { + channelPartnerLinkBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The channel partner link to update. Only field
+     * channel_partner_link.link_state is allowed to be updated.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearChannelPartnerLink() { + if (channelPartnerLinkBuilder_ == null) { + channelPartnerLink_ = null; + onChanged(); + } else { + channelPartnerLink_ = null; + channelPartnerLinkBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The channel partner link to update. Only field
+     * channel_partner_link.link_state is allowed to be updated.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.ChannelPartnerLink.Builder getChannelPartnerLinkBuilder() { + + onChanged(); + return getChannelPartnerLinkFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The channel partner link to update. Only field
+     * channel_partner_link.link_state is allowed to be updated.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder + getChannelPartnerLinkOrBuilder() { + if (channelPartnerLinkBuilder_ != null) { + return channelPartnerLinkBuilder_.getMessageOrBuilder(); + } else { + return channelPartnerLink_ == null + ? com.google.cloud.channel.v1.ChannelPartnerLink.getDefaultInstance() + : channelPartnerLink_; + } + } + /** + * + * + *
+     * Required. The channel partner link to update. Only field
+     * channel_partner_link.link_state is allowed to be updated.
+     * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ChannelPartnerLink, + com.google.cloud.channel.v1.ChannelPartnerLink.Builder, + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder> + getChannelPartnerLinkFieldBuilder() { + if (channelPartnerLinkBuilder_ == null) { + channelPartnerLinkBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.ChannelPartnerLink, + com.google.cloud.channel.v1.ChannelPartnerLink.Builder, + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder>( + getChannelPartnerLink(), getParentForChildren(), isClean()); + channelPartnerLink_ = null; + } + return channelPartnerLinkBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * Required. The update mask that applies to the resource.
+     * The only allowable value for update mask is
+     * channel_partner_link.link_state.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * Required. The update mask that applies to the resource.
+     * The only allowable value for update mask is
+     * channel_partner_link.link_state.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. The update mask that applies to the resource.
+     * The only allowable value for update mask is
+     * channel_partner_link.link_state.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask that applies to the resource.
+     * The only allowable value for update mask is
+     * channel_partner_link.link_state.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask that applies to the resource.
+     * The only allowable value for update mask is
+     * channel_partner_link.link_state.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. The update mask that applies to the resource.
+     * The only allowable value for update mask is
+     * channel_partner_link.link_state.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. The update mask that applies to the resource.
+     * The only allowable value for update mask is
+     * channel_partner_link.link_state.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. The update mask that applies to the resource.
+     * The only allowable value for update mask is
+     * channel_partner_link.link_state.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * Required. The update mask that applies to the resource.
+     * The only allowable value for update mask is
+     * channel_partner_link.link_state.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.UpdateChannelPartnerLinkRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.UpdateChannelPartnerLinkRequest) + private static final com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest(); + } + + public static com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateChannelPartnerLinkRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateChannelPartnerLinkRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.UpdateChannelPartnerLinkRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateChannelPartnerLinkRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateChannelPartnerLinkRequestOrBuilder.java new file mode 100644 index 00000000..40ee3ac8 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateChannelPartnerLinkRequestOrBuilder.java @@ -0,0 +1,142 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface UpdateChannelPartnerLinkRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.UpdateChannelPartnerLinkRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. The resource name of the channel partner link to cancel.
+   * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+   * where {id} is the Cloud Identity ID of the partner.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The name. + */ + java.lang.String getName(); + /** + * + * + *
+   * Required. The resource name of the channel partner link to cancel.
+   * The name takes the format: accounts/{account_id}/channelPartnerLinks/{id}
+   * where {id} is the Cloud Identity ID of the partner.
+   * 
+ * + * string name = 1 [(.google.api.field_behavior) = REQUIRED]; + * + * @return The bytes for name. + */ + com.google.protobuf.ByteString getNameBytes(); + + /** + * + * + *
+   * Required. The channel partner link to update. Only field
+   * channel_partner_link.link_state is allowed to be updated.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the channelPartnerLink field is set. + */ + boolean hasChannelPartnerLink(); + /** + * + * + *
+   * Required. The channel partner link to update. Only field
+   * channel_partner_link.link_state is allowed to be updated.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The channelPartnerLink. + */ + com.google.cloud.channel.v1.ChannelPartnerLink getChannelPartnerLink(); + /** + * + * + *
+   * Required. The channel partner link to update. Only field
+   * channel_partner_link.link_state is allowed to be updated.
+   * 
+ * + * + * .google.cloud.channel.v1.ChannelPartnerLink channel_partner_link = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.ChannelPartnerLinkOrBuilder getChannelPartnerLinkOrBuilder(); + + /** + * + * + *
+   * Required. The update mask that applies to the resource.
+   * The only allowable value for update mask is
+   * channel_partner_link.link_state.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * Required. The update mask that applies to the resource.
+   * The only allowable value for update mask is
+   * channel_partner_link.link_state.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * Required. The update mask that applies to the resource.
+   * The only allowable value for update mask is
+   * channel_partner_link.link_state.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateCustomerRequest.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateCustomerRequest.java new file mode 100644 index 00000000..6a033b30 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateCustomerRequest.java @@ -0,0 +1,1038 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Request message for [CloudChannelService.UpdateCustomer][google.cloud.channel.v1.CloudChannelService.UpdateCustomer].
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.UpdateCustomerRequest} + */ +public final class UpdateCustomerRequest extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.UpdateCustomerRequest) + UpdateCustomerRequestOrBuilder { + private static final long serialVersionUID = 0L; + // Use UpdateCustomerRequest.newBuilder() to construct. + private UpdateCustomerRequest(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private UpdateCustomerRequest() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new UpdateCustomerRequest(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private UpdateCustomerRequest( + 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: + { + com.google.cloud.channel.v1.Customer.Builder subBuilder = null; + if (customer_ != null) { + subBuilder = customer_.toBuilder(); + } + customer_ = + input.readMessage( + com.google.cloud.channel.v1.Customer.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(customer_); + customer_ = subBuilder.buildPartial(); + } + + break; + } + case 26: + { + com.google.protobuf.FieldMask.Builder subBuilder = null; + if (updateMask_ != null) { + subBuilder = updateMask_.toBuilder(); + } + updateMask_ = + input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(updateMask_); + updateMask_ = subBuilder.buildPartial(); + } + + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_UpdateCustomerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_UpdateCustomerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.UpdateCustomerRequest.class, + com.google.cloud.channel.v1.UpdateCustomerRequest.Builder.class); + } + + public static final int CUSTOMER_FIELD_NUMBER = 2; + private com.google.cloud.channel.v1.Customer customer_; + /** + * + * + *
+   * Required. New contents of the customer.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customer field is set. + */ + @java.lang.Override + public boolean hasCustomer() { + return customer_ != null; + } + /** + * + * + *
+   * Required. New contents of the customer.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customer. + */ + @java.lang.Override + public com.google.cloud.channel.v1.Customer getCustomer() { + return customer_ == null + ? com.google.cloud.channel.v1.Customer.getDefaultInstance() + : customer_; + } + /** + * + * + *
+   * Required. New contents of the customer.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + @java.lang.Override + public com.google.cloud.channel.v1.CustomerOrBuilder getCustomerOrBuilder() { + return getCustomer(); + } + + public static final int UPDATE_MASK_FIELD_NUMBER = 3; + private com.google.protobuf.FieldMask updateMask_; + /** + * + * + *
+   * The update mask that applies to the resource.
+   * Optional.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + @java.lang.Override + public boolean hasUpdateMask() { + return updateMask_ != null; + } + /** + * + * + *
+   * The update mask that applies to the resource.
+   * Optional.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + @java.lang.Override + public com.google.protobuf.FieldMask getUpdateMask() { + return updateMask_ == null ? com.google.protobuf.FieldMask.getDefaultInstance() : updateMask_; + } + /** + * + * + *
+   * The update mask that applies to the resource.
+   * Optional.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + @java.lang.Override + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + return getUpdateMask(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (customer_ != null) { + output.writeMessage(2, getCustomer()); + } + if (updateMask_ != null) { + output.writeMessage(3, getUpdateMask()); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (customer_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCustomer()); + } + if (updateMask_ != null) { + size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateMask()); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.UpdateCustomerRequest)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.UpdateCustomerRequest other = + (com.google.cloud.channel.v1.UpdateCustomerRequest) obj; + + if (hasCustomer() != other.hasCustomer()) return false; + if (hasCustomer()) { + if (!getCustomer().equals(other.getCustomer())) return false; + } + if (hasUpdateMask() != other.hasUpdateMask()) return false; + if (hasUpdateMask()) { + if (!getUpdateMask().equals(other.getUpdateMask())) return false; + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (hasCustomer()) { + hash = (37 * hash) + CUSTOMER_FIELD_NUMBER; + hash = (53 * hash) + getCustomer().hashCode(); + } + if (hasUpdateMask()) { + hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER; + hash = (53 * hash) + getUpdateMask().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseDelimitedFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.UpdateCustomerRequest prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new 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 [CloudChannelService.UpdateCustomer][google.cloud.channel.v1.CloudChannelService.UpdateCustomer].
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.UpdateCustomerRequest} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.UpdateCustomerRequest) + com.google.cloud.channel.v1.UpdateCustomerRequestOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_UpdateCustomerRequest_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_UpdateCustomerRequest_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.UpdateCustomerRequest.class, + com.google.cloud.channel.v1.UpdateCustomerRequest.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.UpdateCustomerRequest.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.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 (customerBuilder_ == null) { + customer_ = null; + } else { + customer_ = null; + customerBuilder_ = null; + } + if (updateMaskBuilder_ == null) { + updateMask_ = null; + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.ServiceProto + .internal_static_google_cloud_channel_v1_UpdateCustomerRequest_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.UpdateCustomerRequest getDefaultInstanceForType() { + return com.google.cloud.channel.v1.UpdateCustomerRequest.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.UpdateCustomerRequest build() { + com.google.cloud.channel.v1.UpdateCustomerRequest result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.UpdateCustomerRequest buildPartial() { + com.google.cloud.channel.v1.UpdateCustomerRequest result = + new com.google.cloud.channel.v1.UpdateCustomerRequest(this); + if (customerBuilder_ == null) { + result.customer_ = customer_; + } else { + result.customer_ = customerBuilder_.build(); + } + if (updateMaskBuilder_ == null) { + result.updateMask_ = updateMask_; + } else { + result.updateMask_ = updateMaskBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.UpdateCustomerRequest) { + return mergeFrom((com.google.cloud.channel.v1.UpdateCustomerRequest) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.UpdateCustomerRequest other) { + if (other == com.google.cloud.channel.v1.UpdateCustomerRequest.getDefaultInstance()) + return this; + if (other.hasCustomer()) { + mergeCustomer(other.getCustomer()); + } + if (other.hasUpdateMask()) { + mergeUpdateMask(other.getUpdateMask()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.UpdateCustomerRequest parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.cloud.channel.v1.UpdateCustomerRequest) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private com.google.cloud.channel.v1.Customer customer_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Customer, + com.google.cloud.channel.v1.Customer.Builder, + com.google.cloud.channel.v1.CustomerOrBuilder> + customerBuilder_; + /** + * + * + *
+     * Required. New contents of the customer.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customer field is set. + */ + public boolean hasCustomer() { + return customerBuilder_ != null || customer_ != null; + } + /** + * + * + *
+     * Required. New contents of the customer.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customer. + */ + public com.google.cloud.channel.v1.Customer getCustomer() { + if (customerBuilder_ == null) { + return customer_ == null + ? com.google.cloud.channel.v1.Customer.getDefaultInstance() + : customer_; + } else { + return customerBuilder_.getMessage(); + } + } + /** + * + * + *
+     * Required. New contents of the customer.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomer(com.google.cloud.channel.v1.Customer value) { + if (customerBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + customer_ = value; + onChanged(); + } else { + customerBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * Required. New contents of the customer.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder setCustomer(com.google.cloud.channel.v1.Customer.Builder builderForValue) { + if (customerBuilder_ == null) { + customer_ = builderForValue.build(); + onChanged(); + } else { + customerBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * Required. New contents of the customer.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder mergeCustomer(com.google.cloud.channel.v1.Customer value) { + if (customerBuilder_ == null) { + if (customer_ != null) { + customer_ = + com.google.cloud.channel.v1.Customer.newBuilder(customer_) + .mergeFrom(value) + .buildPartial(); + } else { + customer_ = value; + } + onChanged(); + } else { + customerBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * Required. New contents of the customer.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public Builder clearCustomer() { + if (customerBuilder_ == null) { + customer_ = null; + onChanged(); + } else { + customer_ = null; + customerBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * Required. New contents of the customer.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.Customer.Builder getCustomerBuilder() { + + onChanged(); + return getCustomerFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Required. New contents of the customer.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + public com.google.cloud.channel.v1.CustomerOrBuilder getCustomerOrBuilder() { + if (customerBuilder_ != null) { + return customerBuilder_.getMessageOrBuilder(); + } else { + return customer_ == null + ? com.google.cloud.channel.v1.Customer.getDefaultInstance() + : customer_; + } + } + /** + * + * + *
+     * Required. New contents of the customer.
+     * 
+ * + * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Customer, + com.google.cloud.channel.v1.Customer.Builder, + com.google.cloud.channel.v1.CustomerOrBuilder> + getCustomerFieldBuilder() { + if (customerBuilder_ == null) { + customerBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.cloud.channel.v1.Customer, + com.google.cloud.channel.v1.Customer.Builder, + com.google.cloud.channel.v1.CustomerOrBuilder>( + getCustomer(), getParentForChildren(), isClean()); + customer_ = null; + } + return customerBuilder_; + } + + private com.google.protobuf.FieldMask updateMask_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + updateMaskBuilder_; + /** + * + * + *
+     * The update mask that applies to the resource.
+     * Optional.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + public boolean hasUpdateMask() { + return updateMaskBuilder_ != null || updateMask_ != null; + } + /** + * + * + *
+     * The update mask that applies to the resource.
+     * Optional.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + public com.google.protobuf.FieldMask getUpdateMask() { + if (updateMaskBuilder_ == null) { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } else { + return updateMaskBuilder_.getMessage(); + } + } + /** + * + * + *
+     * The update mask that applies to the resource.
+     * Optional.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + updateMask_ = value; + onChanged(); + } else { + updateMaskBuilder_.setMessage(value); + } + + return this; + } + /** + * + * + *
+     * The update mask that applies to the resource.
+     * Optional.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder setUpdateMask(com.google.protobuf.FieldMask.Builder builderForValue) { + if (updateMaskBuilder_ == null) { + updateMask_ = builderForValue.build(); + onChanged(); + } else { + updateMaskBuilder_.setMessage(builderForValue.build()); + } + + return this; + } + /** + * + * + *
+     * The update mask that applies to the resource.
+     * Optional.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder mergeUpdateMask(com.google.protobuf.FieldMask value) { + if (updateMaskBuilder_ == null) { + if (updateMask_ != null) { + updateMask_ = + com.google.protobuf.FieldMask.newBuilder(updateMask_).mergeFrom(value).buildPartial(); + } else { + updateMask_ = value; + } + onChanged(); + } else { + updateMaskBuilder_.mergeFrom(value); + } + + return this; + } + /** + * + * + *
+     * The update mask that applies to the resource.
+     * Optional.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public Builder clearUpdateMask() { + if (updateMaskBuilder_ == null) { + updateMask_ = null; + onChanged(); + } else { + updateMask_ = null; + updateMaskBuilder_ = null; + } + + return this; + } + /** + * + * + *
+     * The update mask that applies to the resource.
+     * Optional.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMask.Builder getUpdateMaskBuilder() { + + onChanged(); + return getUpdateMaskFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * The update mask that applies to the resource.
+     * Optional.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + public com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder() { + if (updateMaskBuilder_ != null) { + return updateMaskBuilder_.getMessageOrBuilder(); + } else { + return updateMask_ == null + ? com.google.protobuf.FieldMask.getDefaultInstance() + : updateMask_; + } + } + /** + * + * + *
+     * The update mask that applies to the resource.
+     * Optional.
+     * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder> + getUpdateMaskFieldBuilder() { + if (updateMaskBuilder_ == null) { + updateMaskBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.FieldMask, + com.google.protobuf.FieldMask.Builder, + com.google.protobuf.FieldMaskOrBuilder>( + getUpdateMask(), getParentForChildren(), isClean()); + updateMask_ = null; + } + return updateMaskBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.UpdateCustomerRequest) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.UpdateCustomerRequest) + private static final com.google.cloud.channel.v1.UpdateCustomerRequest DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.UpdateCustomerRequest(); + } + + public static com.google.cloud.channel.v1.UpdateCustomerRequest getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public UpdateCustomerRequest parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new UpdateCustomerRequest(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.UpdateCustomerRequest getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateCustomerRequestOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateCustomerRequestOrBuilder.java new file mode 100644 index 00000000..1c029d1d --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/UpdateCustomerRequestOrBuilder.java @@ -0,0 +1,101 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/service.proto + +package com.google.cloud.channel.v1; + +public interface UpdateCustomerRequestOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.UpdateCustomerRequest) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Required. New contents of the customer.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return Whether the customer field is set. + */ + boolean hasCustomer(); + /** + * + * + *
+   * Required. New contents of the customer.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + * + * @return The customer. + */ + com.google.cloud.channel.v1.Customer getCustomer(); + /** + * + * + *
+   * Required. New contents of the customer.
+   * 
+ * + * .google.cloud.channel.v1.Customer customer = 2 [(.google.api.field_behavior) = REQUIRED]; + * + */ + com.google.cloud.channel.v1.CustomerOrBuilder getCustomerOrBuilder(); + + /** + * + * + *
+   * The update mask that applies to the resource.
+   * Optional.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return Whether the updateMask field is set. + */ + boolean hasUpdateMask(); + /** + * + * + *
+   * The update mask that applies to the resource.
+   * Optional.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + * + * @return The updateMask. + */ + com.google.protobuf.FieldMask getUpdateMask(); + /** + * + * + *
+   * The update mask that applies to the resource.
+   * Optional.
+   * 
+ * + * .google.protobuf.FieldMask update_mask = 3; + */ + com.google.protobuf.FieldMaskOrBuilder getUpdateMaskOrBuilder(); +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Value.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Value.java new file mode 100644 index 00000000..682df63b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/Value.java @@ -0,0 +1,1249 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/common.proto + +package com.google.cloud.channel.v1; + +/** + * + * + *
+ * Data type and value of a parameter.
+ * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Value} + */ +public final class Value extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.cloud.channel.v1.Value) + ValueOrBuilder { + private static final long serialVersionUID = 0L; + // Use Value.newBuilder() to construct. + private Value(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private Value() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Value(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private Value( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + kindCase_ = 1; + kind_ = input.readInt64(); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + kindCase_ = 2; + kind_ = s; + break; + } + case 25: + { + kindCase_ = 3; + kind_ = input.readDouble(); + break; + } + case 34: + { + com.google.protobuf.Any.Builder subBuilder = null; + if (kindCase_ == 4) { + subBuilder = ((com.google.protobuf.Any) kind_).toBuilder(); + } + kind_ = input.readMessage(com.google.protobuf.Any.parser(), extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom((com.google.protobuf.Any) kind_); + kind_ = subBuilder.buildPartial(); + } + kindCase_ = 4; + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Value.class, + com.google.cloud.channel.v1.Value.Builder.class); + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public enum KindCase + implements + com.google.protobuf.Internal.EnumLite, + com.google.protobuf.AbstractMessage.InternalOneOfEnum { + INT64_VALUE(1), + STRING_VALUE(2), + DOUBLE_VALUE(3), + PROTO_VALUE(4), + KIND_NOT_SET(0); + private final int value; + + private KindCase(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 KindCase valueOf(int value) { + return forNumber(value); + } + + public static KindCase forNumber(int value) { + switch (value) { + case 1: + return INT64_VALUE; + case 2: + return STRING_VALUE; + case 3: + return DOUBLE_VALUE; + case 4: + return PROTO_VALUE; + case 0: + return KIND_NOT_SET; + default: + return null; + } + } + + public int getNumber() { + return this.value; + } + }; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public static final int INT64_VALUE_FIELD_NUMBER = 1; + /** + * + * + *
+   * Represents an int64 value.
+   * 
+ * + * int64 int64_value = 1; + * + * @return The int64Value. + */ + @java.lang.Override + public long getInt64Value() { + if (kindCase_ == 1) { + return (java.lang.Long) kind_; + } + return 0L; + } + + public static final int STRING_VALUE_FIELD_NUMBER = 2; + /** + * + * + *
+   * Represents a string value.
+   * 
+ * + * string string_value = 2; + * + * @return The stringValue. + */ + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 2) { + kind_ = s; + } + return s; + } + } + /** + * + * + *
+   * Represents a string value.
+   * 
+ * + * string string_value = 2; + * + * @return The bytes for stringValue. + */ + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 2) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + + public static final int DOUBLE_VALUE_FIELD_NUMBER = 3; + /** + * + * + *
+   * Represents a double value.
+   * 
+ * + * double double_value = 3; + * + * @return The doubleValue. + */ + @java.lang.Override + public double getDoubleValue() { + if (kindCase_ == 3) { + return (java.lang.Double) kind_; + } + return 0D; + } + + public static final int PROTO_VALUE_FIELD_NUMBER = 4; + /** + * + * + *
+   * Represents an 'Any' proto value.
+   * 
+ * + * .google.protobuf.Any proto_value = 4; + * + * @return Whether the protoValue field is set. + */ + @java.lang.Override + public boolean hasProtoValue() { + return kindCase_ == 4; + } + /** + * + * + *
+   * Represents an 'Any' proto value.
+   * 
+ * + * .google.protobuf.Any proto_value = 4; + * + * @return The protoValue. + */ + @java.lang.Override + public com.google.protobuf.Any getProtoValue() { + if (kindCase_ == 4) { + return (com.google.protobuf.Any) kind_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + /** + * + * + *
+   * Represents an 'Any' proto value.
+   * 
+ * + * .google.protobuf.Any proto_value = 4; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getProtoValueOrBuilder() { + if (kindCase_ == 4) { + return (com.google.protobuf.Any) kind_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + + private byte memoizedIsInitialized = -1; + + @java.lang.Override + public final boolean isInitialized() { + byte isInitialized = memoizedIsInitialized; + if (isInitialized == 1) return true; + if (isInitialized == 0) return false; + + memoizedIsInitialized = 1; + return true; + } + + @java.lang.Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { + if (kindCase_ == 1) { + output.writeInt64(1, (long) ((java.lang.Long) kind_)); + } + if (kindCase_ == 2) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, kind_); + } + if (kindCase_ == 3) { + output.writeDouble(3, (double) ((java.lang.Double) kind_)); + } + if (kindCase_ == 4) { + output.writeMessage(4, (com.google.protobuf.Any) kind_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (kindCase_ == 1) { + size += + com.google.protobuf.CodedOutputStream.computeInt64Size( + 1, (long) ((java.lang.Long) kind_)); + } + if (kindCase_ == 2) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, kind_); + } + if (kindCase_ == 3) { + size += + com.google.protobuf.CodedOutputStream.computeDoubleSize( + 3, (double) ((java.lang.Double) kind_)); + } + if (kindCase_ == 4) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 4, (com.google.protobuf.Any) kind_); + } + size += unknownFields.getSerializedSize(); + memoizedSize = size; + return size; + } + + @java.lang.Override + public boolean equals(final java.lang.Object obj) { + if (obj == this) { + return true; + } + if (!(obj instanceof com.google.cloud.channel.v1.Value)) { + return super.equals(obj); + } + com.google.cloud.channel.v1.Value other = (com.google.cloud.channel.v1.Value) obj; + + if (!getKindCase().equals(other.getKindCase())) return false; + switch (kindCase_) { + case 1: + if (getInt64Value() != other.getInt64Value()) return false; + break; + case 2: + if (!getStringValue().equals(other.getStringValue())) return false; + break; + case 3: + if (java.lang.Double.doubleToLongBits(getDoubleValue()) + != java.lang.Double.doubleToLongBits(other.getDoubleValue())) return false; + break; + case 4: + if (!getProtoValue().equals(other.getProtoValue())) return false; + break; + case 0: + default: + } + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + switch (kindCase_) { + case 1: + hash = (37 * hash) + INT64_VALUE_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getInt64Value()); + break; + case 2: + hash = (37 * hash) + STRING_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getStringValue().hashCode(); + break; + case 3: + hash = (37 * hash) + DOUBLE_VALUE_FIELD_NUMBER; + hash = + (53 * hash) + + com.google.protobuf.Internal.hashLong( + java.lang.Double.doubleToLongBits(getDoubleValue())); + break; + case 4: + hash = (37 * hash) + PROTO_VALUE_FIELD_NUMBER; + hash = (53 * hash) + getProtoValue().hashCode(); + break; + case 0: + default: + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.cloud.channel.v1.Value parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Value parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Value parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Value parseFrom( + com.google.protobuf.ByteString data, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Value parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.cloud.channel.v1.Value parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Value parseFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Value parseFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Value parseDelimitedFrom(java.io.InputStream input) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Value parseDelimitedFrom( + java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException( + PARSER, input, extensionRegistry); + } + + public static com.google.cloud.channel.v1.Value parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.cloud.channel.v1.Value parseFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException( + PARSER, input, extensionRegistry); + } + + @java.lang.Override + public Builder newBuilderForType() { + return newBuilder(); + } + + public static Builder newBuilder() { + return DEFAULT_INSTANCE.toBuilder(); + } + + public static Builder newBuilder(com.google.cloud.channel.v1.Value prototype) { + return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); + } + + @java.lang.Override + public Builder toBuilder() { + return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this); + } + + @java.lang.Override + protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + Builder builder = new Builder(parent); + return builder; + } + /** + * + * + *
+   * Data type and value of a parameter.
+   * 
+ * + * Protobuf type {@code google.cloud.channel.v1.Value} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.cloud.channel.v1.Value) + com.google.cloud.channel.v1.ValueOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_Value_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_Value_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.cloud.channel.v1.Value.class, + com.google.cloud.channel.v1.Value.Builder.class); + } + + // Construct using com.google.cloud.channel.v1.Value.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + kindCase_ = 0; + kind_ = null; + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.cloud.channel.v1.CommonProto + .internal_static_google_cloud_channel_v1_Value_descriptor; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Value getDefaultInstanceForType() { + return com.google.cloud.channel.v1.Value.getDefaultInstance(); + } + + @java.lang.Override + public com.google.cloud.channel.v1.Value build() { + com.google.cloud.channel.v1.Value result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Value buildPartial() { + com.google.cloud.channel.v1.Value result = new com.google.cloud.channel.v1.Value(this); + if (kindCase_ == 1) { + result.kind_ = kind_; + } + if (kindCase_ == 2) { + result.kind_ = kind_; + } + if (kindCase_ == 3) { + result.kind_ = kind_; + } + if (kindCase_ == 4) { + if (protoValueBuilder_ == null) { + result.kind_ = kind_; + } else { + result.kind_ = protoValueBuilder_.build(); + } + } + result.kindCase_ = kindCase_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.cloud.channel.v1.Value) { + return mergeFrom((com.google.cloud.channel.v1.Value) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.cloud.channel.v1.Value other) { + if (other == com.google.cloud.channel.v1.Value.getDefaultInstance()) return this; + switch (other.getKindCase()) { + case INT64_VALUE: + { + setInt64Value(other.getInt64Value()); + break; + } + case STRING_VALUE: + { + kindCase_ = 2; + kind_ = other.kind_; + onChanged(); + break; + } + case DOUBLE_VALUE: + { + setDoubleValue(other.getDoubleValue()); + break; + } + case PROTO_VALUE: + { + mergeProtoValue(other.getProtoValue()); + break; + } + case KIND_NOT_SET: + { + break; + } + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.cloud.channel.v1.Value parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.cloud.channel.v1.Value) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int kindCase_ = 0; + private java.lang.Object kind_; + + public KindCase getKindCase() { + return KindCase.forNumber(kindCase_); + } + + public Builder clearKind() { + kindCase_ = 0; + kind_ = null; + onChanged(); + return this; + } + + /** + * + * + *
+     * Represents an int64 value.
+     * 
+ * + * int64 int64_value = 1; + * + * @return The int64Value. + */ + public long getInt64Value() { + if (kindCase_ == 1) { + return (java.lang.Long) kind_; + } + return 0L; + } + /** + * + * + *
+     * Represents an int64 value.
+     * 
+ * + * int64 int64_value = 1; + * + * @param value The int64Value to set. + * @return This builder for chaining. + */ + public Builder setInt64Value(long value) { + kindCase_ = 1; + kind_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents an int64 value.
+     * 
+ * + * int64 int64_value = 1; + * + * @return This builder for chaining. + */ + public Builder clearInt64Value() { + if (kindCase_ == 1) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + /** + * + * + *
+     * Represents a string value.
+     * 
+ * + * string string_value = 2; + * + * @return The stringValue. + */ + @java.lang.Override + public java.lang.String getStringValue() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + if (kindCase_ == 2) { + kind_ = s; + } + return s; + } else { + return (java.lang.String) ref; + } + } + /** + * + * + *
+     * Represents a string value.
+     * 
+ * + * string string_value = 2; + * + * @return The bytes for stringValue. + */ + @java.lang.Override + public com.google.protobuf.ByteString getStringValueBytes() { + java.lang.Object ref = ""; + if (kindCase_ == 2) { + ref = kind_; + } + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + if (kindCase_ == 2) { + kind_ = b; + } + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } + } + /** + * + * + *
+     * Represents a string value.
+     * 
+ * + * string string_value = 2; + * + * @param value The stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValue(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + kindCase_ = 2; + kind_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a string value.
+     * 
+ * + * string string_value = 2; + * + * @return This builder for chaining. + */ + public Builder clearStringValue() { + if (kindCase_ == 2) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + /** + * + * + *
+     * Represents a string value.
+     * 
+ * + * string string_value = 2; + * + * @param value The bytes for stringValue to set. + * @return This builder for chaining. + */ + public Builder setStringValueBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + kindCase_ = 2; + kind_ = value; + onChanged(); + return this; + } + + /** + * + * + *
+     * Represents a double value.
+     * 
+ * + * double double_value = 3; + * + * @return The doubleValue. + */ + public double getDoubleValue() { + if (kindCase_ == 3) { + return (java.lang.Double) kind_; + } + return 0D; + } + /** + * + * + *
+     * Represents a double value.
+     * 
+ * + * double double_value = 3; + * + * @param value The doubleValue to set. + * @return This builder for chaining. + */ + public Builder setDoubleValue(double value) { + kindCase_ = 3; + kind_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * Represents a double value.
+     * 
+ * + * double double_value = 3; + * + * @return This builder for chaining. + */ + public Builder clearDoubleValue() { + if (kindCase_ == 3) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + return this; + } + + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + protoValueBuilder_; + /** + * + * + *
+     * Represents an 'Any' proto value.
+     * 
+ * + * .google.protobuf.Any proto_value = 4; + * + * @return Whether the protoValue field is set. + */ + @java.lang.Override + public boolean hasProtoValue() { + return kindCase_ == 4; + } + /** + * + * + *
+     * Represents an 'Any' proto value.
+     * 
+ * + * .google.protobuf.Any proto_value = 4; + * + * @return The protoValue. + */ + @java.lang.Override + public com.google.protobuf.Any getProtoValue() { + if (protoValueBuilder_ == null) { + if (kindCase_ == 4) { + return (com.google.protobuf.Any) kind_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } else { + if (kindCase_ == 4) { + return protoValueBuilder_.getMessage(); + } + return com.google.protobuf.Any.getDefaultInstance(); + } + } + /** + * + * + *
+     * Represents an 'Any' proto value.
+     * 
+ * + * .google.protobuf.Any proto_value = 4; + */ + public Builder setProtoValue(com.google.protobuf.Any value) { + if (protoValueBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + kind_ = value; + onChanged(); + } else { + protoValueBuilder_.setMessage(value); + } + kindCase_ = 4; + return this; + } + /** + * + * + *
+     * Represents an 'Any' proto value.
+     * 
+ * + * .google.protobuf.Any proto_value = 4; + */ + public Builder setProtoValue(com.google.protobuf.Any.Builder builderForValue) { + if (protoValueBuilder_ == null) { + kind_ = builderForValue.build(); + onChanged(); + } else { + protoValueBuilder_.setMessage(builderForValue.build()); + } + kindCase_ = 4; + return this; + } + /** + * + * + *
+     * Represents an 'Any' proto value.
+     * 
+ * + * .google.protobuf.Any proto_value = 4; + */ + public Builder mergeProtoValue(com.google.protobuf.Any value) { + if (protoValueBuilder_ == null) { + if (kindCase_ == 4 && kind_ != com.google.protobuf.Any.getDefaultInstance()) { + kind_ = + com.google.protobuf.Any.newBuilder((com.google.protobuf.Any) kind_) + .mergeFrom(value) + .buildPartial(); + } else { + kind_ = value; + } + onChanged(); + } else { + if (kindCase_ == 4) { + protoValueBuilder_.mergeFrom(value); + } + protoValueBuilder_.setMessage(value); + } + kindCase_ = 4; + return this; + } + /** + * + * + *
+     * Represents an 'Any' proto value.
+     * 
+ * + * .google.protobuf.Any proto_value = 4; + */ + public Builder clearProtoValue() { + if (protoValueBuilder_ == null) { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + onChanged(); + } + } else { + if (kindCase_ == 4) { + kindCase_ = 0; + kind_ = null; + } + protoValueBuilder_.clear(); + } + return this; + } + /** + * + * + *
+     * Represents an 'Any' proto value.
+     * 
+ * + * .google.protobuf.Any proto_value = 4; + */ + public com.google.protobuf.Any.Builder getProtoValueBuilder() { + return getProtoValueFieldBuilder().getBuilder(); + } + /** + * + * + *
+     * Represents an 'Any' proto value.
+     * 
+ * + * .google.protobuf.Any proto_value = 4; + */ + @java.lang.Override + public com.google.protobuf.AnyOrBuilder getProtoValueOrBuilder() { + if ((kindCase_ == 4) && (protoValueBuilder_ != null)) { + return protoValueBuilder_.getMessageOrBuilder(); + } else { + if (kindCase_ == 4) { + return (com.google.protobuf.Any) kind_; + } + return com.google.protobuf.Any.getDefaultInstance(); + } + } + /** + * + * + *
+     * Represents an 'Any' proto value.
+     * 
+ * + * .google.protobuf.Any proto_value = 4; + */ + private com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder> + getProtoValueFieldBuilder() { + if (protoValueBuilder_ == null) { + if (!(kindCase_ == 4)) { + kind_ = com.google.protobuf.Any.getDefaultInstance(); + } + protoValueBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.protobuf.Any, + com.google.protobuf.Any.Builder, + com.google.protobuf.AnyOrBuilder>( + (com.google.protobuf.Any) kind_, getParentForChildren(), isClean()); + kind_ = null; + } + kindCase_ = 4; + onChanged(); + ; + return protoValueBuilder_; + } + + @java.lang.Override + public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.setUnknownFields(unknownFields); + } + + @java.lang.Override + public final Builder mergeUnknownFields( + final com.google.protobuf.UnknownFieldSet unknownFields) { + return super.mergeUnknownFields(unknownFields); + } + + // @@protoc_insertion_point(builder_scope:google.cloud.channel.v1.Value) + } + + // @@protoc_insertion_point(class_scope:google.cloud.channel.v1.Value) + private static final com.google.cloud.channel.v1.Value DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.cloud.channel.v1.Value(); + } + + public static com.google.cloud.channel.v1.Value getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public Value parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new Value(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.cloud.channel.v1.Value getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } +} diff --git a/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ValueOrBuilder.java b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ValueOrBuilder.java new file mode 100644 index 00000000..46492fc2 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/java/com/google/cloud/channel/v1/ValueOrBuilder.java @@ -0,0 +1,113 @@ +/* + * Copyright 2020 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/cloud/channel/v1/common.proto + +package com.google.cloud.channel.v1; + +public interface ValueOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.cloud.channel.v1.Value) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+   * Represents an int64 value.
+   * 
+ * + * int64 int64_value = 1; + * + * @return The int64Value. + */ + long getInt64Value(); + + /** + * + * + *
+   * Represents a string value.
+   * 
+ * + * string string_value = 2; + * + * @return The stringValue. + */ + java.lang.String getStringValue(); + /** + * + * + *
+   * Represents a string value.
+   * 
+ * + * string string_value = 2; + * + * @return The bytes for stringValue. + */ + com.google.protobuf.ByteString getStringValueBytes(); + + /** + * + * + *
+   * Represents a double value.
+   * 
+ * + * double double_value = 3; + * + * @return The doubleValue. + */ + double getDoubleValue(); + + /** + * + * + *
+   * Represents an 'Any' proto value.
+   * 
+ * + * .google.protobuf.Any proto_value = 4; + * + * @return Whether the protoValue field is set. + */ + boolean hasProtoValue(); + /** + * + * + *
+   * Represents an 'Any' proto value.
+   * 
+ * + * .google.protobuf.Any proto_value = 4; + * + * @return The protoValue. + */ + com.google.protobuf.Any getProtoValue(); + /** + * + * + *
+   * Represents an 'Any' proto value.
+   * 
+ * + * .google.protobuf.Any proto_value = 4; + */ + com.google.protobuf.AnyOrBuilder getProtoValueOrBuilder(); + + public com.google.cloud.channel.v1.Value.KindCase getKindCase(); +} diff --git a/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/channel_partner_links.proto b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/channel_partner_links.proto new file mode 100644 index 00000000..688af897 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/channel_partner_links.proto @@ -0,0 +1,90 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.channel.v1; + +import "google/api/field_behavior.proto"; +import "google/cloud/channel/v1/common.proto"; +import "google/protobuf/timestamp.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel"; +option java_multiple_files = true; +option java_outer_classname = "ChannelPartnerLinksProto"; +option java_package = "com.google.cloud.channel.v1"; + +// The level of granularity the [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] will display. +enum ChannelPartnerLinkView { + // The default / unset value. + // The API will default to the BASIC view. + UNSPECIFIED = 0; + + // Includes all fields except the + // [ChannelPartnerLink.channel_partner_cloud_identity_info][google.cloud.channel.v1.ChannelPartnerLink.channel_partner_cloud_identity_info]. + BASIC = 1; + + // Includes all fields. + FULL = 2; +} + +// ChannelPartnerLinkState represents state of a channel partner link. +enum ChannelPartnerLinkState { + // The state is not specified. + CHANNEL_PARTNER_LINK_STATE_UNSPECIFIED = 0; + + // An invitation has been sent to the reseller to create a channel partner + // link. + INVITED = 1; + + // Status when the reseller is active. + ACTIVE = 2; + + // Status when the reseller has been revoked by the distributor. + REVOKED = 3; + + // Status when the reseller is suspended by Google or distributor. + SUSPENDED = 4; +} + +// Entity representing a link between distributors and their indirect +// resellers in an n-tier resale channel. +message ChannelPartnerLink { + // Output only. Resource name for the channel partner link, in the format + // accounts/{account_id}/channelPartnerLinks/{id}. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Cloud Identity ID of the linked reseller. + string reseller_cloud_identity_id = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. State of the channel partner link. + ChannelPartnerLinkState link_state = 3 [(google.api.field_behavior) = REQUIRED]; + + // Output only. URI of the web page where partner accepts the link invitation. + string invite_link_uri = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of when the channel partner link is created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp of when the channel partner link is updated. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Public identifier that a customer must use to generate a transfer token + // to move to this distributor-reseller combination. + string public_id = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Cloud Identity info of the channel partner (IR). + CloudIdentityInfo channel_partner_cloud_identity_info = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/common.proto b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/common.proto new file mode 100644 index 00000000..ec8aef9b --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/common.proto @@ -0,0 +1,146 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.channel.v1; + +import "google/api/field_behavior.proto"; +import "google/protobuf/any.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel"; +option java_multiple_files = true; +option java_outer_classname = "CommonProto"; +option java_package = "com.google.cloud.channel.v1"; + +// Required Edu Attributes +message EduData { + // Enum to specify the institute type. + enum InstituteType { + // Default value. This state doesn't show unless an error occurs. + INSTITUTE_TYPE_UNSPECIFIED = 0; + + // Elementary/Secondary Schools & Districts + K12 = 1; + + // Higher Education Universities & Colleges + UNIVERSITY = 2; + } + + // Number of students and staff the institute has. + enum InstituteSize { + // Default value. This state doesn't show unless an error occurs. + INSTITUTE_SIZE_UNSPECIFIED = 0; + + // 1 - 100 + SIZE_1_100 = 1; + + // 101 - 500 + SIZE_101_500 = 2; + + // 501 - 1,000 + SIZE_501_1000 = 3; + + // 1,001 - 2,000 + SIZE_1001_2000 = 4; + + // 2,001 - 5,000 + SIZE_2001_5000 = 5; + + // 5,001 - 10,000 + SIZE_5001_10000 = 6; + + // 10,001 + + SIZE_10001_OR_MORE = 7; + } + + // Designated institute type of customer. + InstituteType institute_type = 1; + + // Size of the institute. + InstituteSize institute_size = 2; + + // Web address for the edu customer's institution. + string website = 3; +} + +// Cloud Identity information for the Cloud Channel Customer. +message CloudIdentityInfo { + // CustomerType of the customer + enum CustomerType { + // Default value. This state doesn't show unless an error occurs. + CUSTOMER_TYPE_UNSPECIFIED = 0; + + // Domain-owning customer which needs domain verification to use services. + DOMAIN = 1; + + // Team customer which needs email verification to use services. + TEAM = 2; + } + + // CustomerType indicates verification type needed for using services. + CustomerType customer_type = 1; + + // Output only. The primary domain name. + string primary_domain = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Whether the domain is verified. + bool is_domain_verified = 4; + + // The alternate email. + string alternate_email = 6; + + // Phone number associated with the Cloud Identity. + string phone_number = 7; + + // Language code. + string language_code = 8; + + // Output only. URI of Customer's Admin console dashboard. + string admin_console_uri = 10 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Edu information about the customer. + EduData edu_data = 22; +} + +// Data type and value of a parameter. +message Value { + // The kind of value. + oneof kind { + // Represents an int64 value. + int64 int64_value = 1; + + // Represents a string value. + string string_value = 2; + + // Represents a double value. + double double_value = 3; + + // Represents an 'Any' proto value. + google.protobuf.Any proto_value = 4; + } +} + +// Information needed to create an Admin User for Google Workspace. +message AdminUser { + // Primary email of the admin user. + string email = 1; + + // Given name of the admin user. + string given_name = 2; + + // Family name of the admin user. + string family_name = 3; +} diff --git a/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/customers.proto b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/customers.proto new file mode 100644 index 00000000..7cfb1835 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/customers.proto @@ -0,0 +1,113 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.channel.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/channel/v1/common.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/postal_address.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel"; +option java_multiple_files = true; +option java_outer_classname = "CustomersProto"; +option java_package = "com.google.cloud.channel.v1"; + +// Entity representing a customer of a reseller or distributor. +message Customer { + option (google.api.resource) = { + type: "cloudchannel.googleapis.com/Customer" + pattern: "accounts/{account}/customers/{customer}" + }; + + // Output only. Resource name of the customer. + // Format: accounts/{account_id}/customers/{customer_id} + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. Name of the organization that the customer entity represents. + string org_display_name = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. Address of the organization of the customer entity. + // Region and zip codes are required to enforce US laws and embargoes. + // Language code is discarded. Use the Customer-level language code to set the + // customer's language. + google.type.PostalAddress org_postal_address = 3 [(google.api.field_behavior) = REQUIRED]; + + // Primary contact info. + ContactInfo primary_contact_info = 4; + + // Secondary contact email. + // Alternate email and primary contact email are required to have different + // domains if primary contact email is present. + // When creating admin.google.com accounts, users get notified credentials at + // this email. This email address is also used as a recovery email. + string alternate_email = 5; + + // Required. Primary domain used by the customer. + // Domain of primary contact email is required to be same as the provided + // domain. + string domain = 6 [(google.api.field_behavior) = REQUIRED]; + + // Output only. The time at which the customer is created. + google.protobuf.Timestamp create_time = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the customer is updated. + google.protobuf.Timestamp update_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Customer's cloud_identity_id. + // Populated only if a Cloud Identity resource exists for this customer. + string cloud_identity_id = 9 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more + // information, see + // https://www.unicode.org/reports/tr35/#Unicode_locale_identifier. + string language_code = 10 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Cloud Identity information for the customer. + // Populated only if a Cloud Identity account exists for this customer. + CloudIdentityInfo cloud_identity_info = 12 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Cloud Identity ID of the customer's channel partner. + // Populated only if a channel partner exists for this customer. + string channel_partner_id = 13; +} + +// Contact information for a customer account. +message ContactInfo { + // First name of the contact in the customer account. + string first_name = 1; + + // Last name of the contact in the customer account. + string last_name = 2; + + // Output only. Display name of the contact in the customer account. + // Populated by combining customer first name and last name. + string display_name = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Email of the contact in the customer account. + // Email is required for entitlements that need creation of admin.google.com + // accounts. The email will be the username used in credentials to access the + // admin.google.com account. + string email = 5; + + // Optional. Job title of the contact in the customer account. + string title = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Phone number of the contact in the customer account. + string phone = 7; +} diff --git a/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/entitlements.proto b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/entitlements.proto new file mode 100644 index 00000000..b2509daf --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/entitlements.proto @@ -0,0 +1,245 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.channel.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/channel/v1/common.proto"; +import "google/cloud/channel/v1/offers.proto"; +import "google/cloud/channel/v1/products.proto"; +import "google/protobuf/timestamp.proto"; +import "google/protobuf/wrappers.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel"; +option java_multiple_files = true; +option java_outer_classname = "EntitlementsProto"; +option java_package = "com.google.cloud.channel.v1"; + +// An entitlement is a representation of a customer's ability to use a service. +message Entitlement { + option (google.api.resource) = { + type: "cloudchannel.googleapis.com/Entitlement" + pattern: "accounts/{account}/customers/{customer}/entitlements/{entitlement}" + }; + + // Indicates the current provisioning state of the entitlement. + enum ProvisioningState { + // Default value. This state doesn't show unless an error occurs. + PROVISIONING_STATE_UNSPECIFIED = 0; + + // The entitlement is currently active. + ACTIVE = 1; + + // The entitlement is currently suspended. + SUSPENDED = 5; + } + + // Suspension reason for an entitlement if [provisioning_state][google.cloud.channel.v1.Entitlement.provisioning_state] = SUSPENDED. + enum SuspensionReason { + // Default value. This state doesn't show unless an error occurs. + SUSPENSION_REASON_UNSPECIFIED = 0; + + // Entitlement was manually suspended by the Reseller. + RESELLER_INITIATED = 1; + + // Trial ended. + TRIAL_ENDED = 2; + + // Entitlement renewal was canceled. + RENEWAL_WITH_TYPE_CANCEL = 3; + + // Entitlement was automatically suspended on creation for pending ToS + // acceptance on customer. + PENDING_TOS_ACCEPTANCE = 4; + + // Other reasons (internal reasons, abuse, etc.). + OTHER = 100; + } + + // Output only. Resource name of an entitlement in the form: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id}. + string name = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the entitlement is created. + google.protobuf.Timestamp create_time = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time at which the entitlement is updated. + google.protobuf.Timestamp update_time = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Required. The offer resource name for which the entitlement is to be + // created. Takes the form: accounts/{account_id}/offers/{offer_id}. + string offer = 8 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Offer" + } + ]; + + // Commitment settings for a commitment-based Offer. + // Required for commitment based offers. + CommitmentSettings commitment_settings = 12; + + // Output only. Current provisioning state of the entitlement. + ProvisioningState provisioning_state = 13 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Service provisioning details for the entitlement. + ProvisionedService provisioned_service = 16 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Enumerable of all current suspension reasons for an entitlement. + repeated SuspensionReason suspension_reasons = 18 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. This purchase order (PO) information is for resellers to use for their + // company tracking usage. If a purchaseOrderId value is given, it appears in + // the API responses and shows up in the invoice. The property accepts up to + // 80 plain text characters. + string purchase_order_id = 19 [(google.api.field_behavior) = OPTIONAL]; + + // Output only. Settings for trial offers. + TrialSettings trial_settings = 21 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Association information to other entitlements. + AssociationInfo association_info = 23; + + // Extended entitlement parameters. When creating an entitlement, valid + // parameters' names and values are defined in the offer's parameter + // definitions. + repeated Parameter parameters = 26; +} + +// Definition for extended entitlement parameters. +message Parameter { + // Name of the parameter. + string name = 1; + + // Value of the parameter. + Value value = 2; + + // Output only. Specifies whether this parameter is allowed to be changed. For example, for + // a Google Workspace Business Starter entitlement in commitment plan, + // num_units is editable when entitlement is active. + bool editable = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Association links that an entitlement has to other entitlements. +message AssociationInfo { + // The name of the base entitlement, for which this entitlement is an add-on. + string base_entitlement = 1 [(google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Entitlement" + }]; +} + +// Service provisioned for an entitlement. +message ProvisionedService { + // Output only. Provisioning ID of the entitlement. For Google Workspace, this would be the + // underlying Subscription ID. + string provisioning_id = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The product pertaining to the provisioning resource as specified in the + // Offer. + string product_id = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The SKU pertaining to the provisioning resource as specified in the Offer. + string sku_id = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Commitment settings for commitment-based offers. +message CommitmentSettings { + // Output only. Commitment start timestamp. + google.protobuf.Timestamp start_time = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Commitment end timestamp. + google.protobuf.Timestamp end_time = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Optional. Renewal settings applicable for a commitment-based Offer. + RenewalSettings renewal_settings = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Renewal settings for renewable Offers. +message RenewalSettings { + // If false, the plan will be completed at the end date. + bool enable_renewal = 1; + + // If true and enable_renewal = true, the unit (for example seats or licenses) + // will be set to the number of active units at renewal time. + bool resize_unit_count = 2; + + // Describes how a reseller will be billed. + PaymentPlan payment_plan = 5; + + // Describes how frequently the reseller will be billed, such as + // once per month. + Period payment_cycle = 6; +} + +// Settings for trial offers. +message TrialSettings { + // Determines if the entitlement is in a trial or not: + // + // * `true` - The entitlement is in trial. + // * `false` - The entitlement is not in trial. + bool trial = 1; + + // Date when the trial ends. The value is in milliseconds + // using the UNIX Epoch format. See an example [Epoch + // converter](https://www.epochconverter.com). + google.protobuf.Timestamp end_time = 2; +} + +// TransferableSku represents information a reseller needs to view existing +// provisioned services for a customer that they do not own. +// Read-only. +message TransferableSku { + // Whether a transferable SKU is commitment-based or not. + google.protobuf.BoolValue is_commitment = 6; + + // Commitment end timestamp. + google.protobuf.Timestamp commitment_end_timestamp = 7; + + // Describes the transfer eligibility of a SKU. + TransferEligibility transfer_eligibility = 9; + + // The SKU pertaining to the provisioning resource as specified in the Offer. + Sku sku = 11; +} + +// Specifies transfer eligibility of a SKU. +message TransferEligibility { + // Reason of ineligibility. + enum Reason { + // Reason is not available. + REASON_UNSPECIFIED = 0; + + // Reseller needs to accept TOS before transferring the SKU. + PENDING_TOS_ACCEPTANCE = 1; + + // Reseller not eligible to sell the SKU. + SKU_NOT_ELIGIBLE = 2; + + // SKU subscription is suspended + SKU_SUSPENDED = 3; + } + + // Whether reseller is eligible to transfer the SKU. + bool is_eligible = 1; + + // Localized description if reseller is not eligible to transfer the SKU. + string description = 2; + + // Specified the reason for ineligibility. + Reason ineligibility_reason = 3; +} diff --git a/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/offers.proto b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/offers.proto new file mode 100644 index 00000000..fef7e067 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/offers.proto @@ -0,0 +1,323 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.channel.v1; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/channel/v1/common.proto"; +import "google/cloud/channel/v1/products.proto"; +import "google/protobuf/timestamp.proto"; +import "google/type/money.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel"; +option java_multiple_files = true; +option java_outer_classname = "OffersProto"; +option java_package = "com.google.cloud.channel.v1"; + +// Constraints type for Promotional offers. +enum PromotionalOrderType { + // Not used. + PROMOTIONAL_TYPE_UNSPECIFIED = 0; + + // Order used for new customers, trial conversions and upgrades. + NEW_UPGRADE = 1; + + // All orders for transferring an existing customer. + TRANSFER = 2; + + // Orders for modifying an existing customer's promotion on the same SKU. + PROMOTION_SWITCH = 3; +} + +// Describes how the reseller will be billed. +enum PaymentPlan { + // Not used. + PAYMENT_PLAN_UNSPECIFIED = 0; + + // Commitment. + COMMITMENT = 1; + + // No commitment. + FLEXIBLE = 2; + + // Free. + FREE = 3; + + // Trial. + TRIAL = 4; + + // Price and ordering not available through API. + OFFLINE = 5; +} + +// Specifies when the payment needs to happen. +enum PaymentType { + // Not used. + PAYMENT_TYPE_UNSPECIFIED = 0; + + // Prepay. Amount has to be paid before service is rendered. + PREPAY = 1; + + // Postpay. Reseller is charged at the end of the Payment cycle. + POSTPAY = 2; +} + +// Represents the type for a monetizable resource(any entity on which billing +// happens). For example, this could be MINUTES for Google Voice and GB for +// Google Drive. One SKU can map to multiple monetizable resources. +enum ResourceType { + // Not used. + RESOURCE_TYPE_UNSPECIFIED = 0; + + // Seat. + SEAT = 1; + + // Monthly active user. + MAU = 2; + + // GB (used for storage SKUs). + GB = 3; + + // Active licensed users(for Voice SKUs). + LICENSED_USER = 4; + + // Voice usage. + MINUTES = 5; + + // For IaaS SKUs like Google Cloud Platform, monetization is based on usage + // accrued on your billing account irrespective of the type of monetizable + // resource. This enum represents an aggregated resource/container for all + // usage SKUs on a billing account. Currently, only applicable to Google Cloud + // Platform. + IAAS_USAGE = 6; + + // For Google Cloud Platform subscriptions like Anthos or SAP. + SUBSCRIPTION = 7; +} + +// Period Type. +enum PeriodType { + // Not used. + PERIOD_TYPE_UNSPECIFIED = 0; + + // Day. + DAY = 1; + + // Month. + MONTH = 2; + + // Year. + YEAR = 3; +} + +// Represents an offer made to resellers for purchase. +// An offer is associated with a [Sku][google.cloud.channel.v1.Sku], has a plan for payment, a price, and +// defines the constraints for buying. +message Offer { + option (google.api.resource) = { + type: "cloudchannel.googleapis.com/Offer" + pattern: "accounts/{account}/offers/{offer}" + }; + + // Resource Name of the Offer. + // Format: accounts/{account_id}/offers/{offer_id} + string name = 1; + + // Marketing information for the Offer. + MarketingInfo marketing_info = 2; + + // SKU the offer is associated with. + Sku sku = 3; + + // Describes the payment plan for the Offer. + Plan plan = 4; + + // Constraints on transacting the Offer. + Constraints constraints = 5; + + // Price for each monetizable resource type. + repeated PriceByResource price_by_resources = 6; + + // Start of the Offer validity time. + google.protobuf.Timestamp start_time = 7; + + // Output only. End of the Offer validity time. + google.protobuf.Timestamp end_time = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Parameters required to use current Offer to purchase. + repeated ParameterDefinition parameter_definitions = 9; +} + +// Parameter's definition. Specifies what parameter is required to use the +// current Offer to purchase. +message ParameterDefinition { + // Data type of the parameter. + enum ParameterType { + // Not used. + PARAMETER_TYPE_UNSPECIFIED = 0; + + // Int64 type. + INT64 = 1; + + // String type. + STRING = 2; + + // Double type. + DOUBLE = 3; + } + + // Name of the parameter. + string name = 1; + + // Data type of the parameter. Minimal value, Maximum value and allowed values + // will use specified data type here. + ParameterType parameter_type = 2; + + // Minimal value of the parameter, if applicable. Inclusive. For example, + // minimal commitment when purchasing Anthos is 0.01. + // Applicable to INT64 and DOUBLE parameter types. + Value min_value = 3; + + // Maximum value of the parameter, if applicable. Inclusive. For example, + // maximum seats when purchasing Google Workspace Business Standard. + // Applicable to INT64 and DOUBLE parameter types. + Value max_value = 4; + + // If not empty, parameter values must be drawn from this list. + // For example, [us-west1, us-west2, ...] + // Applicable to STRING parameter type. + repeated Value allowed_values = 5; + + // If set to true, parameter is optional to purchase this Offer. + bool optional = 6; +} + +// Represents the constraints for buying the Offer. +message Constraints { + // Represents constraints required to purchase the Offer for a customer. + CustomerConstraints customer_constraints = 1; +} + +// Represents constraints required to purchase the Offer for a customer. +message CustomerConstraints { + // Allowed geographical regions of the customer. + repeated string allowed_regions = 1; + + // Allowed Customer Type. + repeated CloudIdentityInfo.CustomerType allowed_customer_types = 2; + + // Allowed Promotional Order Type. Present for Promotional offers. + repeated PromotionalOrderType promotional_order_types = 3; +} + +// The payment plan for the Offer. Describes how to make a payment. +message Plan { + // Describes how a reseller will be billed. + PaymentPlan payment_plan = 1; + + // Specifies when the payment needs to happen. + PaymentType payment_type = 2; + + // Describes how frequently the reseller will be billed, such as + // once per month. + Period payment_cycle = 3; + + // Present for Offers with a trial period. + // For trial-only Offers, a paid service needs to start before the trial + // period ends for continued service. + // For Regular Offers with a trial period, the regular pricing goes into + // effect when trial period ends, or if paid service is started before the end + // of the trial period. + Period trial_period = 4; +} + +// Represents price by resource type. +message PriceByResource { + // Resource Type. Example: SEAT + ResourceType resource_type = 1; + + // Price of the Offer. Present if there are no price phases. + Price price = 2; + + // Specifies the price by time range. + repeated PricePhase price_phases = 3; +} + +// Represents the price of the Offer. +message Price { + // Base price. + google.type.Money base_price = 1; + + // Discount percentage, represented as decimal. + // For example, a 20% discount will be represent as 0.2. + double discount = 2; + + // Effective Price after applying the discounts. + google.type.Money effective_price = 3; + + // Link to external price list, such as link to Google Voice rate card. + string external_price_uri = 4; +} + +// Specifies the price by the duration of months. +// For example, a 20% discount for the first six months, then a 10% discount +// starting on the seventh month. +message PricePhase { + // Defines the phase period type. + PeriodType period_type = 1; + + // Defines first period for the phase. + int32 first_period = 2; + + // Defines first period for the phase. + int32 last_period = 3; + + // Price of the phase. Present if there are no price tiers. + Price price = 4; + + // Price by the resource tiers. + repeated PriceTier price_tiers = 5; +} + +// Defines price at resource tier level. +// For example, an offer with following definition : +// +// * Tier 1: Provide 25% discount for all seats between 1 and 25. +// * Tier 2: Provide 10% discount for all seats between 26 and 100. +// * Tier 3: Provide flat 15% discount for all seats above 100. +// +// Each of these tiers is represented as a PriceTier. +message PriceTier { + // First resource for which the tier price applies. + int32 first_resource = 1; + + // Last resource for which the tier price applies. + int32 last_resource = 2; + + // Price of the tier. + Price price = 3; +} + +// Represents period in days/months/years. +message Period { + // Total duration of Period Type defined. + int32 duration = 1; + + // Period Type. + PeriodType period_type = 2; +} diff --git a/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/operations.proto b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/operations.proto new file mode 100644 index 00000000..46aa5f82 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/operations.proto @@ -0,0 +1,69 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.channel.v1; + +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel"; +option java_multiple_files = true; +option java_outer_classname = "OperationsProto"; +option java_package = "com.google.cloud.channel.v1"; + +// Provides contextual information about a [google.longrunning.Operation][google.longrunning.Operation]. +message OperationMetadata { + // RPCs that return a Long Running Operation. + enum OperationType { + // Default value. This state doesn't show unless an error occurs. + OPERATION_TYPE_UNSPECIFIED = 0; + + // Long Running Operation was triggered by CreateEntitlement. + CREATE_ENTITLEMENT = 1; + + // Long Running Operation was triggered by ChangeRenewalSettings. + CHANGE_RENEWAL_SETTINGS = 3; + + // Long Running Operation was triggered by StartPaidService. + START_PAID_SERVICE = 5; + + // Long Running Operation was triggered by ActivateEntitlement. + ACTIVATE_ENTITLEMENT = 7; + + // Long Running Operation was triggered by SuspendEntitlement. + SUSPEND_ENTITLEMENT = 8; + + // Long Running Operation was triggered by CancelEntitlement. + CANCEL_ENTITLEMENT = 9; + + // Long Running Operation was triggered by TransferEntitlements. + TRANSFER_ENTITLEMENTS = 10; + + // Long Running Operation was triggered by TransferEntitlementsToGoogle. + TRANSFER_ENTITLEMENTS_TO_GOOGLE = 11; + + // Long Running Operation was triggered by ChangeOffer. + CHANGE_OFFER = 14; + + // Long Running Operation was triggered by ChangeParameters. + CHANGE_PARAMETERS = 15; + + // Long Running Operation was triggered by ProvisionCloudIdentity. + PROVISION_CLOUD_IDENTITY = 16; + } + + // The RPC that initiated this Long Running Operation. + OperationType operation_type = 1; +} diff --git a/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/products.proto b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/products.proto new file mode 100644 index 00000000..91422fc6 --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/products.proto @@ -0,0 +1,95 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.channel.v1; + +import "google/api/resource.proto"; +import "google/api/annotations.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel"; +option java_multiple_files = true; +option java_outer_classname = "ProductsProto"; +option java_package = "com.google.cloud.channel.v1"; + +// Type of media used. +enum MediaType { + // Not used. + MEDIA_TYPE_UNSPECIFIED = 0; + + // Type of image. + MEDIA_TYPE_IMAGE = 1; +} + +// A Product is the entity a customer uses when placing an order. For example, +// Google Workspace, Google Voice, etc. +message Product { + option (google.api.resource) = { + type: "cloudchannel.googleapis.com/Product" + pattern: "products/{product}" + }; + + // Resource Name of the Product. + // Format: products/{product_id} + string name = 1; + + // Marketing information for the product. + MarketingInfo marketing_info = 2; +} + +// Represents a product's purchasable Stock Keeping Unit (SKU). +// SKUs represent the different variations of the product. For example, Google +// Workspace Business Standard and Google Workspace Business Plus are Google +// Workspace product SKUs. +message Sku { + option (google.api.resource) = { + type: "cloudchannel.googleapis.com/Sku" + pattern: "products/{product}/skus/{sku}" + }; + + // Resource Name of the SKU. + // Format: products/{product_id}/skus/{sku_id} + string name = 1; + + // Marketing information for the SKU. + MarketingInfo marketing_info = 2; + + // Product the SKU is associated with. + Product product = 3; +} + +// Represents the marketing information for a Product, SKU or Offer. +message MarketingInfo { + // Human readable name. + string display_name = 1; + + // Human readable description. Description can contain HTML. + string description = 2; + + // Default logo. + Media default_logo = 3; +} + +// Represents media information. +message Media { + // Title of the media. + string title = 1; + + // URL of the media. + string content = 2; + + // Type of the media. + MediaType type = 3; +} diff --git a/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/service.proto b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/service.proto new file mode 100644 index 00000000..0ea59dba --- /dev/null +++ b/proto-google-cloud-channel-v1/src/main/proto/google/cloud/channel/v1/service.proto @@ -0,0 +1,1798 @@ +// Copyright 2020 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.channel.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/cloud/channel/v1/channel_partner_links.proto"; +import "google/cloud/channel/v1/common.proto"; +import "google/cloud/channel/v1/customers.proto"; +import "google/cloud/channel/v1/entitlements.proto"; +import "google/cloud/channel/v1/offers.proto"; +import "google/cloud/channel/v1/products.proto"; +import "google/longrunning/operations.proto"; +import "google/protobuf/empty.proto"; +import "google/protobuf/field_mask.proto"; + +option go_package = "google.golang.org/genproto/googleapis/cloud/channel/v1;channel"; +option java_multiple_files = true; +option java_outer_classname = "ServiceProto"; +option java_package = "com.google.cloud.channel.v1"; + +// CloudChannelService enables Google cloud resellers and distributors to manage +// their customers, channel partners, entitlements and reports. +// +// Using this service: +// 1. Resellers or distributors can manage a customer entity. +// 2. Distributors can register an authorized reseller in their channel and then +// enable delegated admin access for the reseller. +// 3. Resellers or distributors can manage entitlements for their customers. +// +// The service primarily exposes the following resources: +// - [Customer][google.cloud.channel.v1.Customer]s: A Customer represents an entity managed by a reseller or +// distributor. A customer typically represents an enterprise. In an n-tier +// resale channel hierarchy, customers are generally represented as leaf nodes. +// Customers primarily have an Entitlement sub-resource discussed below. +// +// - [Entitlement][google.cloud.channel.v1.Entitlement]s: An Entitlement represents an entity which provides a +// customer means to start using a service. Entitlements are created or updated +// as a result of a successful fulfillment. +// +// - [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s: A ChannelPartnerLink is an entity that identifies +// links between distributors and their indirect resellers in a channel. +service CloudChannelService { + option (google.api.default_host) = "cloudchannel.googleapis.com"; + option (google.api.oauth_scopes) = "https://www.googleapis.com/auth/apps.order"; + + // List downstream [Customer][google.cloud.channel.v1.Customer]s. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the reseller account making the request and the + // reseller account being queried for are different. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // + // Return Value: + //
List of [Customer][google.cloud.channel.v1.Customer]s pertaining to the reseller or empty list if + // there are none. + rpc ListCustomers(ListCustomersRequest) returns (ListCustomersResponse) { + option (google.api.http) = { + get: "/v1/{parent=accounts/*}/customers" + }; + } + + // Returns a requested [Customer][google.cloud.channel.v1.Customer] resource. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the reseller account making the request and the + // reseller account being queried for are different. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * NOT_FOUND: If the customer resource doesn't exist. Usually + // the result of an invalid name parameter. + // + // Return Value: + //
[Customer][google.cloud.channel.v1.Customer] resource if found, error otherwise. + rpc GetCustomer(GetCustomerRequest) returns (Customer) { + option (google.api.http) = { + get: "/v1/{name=accounts/*/customers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Confirms the existence of Cloud Identity accounts, based on the domain and + // whether the Cloud Identity accounts are owned by the reseller. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the reseller account making the request and the + // reseller account being queried for are different. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * INVALID_VALUE: Invalid domain value in the request. + // * NOT_FOUND: If there is no [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] customer + // for the domain specified in the request. + // + // Return Value: + //
List of [CloudIdentityCustomerAccount][google.cloud.channel.v1.CloudIdentityCustomerAccount] resources if any exist for + // the domain, otherwise an error is returned. + rpc CheckCloudIdentityAccountsExist(CheckCloudIdentityAccountsExistRequest) returns (CheckCloudIdentityAccountsExistResponse) { + option (google.api.http) = { + post: "/v1/{parent=accounts/*}:checkCloudIdentityAccountsExist" + body: "*" + }; + } + + // Creates a new [Customer][google.cloud.channel.v1.Customer] resource under the reseller or distributor + // account. + // + // Possible Error Codes: + //
    + //
  • PERMISSION_DENIED: If the reseller account making the request and the + // reseller account being queried for are different.
  • + //
  • INVALID_ARGUMENT: + //
      + //
    • Missing or invalid required parameters in the request.
    • + //
    • Domain field value doesn't match the domain specified in primary + // email.
    • + //
    + //
  • + //
+ // + // Return Value: + //
If successful, the newly created [Customer][google.cloud.channel.v1.Customer] resource, otherwise + // returns an error. + rpc CreateCustomer(CreateCustomerRequest) returns (Customer) { + option (google.api.http) = { + post: "/v1/{parent=accounts/*}/customers" + body: "customer" + }; + } + + // Updates an existing [Customer][google.cloud.channel.v1.Customer] resource belonging to the reseller or + // distributor. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the reseller account making the request and the + // reseller account being queried for are different. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name + // specified in the request. + // + // Return Value: + //
If successful, the updated [Customer][google.cloud.channel.v1.Customer] resource, otherwise returns + // an error. + rpc UpdateCustomer(UpdateCustomerRequest) returns (Customer) { + option (google.api.http) = { + patch: "/v1/{customer.name=accounts/*/customers/*}" + body: "customer" + }; + } + + // Deletes the given [Customer][google.cloud.channel.v1.Customer] permanently and irreversibly. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the account making the request does not own + // this customer. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * FAILED_PRECONDITION: If the customer has existing entitlements. + // * NOT_FOUND: No [Customer][google.cloud.channel.v1.Customer] resource found for the name + // specified in the request. + rpc DeleteCustomer(DeleteCustomerRequest) returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1/{name=accounts/*/customers/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Creates a Cloud Identity for the given customer using the customer's + // information or the information provided here, if present. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the request. + // * NOT_FOUND: If the customer is not found for the reseller. + // * ALREADY_EXISTS: If the customer's primary email already exists. In this + // case, retry after changing the customer's primary contact email. + // * INTERNAL: Any non-user error related to a technical issue in the + // backend. Contact Cloud Channel support in this case. + // * UNKNOWN: Any non-user error related to a technical issue in the backend. + // Contact Cloud Channel support in this case. + // + // Return Value: + //
Long Running Operation ID. + // + // To get the results of the operation, call the GetOperation method of + // CloudChannelOperationsService. The Operation metadata will contain an + // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + rpc ProvisionCloudIdentity(ProvisionCloudIdentityRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{customer=accounts/*/customers/*}:provisionCloudIdentity" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Customer" + metadata_type: "OperationMetadata" + }; + } + + // List [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to a customer. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the request. + // + // Return Value: + //
List of [Entitlement][google.cloud.channel.v1.Entitlement]s belonging to the customer, or empty list if + // there are none. + rpc ListEntitlements(ListEntitlementsRequest) returns (ListEntitlementsResponse) { + option (google.api.http) = { + get: "/v1/{parent=accounts/*/customers/*}/entitlements" + }; + } + + // List [TransferableSku][google.cloud.channel.v1.TransferableSku]s of a customer based on Cloud Identity ID or + // Customer Name in the request. + // + // This method is used when a reseller lists the entitlements + // information of a customer that is not owned. The reseller should provide + // the customer's Cloud Identity ID or Customer Name. + // + // Possible Error Codes: + //
    + //
  • PERMISSION_DENIED, due to one of the following reasons: + //
      + //
    • If the customer doesn't belong to the reseller and no auth token, + // or an invalid auth token is supplied.
    • If the reseller account + // making the request and the reseller account being queried for are + // different.
    • + //
    + //
  • + //
  • INVALID_ARGUMENT: Missing or invalid required parameters in the + // request.
  • + //
+ // + // Return Value: + //
List of [TransferableSku][google.cloud.channel.v1.TransferableSku] for the given customer. + rpc ListTransferableSkus(ListTransferableSkusRequest) returns (ListTransferableSkusResponse) { + option (google.api.http) = { + post: "/v1/{parent=accounts/*}:listTransferableSkus" + body: "*" + }; + } + + // List [TransferableOffer][google.cloud.channel.v1.TransferableOffer]s of a customer based on Cloud Identity ID or + // Customer Name in the request. + // + // This method is used when a reseller gets the entitlement + // information of a customer that is not owned. The reseller should provide + // the customer's Cloud Identity ID or Customer Name. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED, due to one of the following reasons: (a) If the + // customer doesn't belong to the reseller and no auth token or invalid auth + // token is supplied. (b) If the reseller account making the request and the + // reseller account being queried for are different. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // + // Return Value: + // List of [TransferableOffer][google.cloud.channel.v1.TransferableOffer] for the given customer and SKU. + rpc ListTransferableOffers(ListTransferableOffersRequest) returns (ListTransferableOffersResponse) { + option (google.api.http) = { + post: "/v1/{parent=accounts/*}:listTransferableOffers" + body: "*" + }; + } + + // Returns a requested [Entitlement][google.cloud.channel.v1.Entitlement] resource. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * NOT_FOUND: If the entitlement is not found for the customer. + // + // Return Value: + //
If found, the requested [Entitlement][google.cloud.channel.v1.Entitlement] resource, otherwise returns + // an error. + rpc GetEntitlement(GetEntitlementRequest) returns (Entitlement) { + option (google.api.http) = { + get: "/v1/{name=accounts/*/customers/*/entitlements/*}" + }; + } + + // Creates an entitlement for a customer. + // + // Possible Error Codes: + //
    + //
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + //
  • INVALID_ARGUMENT:
      + //
    • Missing or invalid required parameters in the request.
    • + //
    • Cannot purchase an entitlement if there is already an + // entitlement for customer, for a SKU from the same product family.
    • + //
    • INVALID_VALUE: Offer passed in isn't valid. Make sure OfferId is + // valid. If it is valid, then contact Google Channel support for further + // troubleshooting.
    • + //
    + //
  • + //
  • NOT_FOUND: If the customer or offer resource is not found for the + // reseller.
  • + //
  • ALREADY_EXISTS: This failure can happen in the following cases: + //
      + //
    • If the SKU has been already purchased for the customer.
    • + //
    • If the customer's primary email already exists. In this case retry + // after changing the customer's primary contact email. + //
    • + //
    + //
  • + //
  • CONDITION_NOT_MET or FAILED_PRECONDITION: This + // failure can happen in the following cases: + //
      + //
    • Purchasing a SKU that requires domain verification and the + // domain has not been verified.
    • + //
    • Purchasing an Add-On SKU like Vault or Drive without purchasing + // the pre-requisite SKU, such as Google Workspace Business Starter.
    • + //
    • Applicable only for developer accounts: reseller and resold + // domain. Must meet the following domain naming requirements: + //
        + //
      • Domain names must start with goog-test.
      • + //
      • Resold domain names must include the reseller domain.
      • + //
      + //
    • + //
    + //
  • + //
  • INTERNAL: Any non-user error related to a technical issue in the + // backend. Contact Cloud Channel Support in this case.
  • + //
  • UNKNOWN: Any non-user error related to a technical issue in the + // backend. Contact Cloud Channel Support in this case.
  • + //
+ // + // Return Value: + //
Long Running Operation ID. + // + // To get the results of the operation, call the GetOperation method of + // CloudChannelOperationsService. The Operation metadata will contain an + // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + rpc CreateEntitlement(CreateEntitlementRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=accounts/*/customers/*}/entitlements" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Entitlement" + metadata_type: "OperationMetadata" + }; + } + + // Change parameters of the entitlement + // + // An entitlement parameters update is a long-running operation and results in + // updates to the entitlement as a result of fulfillment. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. For example, if the number of seats being changed to is greater + // than the allowed number of max seats for the resource. Or decreasing seats + // for a commitment based plan. + // * NOT_FOUND: Entitlement resource not found. + // * INTERNAL: Any non-user error related to a technical issue + // in the backend. In this case, contact Cloud Channel support. + // * UNKNOWN: Any non-user error related to a technical issue in the backend. + // In this case, contact Cloud Channel support. + // + // Return Value: + //
Long Running Operation ID. + // + // To get the results of the operation, call the GetOperation method of + // CloudChannelOperationsService. The Operation metadata will contain an + // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + rpc ChangeParameters(ChangeParametersRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=accounts/*/customers/*/entitlements/*}:changeParameters" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Entitlement" + metadata_type: "OperationMetadata" + }; + } + + // Updates the renewal settings for an existing customer entitlement. + // + // An entitlement update is a long-running operation and results in updates to + // the entitlement as a result of fulfillment. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * NOT_FOUND: Entitlement resource not found. + // * NOT_COMMITMENT_PLAN: Renewal Settings are only applicable for a + // commitment plan. Can't enable or disable renewal for non-commitment plans. + // * INTERNAL: Any non user error related to a technical issue in the + // backend. In this case, contact Cloud Channel support. + // * UNKNOWN: Any non user error related to a technical issue in the backend. + // In this case, contact Cloud Channel support. + // + // Return Value: + //
Long Running Operation ID. + // + // To get the results of the operation, call the GetOperation method of + // CloudChannelOperationsService. The Operation metadata will contain an + // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + rpc ChangeRenewalSettings(ChangeRenewalSettingsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=accounts/*/customers/*/entitlements/*}:changeRenewalSettings" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Entitlement" + metadata_type: "OperationMetadata" + }; + } + + // Updates the Offer for an existing customer entitlement. + // + // An entitlement update is a long-running operation and results in updates to + // the entitlement as a result of fulfillment. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * NOT_FOUND: Offer or Entitlement resource not found. + // * INTERNAL: Any non-user error related to a technical issue in the backend. + // In this case, contact Cloud Channel support. + // * UNKNOWN: Any non-user error related to a technical issue in the backend. + // In this case, contact Cloud Channel support. + // + // Return Value: + //
Long Running Operation ID. + // + // To get the results of the operation, call the GetOperation method of + // CloudChannelOperationsService. The Operation metadata will contain an + // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + rpc ChangeOffer(ChangeOfferRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=accounts/*/customers/*/entitlements/*}:changeOffer" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Entitlement" + metadata_type: "OperationMetadata" + }; + } + + // Starts paid service for a trial entitlement. + // + // Starts paid service for a trial entitlement immediately. This method is + // only applicable if a plan has already been set up for a trial entitlement + // but has some trial days remaining. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * NOT_FOUND: Entitlement resource not found. + // * FAILED_PRECONDITION/NOT_IN_TRIAL: This method only works for + // entitlement on trial plans. + // * INTERNAL: Any non-user error related to a technical issue in the backend. + // In this case, contact Cloud Channel support. + // * UNKNOWN: Any non-user error related to a technical issue + // in the backend. In this case, contact Cloud Channel support. + // + // Return Value: + //
Long Running Operation ID. + // + // To get the results of the operation, call the GetOperation method of + // CloudChannelOperationsService. The Operation metadata will contain an + // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + rpc StartPaidService(StartPaidServiceRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=accounts/*/customers/*/entitlements/*}:startPaidService" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Entitlement" + metadata_type: "OperationMetadata" + }; + } + + // Suspends a previously fulfilled entitlement. + // An entitlement suspension is a long-running operation. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * NOT_FOUND: Entitlement resource not found. + // * NOT_ACTIVE: Entitlement is not active. + // * INTERNAL: Any non-user error related to a technical issue in the backend. + // In this case, contact Cloud Channel support. + // * UNKNOWN: Any non-user error related to a technical issue in the backend. + // In this case, contact Cloud Channel support. + // + // Return Value: + //
Long Running Operation ID. + // + // To get the results of the operation, call the GetOperation method of + // CloudChannelOperationsService. The Operation metadata will contain an + // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + rpc SuspendEntitlement(SuspendEntitlementRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=accounts/*/customers/*/entitlements/*}:suspend" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Entitlement" + metadata_type: "OperationMetadata" + }; + } + + // Cancels a previously fulfilled entitlement. + // An entitlement cancellation is a long-running operation. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller or + // if the reseller account making the request and reseller account being + // queried for are different. + // * FAILED_PRECONDITION: If there are any Google Cloud projects linked to the + // Google Cloud entitlement's Cloud Billing subaccount. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * NOT_FOUND: Entitlement resource not found. + // * DELETION_TYPE_NOT_ALLOWED: Cancel is only allowed for Google Workspace + // add-ons or entitlements for Google Cloud's development platform. + // * INTERNAL: Any non-user error related to a technical issue in the + // backend. In this case, contact Cloud Channel support. + // * UNKNOWN: Any non-user error related to a technical issue in the backend. + // In this case, contact Cloud Channel support. + // + // Return Value: + //
Long Running Operation ID. + // + // To get the results of the operation, call the GetOperation method of + // CloudChannelOperationsService. The response will contain + // google.protobuf.Empty on success. The Operation metadata will contain an + // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + rpc CancelEntitlement(CancelEntitlementRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=accounts/*/customers/*/entitlements/*}:cancel" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // Activates a previously suspended entitlement. The entitlement must be in a + // suspended state for it to be activated. Entitlements suspended for pending + // ToS acceptance can't be activated using this method. An entitlement + // activation is a long-running operation and can result in updates to + // the state of the customer entitlement. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller or + // if the reseller account making the request and reseller account being + // queried for are different. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * NOT_FOUND: Entitlement resource not found. + // * SUSPENSION_NOT_RESELLER_INITIATED: Can't activate an + // entitlement that is pending TOS acceptance. Only reseller initiated + // suspensions can be activated. + // * NOT_SUSPENDED: Can't activate entitlements that are already in ACTIVE + // state. Can only activate suspended entitlements. + // * INTERNAL: Any non-user error related to a technical issue + // in the backend. In this case, contact Cloud Channel support. + // * UNKNOWN: Any non-user error related to a technical issue in the backend. + // In this case, contact Cloud Channel support. + // + // Return Value: + //
Long Running Operation ID. + // + // To get the results of the operation, call the GetOperation method of + // CloudChannelOperationsService. The Operation metadata will contain an + // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + rpc ActivateEntitlement(ActivateEntitlementRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=accounts/*/customers/*/entitlements/*}:activate" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Entitlement" + metadata_type: "OperationMetadata" + }; + } + + // Transfers customer entitlements to new reseller. + // + // Possible Error Codes: + //
    + //
  • PERMISSION_DENIED: If the customer doesn't belong to the + // reseller.
  • INVALID_ARGUMENT: Missing or invalid required + // parameters in the request.
  • NOT_FOUND: If the customer or offer + // resource is not found for the reseller.
  • ALREADY_EXISTS: If the + // SKU has been already transferred for the customer.
  • + // CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in the + // following cases:
      + //
    • Transferring a SKU that requires domain verification and the + // domain has not been verified.
    • + //
    • Transferring an Add-On SKU like Vault or Drive without transferring + // the pre-requisite SKU, such as G Suite Basic
    • Applicable only for + // developer accounts: reseller and resold domain must follow the domain + // naming convention as follows: + //
        + //
      • Domain names must start with goog-test.
      • + //
      • Resold domain names must include the reseller domain.
      • + //
      + //
    • + //
    • All transferring entitlements must be specified.
    • + //
    + //
  • + //
  • INTERNAL: Any non-user error related to a technical issue in the + // backend. Please contact Cloud Channel Support in this case.
  • + //
  • UNKNOWN: Any non-user error related to a technical issue in the + // backend. Please contact Cloud Channel Support in this case.
  • + //
+ // + // Return Value: + //
Long Running Operation ID. + // + // To get the results of the operation, call the GetOperation method of + // CloudChannelOperationsService. The Operation metadata will contain an + // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + rpc TransferEntitlements(TransferEntitlementsRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=accounts/*/customers/*}:transferEntitlements" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "TransferEntitlementsResponse" + metadata_type: "OperationMetadata" + }; + } + + // Transfers customer entitlements from current reseller to Google. + // + // Possible Error Codes: + //
    + //
  • PERMISSION_DENIED: If the customer doesn't belong to the reseller. + //
  • INVALID_ARGUMENT: Missing or invalid required parameters in the + // request.
  • + //
  • NOT_FOUND: If the customer or offer resource is not found + // for the reseller.
  • + //
  • ALREADY_EXISTS: If the SKU has been already + // transferred for the customer.
  • + //
  • CONDITION_NOT_MET or FAILED_PRECONDITION: This failure can happen in + // the following cases: + //
      + //
    • Transferring a SKU that requires domain verification and the + // domain has not been verified.
    • + //
    • Transferring an Add-On SKU like Vault or Drive without purchasing + // the pre-requisite SKU, such as G Suite Basic
    • Applicable only for + // developer accounts: reseller and resold domain must follow the domain + // naming convention as follows: + //
        + //
      • Domain names must start with goog-test.
      • + //
      • Resold domain names must include the reseller domain.
      • + //
      + //
    • + //
    + //
  • + //
  • INTERNAL: Any non-user error related to a technical issue in the + // backend. Please contact Cloud Channel Support in this case.
  • + //
  • UNKNOWN: Any non-user error related to a technical issue in the + // backend. Please contact Cloud Channel Support in this case.
  • + //
+ // + // Return Value: + //
Long Running Operation ID. + // + // To get the results of the operation, call the GetOperation method of + // CloudChannelOperationsService. The response will contain + // google.protobuf.Empty on success. The Operation metadata will contain an + // instance of [OperationMetadata][google.cloud.channel.v1.OperationMetadata]. + rpc TransferEntitlementsToGoogle(TransferEntitlementsToGoogleRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=accounts/*/customers/*}:transferEntitlementsToGoogle" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "google.protobuf.Empty" + metadata_type: "OperationMetadata" + }; + } + + // List [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink]s belonging to a distributor. + // To call this method, you must be a distributor. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the reseller account making the request and the + // reseller account being queried for are different. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // + // Return Value: + //
If successful, returns the list of [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resources + // for the distributor account, otherwise returns an error. + rpc ListChannelPartnerLinks(ListChannelPartnerLinksRequest) returns (ListChannelPartnerLinksResponse) { + option (google.api.http) = { + get: "/v1/{parent=accounts/*}/channelPartnerLinks" + }; + } + + // Returns a requested [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource. + // To call this method, you must be a distributor. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the reseller account making the request and the + // reseller account being queried for are different. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * NOT_FOUND: ChannelPartnerLink resource not found. Results + // due invalid channel partner link name. + // + // Return Value: + //
[ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if found, otherwise returns an error. + rpc GetChannelPartnerLink(GetChannelPartnerLinkRequest) returns (ChannelPartnerLink) { + option (google.api.http) = { + get: "/v1/{name=accounts/*/channelPartnerLinks/*}" + }; + } + + // Initiates a channel partner link between a distributor and a reseller or + // between resellers in an n-tier reseller channel. + // To accept the invite, the invited partner should follow the invite_link_uri + // provided in the response. If the link creation is accepted, a valid link is + // set up between the two involved parties. + // To call this method, you must be a distributor. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the reseller account making the request and the + // reseller account being queried for are different. + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + // * ALREADY_EXISTS: If the ChannelPartnerLink sent in the request already + // exists. + // * NOT_FOUND: If no Cloud Identity customer exists for domain provided. + // * INTERNAL: Any non-user error related to a technical issue in the + // backend. In this case, contact Cloud Channel support. + // * UNKNOWN: Any non-user error related to a technical issue in + // the backend. In this case, contact Cloud Channel support. + // + // Return Value: + //
Newly created [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource if successful, + // otherwise error is returned. + rpc CreateChannelPartnerLink(CreateChannelPartnerLinkRequest) returns (ChannelPartnerLink) { + option (google.api.http) = { + post: "/v1/{parent=accounts/*}/channelPartnerLinks" + body: "channel_partner_link" + }; + } + + // Updates a channel partner link. A distributor calls this method to change a + // link's status. For example, suspend a partner link. + // To call this method, you must be a distributor. + // + // Possible Error Codes: + //
    + //
  • PERMISSION_DENIED: If the reseller account making the request and the + // reseller account being queried for are different.
  • + //
  • INVALID_ARGUMENT: + //
      + //
    • Missing or invalid required parameters in the request.
    • + //
    • Updating link state from invited to active or suspended.
    • + //
    • Sending reseller_cloud_identity_id, invite_url or name in update + // mask.
    • + //
    + //
  • + //
  • NOT_FOUND: ChannelPartnerLink resource not found.
  • + //
  • INTERNAL: Any non-user error related to a technical issue in the + // backend. In this case, contact Cloud Channel support.
  • + //
  • UNKNOWN: Any non-user error related to a technical issue in the + // backend. In this case, contact Cloud Channel support.
  • + //
+ // + // Return Value: + //
If successful, the updated [ChannelPartnerLink][google.cloud.channel.v1.ChannelPartnerLink] resource, otherwise + // returns an error. + rpc UpdateChannelPartnerLink(UpdateChannelPartnerLinkRequest) returns (ChannelPartnerLink) { + option (google.api.http) = { + patch: "/v1/{name=accounts/*/channelPartnerLinks/*}" + body: "*" + }; + } + + // Lists the Products the reseller is authorized to sell. + // + // Possible Error Codes: + // + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + rpc ListProducts(ListProductsRequest) returns (ListProductsResponse) { + option (google.api.http) = { + get: "/v1/products" + }; + } + + // Lists the SKUs for a product the reseller is authorized to sell. + // + // Possible Error Codes: + // + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + rpc ListSkus(ListSkusRequest) returns (ListSkusResponse) { + option (google.api.http) = { + get: "/v1/{parent=products/*}/skus" + }; + } + + // Lists the Offers the reseller can sell. + // + // Possible Error Codes: + // + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + rpc ListOffers(ListOffersRequest) returns (ListOffersResponse) { + option (google.api.http) = { + get: "/v1/{parent=accounts/*}/offers" + }; + } + + // Lists the Purchasable SKUs for following cases: + // + // * SKUs that can be newly purchased for a customer + // * SKUs that can be upgraded/downgraded to, for an entitlement. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + rpc ListPurchasableSkus(ListPurchasableSkusRequest) returns (ListPurchasableSkusResponse) { + option (google.api.http) = { + get: "/v1/{customer=accounts/*/customers/*}:listPurchasableSkus" + }; + } + + // Lists the Purchasable Offers for the following cases: + // + // * Offers that can be newly purchased for a customer + // * Offers that can be changed to, for an entitlement. + // + // Possible Error Codes: + // + // * PERMISSION_DENIED: If the customer doesn't belong to the reseller + // * INVALID_ARGUMENT: Missing or invalid required parameters in the + // request. + rpc ListPurchasableOffers(ListPurchasableOffersRequest) returns (ListPurchasableOffersResponse) { + option (google.api.http) = { + get: "/v1/{customer=accounts/*/customers/*}:listPurchasableOffers" + }; + } +} + +// Request message for [CloudChannelService.CheckCloudIdentityAccountsExist][google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist]. +message CheckCloudIdentityAccountsExistRequest { + // Required. The resource name of the reseller account. + // The parent takes the format: accounts/{account_id} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Domain for which the Cloud Identity account customer is fetched. + string domain = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Entity representing a Cloud Identity account which may or may not be +// associated with a Channel Services API partner. +message CloudIdentityCustomerAccount { + // True if a Cloud Identity account exists for a specific domain. + bool existing = 1; + + // True if the Cloud Identity account is associated with a customer + // belonging to the Channel Services partner making the API call. + bool owned = 2; + + // Name of the customer that owns the Cloud Identity account. This field is + // populated ONLY if owned = true. + // The customer_name takes the format: + // accounts/{account_id}/customers/{customer_id} + string customer_name = 3; + + // Cloud Identity ID of the customer. This field is populated ONLY if + // existing = true. + string customer_cloud_identity_id = 4; +} + +// Response message for +// [CloudChannelService.CheckCloudIdentityAccountsExist][google.cloud.channel.v1.CloudChannelService.CheckCloudIdentityAccountsExist]. +message CheckCloudIdentityAccountsExistResponse { + // The Cloud Identity accounts associated with the domain. + repeated CloudIdentityCustomerAccount cloud_identity_accounts = 1; +} + +// Request message for [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] +message ListCustomersRequest { + // Required. The resource name of the reseller account from which to list customers. + // The parent takes the format: accounts/{account_id}. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of customers to return. The service may return fewer + // than this value. If unspecified, at most 10 customers will be returned. The + // maximum value is 50; values about 50 will be coerced to 50. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results, if other than the first one. + // Typically obtained via + // [ListCustomersResponse.next_page_token][google.cloud.channel.v1.ListCustomersResponse.next_page_token] of the previous + // [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers] call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [CloudChannelService.ListCustomers][google.cloud.channel.v1.CloudChannelService.ListCustomers]. +message ListCustomersResponse { + // The customers belonging to the reseller or distributor. + repeated Customer customers = 1; + + // A token to retrieve the next page of results. + // Pass to [ListCustomersRequest.page_token][google.cloud.channel.v1.ListCustomersRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [CloudChannelService.GetCustomer][google.cloud.channel.v1.CloudChannelService.GetCustomer]. +message GetCustomerRequest { + // Required. The resource name of the customer to retrieve. + // The name takes the format: accounts/{account_id}/customers/{customer_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Customer" + } + ]; +} + +// Request message for [CloudChannelService.CreateCustomer][google.cloud.channel.v1.CloudChannelService.CreateCustomer] +message CreateCustomerRequest { + // Required. The resource name of reseller account in which to create the customer. + // The parent takes the format: accounts/{account_id} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The customer to create. + Customer customer = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [CloudChannelService.UpdateCustomer][google.cloud.channel.v1.CloudChannelService.UpdateCustomer]. +message UpdateCustomerRequest { + // Required. New contents of the customer. + Customer customer = 2 [(google.api.field_behavior) = REQUIRED]; + + // The update mask that applies to the resource. + // Optional. + google.protobuf.FieldMask update_mask = 3; +} + +// Request message for [CloudChannelService.DeleteCustomer][google.cloud.channel.v1.CloudChannelService.DeleteCustomer]. +message DeleteCustomerRequest { + // Required. The resource name of the customer to delete. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Customer" + } + ]; +} + +// Request message for [CloudChannelService.ProvisionCloudIdentity][google.cloud.channel.v1.CloudChannelService.ProvisionCloudIdentity] +message ProvisionCloudIdentityRequest { + // Required. Resource name of the customer. + // Format: accounts/{account_id}/customers/{customer_id} + string customer = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Customer" + } + ]; + + // CloudIdentity-specific customer information. + CloudIdentityInfo cloud_identity_info = 2; + + // Admin user information. + AdminUser user = 3; + + // If set, validate the request and preview the review, but do not actually + // post it. + bool validate_only = 4; +} + +// Request message for [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] +message ListEntitlementsRequest { + // Required. The resource name of the reseller's customer account for which to list + // entitlements. + // The parent takes the format: accounts/{account_id}/customers/{customer_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Customer" + } + ]; + + // Optional. Requested page size. Server might return fewer results than requested. + // If unspecified, at most 50 entitlements will be returned. + // The maximum value is 100; values above 100 will be coerced to 100. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results, if other than the first one. + // Typically obtained via + // [ListEntitlementsResponse.next_page_token][google.cloud.channel.v1.ListEntitlementsResponse.next_page_token] of the previous + // [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements] call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [CloudChannelService.ListEntitlements][google.cloud.channel.v1.CloudChannelService.ListEntitlements]. +message ListEntitlementsResponse { + // The entitlements belonging to the reseller's customer. + repeated Entitlement entitlements = 1; + + // A token to List next page of results. + // Pass to [ListEntitlementsRequest.page_token][google.cloud.channel.v1.ListEntitlementsRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] +message ListTransferableSkusRequest { + // Specifies the identity of transferred customer. + // Either a cloud_identity_id of the customer OR the customer name is + // required to look up transferable SKUs. + oneof transferred_customer_identity { + // Customer's Cloud Identity ID + string cloud_identity_id = 4; + + // A reseller is required to create a customer and use the resource name of + // the created customer here. + // The customer_name takes the format: + // accounts/{account_id}/customers/{customer_id} + string customer_name = 7; + } + + // Required. The resource name of the reseller's account. + // The parent takes the format: accounts/{account_id} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Requested page size. Server might return fewer results than requested. + // If unspecified, at most 100 SKUs will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + // Optional. + int32 page_size = 2; + + // A token identifying a page of results, if other than the first one. + // Typically obtained via + // [ListTransferableSkusResponse.next_page_token][google.cloud.channel.v1.ListTransferableSkusResponse.next_page_token] of the previous + // [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus] call. + // Optional. + string page_token = 3; + + // This token is generated by the Super Admin of the resold customer to + // authorize a reseller to access their Cloud Identity and purchase + // entitlements on their behalf. This token can be omitted once the + // authorization is generated. See https://support.google.com/a/answer/7643790 + // for more details. + string auth_token = 5; + + // The BCP-47 language code, such as "en-US". If specified, the + // response will be localized to the corresponding language code. Default is + // "en-US". + // Optional. + string language_code = 6; +} + +// Response message for [CloudChannelService.ListTransferableSkus][google.cloud.channel.v1.CloudChannelService.ListTransferableSkus]. +message ListTransferableSkusResponse { + // Information about existing SKUs for a customer that would need to be + // transferred. + repeated TransferableSku transferable_skus = 1; + + // A token to retrieve the next page of results. + // Pass to [ListTransferableSkusRequest.page_token][google.cloud.channel.v1.ListTransferableSkusRequest.page_token] to obtain + // that page. + string next_page_token = 2; +} + +// Request message for [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] +message ListTransferableOffersRequest { + // Specifies the identity of transferred customer. + // Either a cloud_identity_id of the customer OR the customer name is + // required to look up transferrable Offers. + oneof transferred_customer_identity { + // Customer's Cloud Identity ID + string cloud_identity_id = 4; + + // A reseller should create a customer and use the resource name of + // the created customer here. + string customer_name = 5; + } + + // Required. The resource name of the reseller's account. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Requested page size. Server might return fewer results than requested. + // If unspecified, at most 100 Offers will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2; + + // A token identifying a page of results, if other than the first one. + // Typically obtained via + // [ListTransferableOffersResponse.next_page_token][google.cloud.channel.v1.ListTransferableOffersResponse.next_page_token] of the previous + // [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers] call. + string page_token = 3; + + // Required. SKU for which the Offers are being looked up. + string sku = 6 [(google.api.field_behavior) = REQUIRED]; + + // The BCP-47 language code, such as "en-US". If specified, the + // response will be localized to the corresponding language code. Default is + // "en-US". + string language_code = 7; +} + +// Response message for [CloudChannelService.ListTransferableOffers][google.cloud.channel.v1.CloudChannelService.ListTransferableOffers]. +message ListTransferableOffersResponse { + // Information about Offers for a customer that can be used for + // transfer. + repeated TransferableOffer transferable_offers = 1; + + // A token to retrieve the next page of results. + // Pass to [ListTransferableOffersRequest.page_token][google.cloud.channel.v1.ListTransferableOffersRequest.page_token] to obtain + // that page. + string next_page_token = 2; +} + +// TransferableOffer represents an Offer that can be used in Transfer. +// Read-only. +message TransferableOffer { + // Offer with parameter constraints updated to allow the Transfer. + Offer offer = 1; +} + +// Request message for [CloudChannelService.GetEntitlement][google.cloud.channel.v1.CloudChannelService.GetEntitlement]. +message GetEntitlementRequest { + // Required. The resource name of the entitlement to retrieve. + // The name takes the format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Entitlement" + } + ]; +} + +// Request message for [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] +message ListChannelPartnerLinksRequest { + // Required. The resource name of the reseller account for listing channel partner + // links. + // The parent takes the format: accounts/{account_id} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Requested page size. Server might return fewer results than requested. + // If unspecified, server will pick a default size (25). + // The maximum value is 200, values above 200 will be coerced to 200. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results, if other than the first one. + // Typically obtained via + // [ListChannelPartnerLinksResponse.next_page_token][google.cloud.channel.v1.ListChannelPartnerLinksResponse.next_page_token] of the previous + // [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks] call. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The level of granularity the ChannelPartnerLink will display. + ChannelPartnerLinkView view = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [CloudChannelService.ListChannelPartnerLinks][google.cloud.channel.v1.CloudChannelService.ListChannelPartnerLinks]. +message ListChannelPartnerLinksResponse { + // The Channel partner links for a reseller. + repeated ChannelPartnerLink channel_partner_links = 1; + + // A token to retrieve the next page of results. + // Pass to [ListChannelPartnerLinksRequest.page_token][google.cloud.channel.v1.ListChannelPartnerLinksRequest.page_token] to obtain that page. + string next_page_token = 2; +} + +// Request message for [CloudChannelService.GetChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.GetChannelPartnerLink]. +message GetChannelPartnerLinkRequest { + // Required. The resource name of the channel partner link to retrieve. + // The name takes the format: accounts/{account_id}/channelPartnerLinks/{id} + // where {id} is the Cloud Identity ID of the partner. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The level of granularity the ChannelPartnerLink will display. + ChannelPartnerLinkView view = 2 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [CloudChannelService.CreateChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.CreateChannelPartnerLink] +message CreateChannelPartnerLinkRequest { + // Required. The resource name of reseller's account for which to create a channel + // partner link. + // The parent takes the format: accounts/{account_id} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The channel partner link to create. + // Either channel_partner_link.reseller_cloud_identity_id or domain can be + // used to create a link. + ChannelPartnerLink channel_partner_link = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The invited partner's domain. Either domain or + // channel_partner_link.reseller_cloud_identity_id can be used to create a + // link. + string domain = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [CloudChannelService.UpdateChannelPartnerLink][google.cloud.channel.v1.CloudChannelService.UpdateChannelPartnerLink] +message UpdateChannelPartnerLinkRequest { + // Required. The resource name of the channel partner link to cancel. + // The name takes the format: accounts/{account_id}/channelPartnerLinks/{id} + // where {id} is the Cloud Identity ID of the partner. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The channel partner link to update. Only field + // channel_partner_link.link_state is allowed to be updated. + ChannelPartnerLink channel_partner_link = 2 [(google.api.field_behavior) = REQUIRED]; + + // Required. The update mask that applies to the resource. + // The only allowable value for update mask is + // channel_partner_link.link_state. + google.protobuf.FieldMask update_mask = 3 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement] +message CreateEntitlementRequest { + // Required. The resource name of reseller's customer account in which to create the + // entitlement. + // The parent takes the format: accounts/{account_id}/customers/{customer_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Customer" + } + ]; + + // Required. The entitlement to create. + Entitlement entitlement = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server will know to ignore the + // request if it has already been completed. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same + // request ID, the server can check if the original operation with the same + // request ID was received, and if so, will ignore the second request. + // + // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + // with the exception that zero UUID is not supported + // (`00000000-0000-0000-0000-000000000000`). + string request_id = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements]. +message TransferEntitlementsRequest { + // Required. The resource name of reseller's customer account where the entitlements + // transfer to. + // The parent takes the format: accounts/{account_id}/customers/{customer_id} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The new entitlements to be created or transferred. + repeated Entitlement entitlements = 2 [(google.api.field_behavior) = REQUIRED]; + + // This token is generated by the Super Admin of the resold customer to + // authorize a reseller to access their Cloud Identity and purchase + // entitlements on their behalf. This token can be omitted once the + // authorization is generated. See https://support.google.com/a/answer/7643790 + // for more details. + string auth_token = 4; + + // Optional. An optional request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server will know to ignore the + // request if it has already been completed. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same + // request ID, the server can check if the original operation with the same + // request ID was received, and if so, will ignore the second request. + // + // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + // with the exception that zero UUID is not supported + // (`00000000-0000-0000-0000-000000000000`). + string request_id = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for [CloudChannelService.TransferEntitlements][google.cloud.channel.v1.CloudChannelService.TransferEntitlements]. +// This will be put into the response field of google.longrunning.Operation. +message TransferEntitlementsResponse { + // The entitlements that have been transferred. + repeated Entitlement entitlements = 1; +} + +// Request message for [CloudChannelService.TransferEntitlementsToGoogle][google.cloud.channel.v1.CloudChannelService.TransferEntitlementsToGoogle]. +message TransferEntitlementsToGoogleRequest { + // Required. The resource name of reseller's customer account where the entitlements + // transfer from. + // The parent takes the format: accounts/{account_id}/customers/{customer_id} + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The entitlements to be transferred to Google. + repeated Entitlement entitlements = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server will know to ignore the + // request if it has already been completed. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same + // request ID, the server can check if the original operation with the same + // request ID was received, and if so, will ignore the second request. + // + // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + // with the exception that zero UUID is not supported + // (`00000000-0000-0000-0000-000000000000`). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [CloudChannelService.ChangeParametersRequest][]. +message ChangeParametersRequest { + // Required. The name of the entitlement to update. + // The name takes the format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Entitlement parameters to update. Only editable parameters are allowed to + // be changed. + repeated Parameter parameters = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server will know to ignore the + // request if it has already been completed. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same + // request ID, the server can check if the original operation with the same + // request ID was received, and if so, will ignore the second request. + // + // The request ID must be + // a valid [UUID](https://tools.ietf.org/html/rfc4122) with the exception that + // zero UUID is not supported + // (`00000000-0000-0000-0000-000000000000`). + string request_id = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Purchase order ID provided by the reseller. + string purchase_order_id = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [CloudChannelService.ChangeRenewalSettings][google.cloud.channel.v1.CloudChannelService.ChangeRenewalSettings]. +message ChangeRenewalSettingsRequest { + // Required. The name of the entitlement to update. + // The name takes the format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. New renewal settings. + RenewalSettings renewal_settings = 4 [(google.api.field_behavior) = REQUIRED]; + + // Optional. A request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server will know to ignore the + // request if it has already been completed. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same + // request ID, the server can check if the original operation with the same + // request ID was received, and if so, will ignore the second request. + // + // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + // with the exception that zero UUID is not supported + // (`00000000-0000-0000-0000-000000000000`). + string request_id = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [CloudChannelService.ChangeOffer][google.cloud.channel.v1.CloudChannelService.ChangeOffer]. +message ChangeOfferRequest { + // Required. The name of the entitlement to update. + // Format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. New Offer. + // Format: accounts/{account_id}/offers/{offer_id}. + string offer = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Offer" + } + ]; + + // Optional. Parameters needed to purchase the Offer. + repeated Parameter parameters = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Purchase order id provided by the reseller. + string purchase_order_id = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server will know to ignore the + // request if it has already been completed. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same + // request ID, the server can check if the original operation with the same + // request ID was received, and if so, will ignore the second request. + // + // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + // with the exception that zero UUID is not supported + // (`00000000-0000-0000-0000-000000000000`). + string request_id = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [CloudChannelService.StartPaidService][google.cloud.channel.v1.CloudChannelService.StartPaidService]. +message StartPaidServiceRequest { + // Required. The name of the entitlement for which paid service is being started. + // The name takes the format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server will know to ignore the + // request if it has already been completed. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same + // request ID, the server can check if the original operation with the same + // request ID was received, and if so, will ignore the second request. + // + // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + // with the exception that zero UUID is not supported + // (`00000000-0000-0000-0000-000000000000`). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [CloudChannelService.CancelEntitlement][google.cloud.channel.v1.CloudChannelService.CancelEntitlement]. +message CancelEntitlementRequest { + // Required. The resource name of the entitlement to cancel. + // The name takes the format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server will know to ignore the + // request if it has already been completed. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same + // request ID, the server can check if the original operation with the same + // request ID was received, and if so, will ignore the second request. + // + // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + // with the exception that zero UUID is not supported + // (`00000000-0000-0000-0000-000000000000`). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [CloudChannelService.SuspendEntitlement][google.cloud.channel.v1.CloudChannelService.SuspendEntitlement]. +message SuspendEntitlementRequest { + // Required. The resource name of the entitlement to suspend. + // The name takes the format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server will know to ignore the + // request if it has already been completed. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same + // request ID, the server can check if the original operation with the same + // request ID was received, and if so, will ignore the second request. + // + // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + // with the exception that zero UUID is not supported + // (`00000000-0000-0000-0000-000000000000`). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for [CloudChannelService.ActivateEntitlement][google.cloud.channel.v1.CloudChannelService.ActivateEntitlement]. +message ActivateEntitlementRequest { + // Required. The resource name of the entitlement to activate. + // The name takes the format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. An optional request ID to identify requests. Specify a unique request ID so + // that if you must retry your request, the server will know to ignore the + // request if it has already been completed. + // + // For example, consider a situation where you make an initial request and + // the request times out. If you make the request again with the same + // request ID, the server can check if the original operation with the same + // request ID was received, and if so, will ignore the second request. + // + // The request ID must be a valid [UUID](https://tools.ietf.org/html/rfc4122) + // with the exception that zero UUID is not supported + // (`00000000-0000-0000-0000-000000000000`). + string request_id = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Request message for ListProducts. +message ListProductsRequest { + // Required. The resource name of the reseller account. + // Format: accounts/{account_id}. + string account = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Requested page size. Server might return fewer results than requested. + // If unspecified, at most 100 Products will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results, if other than the first one. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The BCP-47 language code, such as "en-US". If specified, the + // response will be localized to the corresponding language code. Default is + // "en-US". + string language_code = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListProducts. +message ListProductsResponse { + // List of Products requested. + repeated Product products = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; +} + +// Request message for ListSkus. +message ListSkusRequest { + // Required. The resource name of the Product for which to list SKUs. + // The parent takes the format: products/{product_id}. + // Supports products/- to retrieve SKUs for all products. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Product" + } + ]; + + // Required. Resource name of the reseller. + // Format: accounts/{account_id}. + string account = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Requested page size. Server might return fewer results than requested. + // If unspecified, at most 100 SKUs will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results, if other than the first one. + // Optional. + string page_token = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The BCP-47 language code, such as "en-US". If specified, the + // response will be localized to the corresponding language code. Default is + // "en-US". + string language_code = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListSkus. +message ListSkusResponse { + // The list of SKUs requested. + repeated Sku skus = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; +} + +// Request message for ListOffers. +message ListOffersRequest { + // Required. The resource name of the reseller account from which to list Offers. + // The parent takes the format: accounts/{account_id}. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Requested page size. Server might return fewer results than requested. + // If unspecified, at most 500 Offers will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results, if other than the first one. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The expression to filter results by name (name of + // the Offer), sku.name (name of the SKU) or sku.product.name (name of the + // Product). + // Example 1: sku.product.name=products/p1 AND sku.name!=products/p1/skus/s1 + // Example 2: name=accounts/a1/offers/o1 + string filter = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The BCP-47 language code, such as "en-US". If specified, the + // response will be localized to the corresponding language code. Default is + // "en-US". + string language_code = 5 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListOffers. +message ListOffersResponse { + // The list of Offers requested. + repeated Offer offers = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; +} + +// Request message for ListPurchasableSkus. +message ListPurchasableSkusRequest { + // List SKUs for a new entitlement. Make the purchase using + // [CloudChannelService.CreateEntitlement][google.cloud.channel.v1.CloudChannelService.CreateEntitlement]. + message CreateEntitlementPurchase { + // Required. List SKUs belonging to this Product. + // Format: products/{product_id}. + // Supports products/- to retrieve SKUs for all products. + string product = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // List SKUs for upgrading or downgrading an entitlement. Make the purchase + // using [CloudChannelService.ChangeOffer][google.cloud.channel.v1.CloudChannelService.ChangeOffer]. + message ChangeOfferPurchase { + // Change Type enum. + enum ChangeType { + // Not used. + CHANGE_TYPE_UNSPECIFIED = 0; + + // SKU is an upgrade on the current entitlement. + UPGRADE = 1; + + // SKU is a downgrade on the current entitlement. + DOWNGRADE = 2; + } + + // Required. Resource name of the entitlement. + // Format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} + string entitlement = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Change Type for the entitlement. + ChangeType change_type = 2 [(google.api.field_behavior) = REQUIRED]; + } + + // Purchase option for the request. Defines the purchase for which the SKUs + // are being listed. + oneof purchase_option { + // List SKUs for CreateEntitlement purchase. + CreateEntitlementPurchase create_entitlement_purchase = 2; + + // List SKUs for ChangeOffer purchase with a new SKU. + ChangeOfferPurchase change_offer_purchase = 3; + } + + // Required. The resource name of the customer for which to list SKUs. + // Format: accounts/{account_id}/customers/{customer_id}. + string customer = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Customer" + } + ]; + + // Optional. Requested page size. Server might return fewer results than requested. + // If unspecified, at most 100 SKUs will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results, if other than the first one. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The BCP-47 language code, such as "en-US". If specified, the + // response will be localized to the corresponding language code. Default is + // "en-US". + string language_code = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListPurchasableSkus. +message ListPurchasableSkusResponse { + // The list of SKUs requested. + repeated PurchasableSku purchasable_skus = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; +} + +// SKU that can be used for a puchase. This is used in ListPurchasableSku API +// response. +message PurchasableSku { + // SKU + Sku sku = 1; +} + +// Request message for ListPurchasableOffers. +message ListPurchasableOffersRequest { + // List Offers for CreateEntitlement purchase. + message CreateEntitlementPurchase { + // Required. SKU that the result should be restricted to. + // Format: products/{product_id}/skus/{sku_id}. + string sku = 1 [(google.api.field_behavior) = REQUIRED]; + } + + // List Offers for ChangeOffer purchase. + message ChangeOfferPurchase { + // Required. Resource name of the entitlement. + // Format: + // accounts/{account_id}/customers/{customer_id}/entitlements/{entitlement_id} + string entitlement = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Resource name of the SKU that is being changed to. Should be provided if + // upgrading or downgrading an entitlement. Format: + // products/{product_id}/skus/{sku_id} + string new_sku = 2 [(google.api.field_behavior) = OPTIONAL]; + } + + // Purchase option for the request. Defines the purchase for which the Offers + // are being listed. + oneof purchase_option { + // List Offers for CreateEntitlement purchase. + CreateEntitlementPurchase create_entitlement_purchase = 2; + + // List Offers for ChangeOffer purchase. + ChangeOfferPurchase change_offer_purchase = 3; + } + + // Required. The resource name of the customer for which to list Offers. + // Format: accounts/{account_id}/customers/{customer_id}. + string customer = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "cloudchannel.googleapis.com/Customer" + } + ]; + + // Optional. Requested page size. Server might return fewer results than requested. + // If unspecified, at most 100 Offers will be returned. + // The maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 4 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A token identifying a page of results, if other than the first one. + string page_token = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The BCP-47 language code, such as "en-US". If specified, the + // response will be localized to the corresponding language code. Default is + // "en-US". + string language_code = 6 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListPurchasableOffers. +message ListPurchasableOffersResponse { + // The list of Offers requested. + repeated PurchasableOffer purchasable_offers = 1; + + // A token to retrieve the next page of results. + string next_page_token = 2; +} + +// Offer that can be puchased for a customer. This is used in +// ListPurchasableOffer API response. +message PurchasableOffer { + // Offer. + Offer offer = 1; +} diff --git a/renovate.json b/renovate.json new file mode 100644 index 00000000..2dae14b9 --- /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-channel", + "^com.google.cloud:libraries-bom", + "^com.google.cloud.samples:shared-configuration" + ], + "semanticCommitType": "chore", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^junit:junit", + "^com.google.truth:truth", + "^org.mockito:mockito-core", + "^org.objenesis:objenesis" + ], + "semanticCommitType": "test", + "semanticCommitScope": "deps" + }, + { + "packagePatterns": [ + "^com.google.cloud:google-cloud-" + ], + "ignoreUnstable": false + }, + { + "packagePatterns": [ + "^com.fasterxml.jackson.core" + ], + "groupName": "jackson dependencies" + } + ], + "semanticCommits": true, + "masterIssue": true +} diff --git a/samples/install-without-bom/pom.xml b/samples/install-without-bom/pom.xml new file mode 100644 index 00000000..a120432d --- /dev/null +++ b/samples/install-without-bom/pom.xml @@ -0,0 +1,84 @@ + + + 4.0.0 + com.google.cloud + channel-install-without-bom + jar + Google Channel Services Install Without Bom + https://github.com/googleapis/java-channel + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + + com.google.cloud + google-cloud-channel + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + diff --git a/samples/pom.xml b/samples/pom.xml new file mode 100644 index 00000000..5a4f1e36 --- /dev/null +++ b/samples/pom.xml @@ -0,0 +1,56 @@ + + + 4.0.0 + com.google.cloud + google-cloud-channel-samples + 0.0.1-SNAPSHOT + pom + Google Channel Services Samples Parent + https://github.com/googleapis/java-channel + + Java idiomatic client for Google Cloud Platform services. + + + + + com.google.cloud.samples + shared-configuration + 1.0.18 + + + + 1.8 + 1.8 + UTF-8 + + + + install-without-bom + snapshot + snippets + + + + + + org.apache.maven.plugins + maven-deploy-plugin + 2.8.2 + + true + + + + org.sonatype.plugins + nexus-staging-maven-plugin + 1.6.8 + + true + + + + + diff --git a/samples/snapshot/pom.xml b/samples/snapshot/pom.xml new file mode 100644 index 00000000..1bf88f05 --- /dev/null +++ b/samples/snapshot/pom.xml @@ -0,0 +1,83 @@ + + + 4.0.0 + com.google.cloud + channel-snapshot + jar + Google Channel Services Snapshot Samples + https://github.com/googleapis/java-channel + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-channel + 0.0.0 + + + + + junit + junit + 4.13 + test + + + com.google.truth + truth + 1.0.1 + test + + + + + + + + org.codehaus.mojo + build-helper-maven-plugin + 3.1.0 + + + add-snippets-source + + add-source + + + + ../snippets/src/main/java + + + + + add-snippets-tests + + add-test-source + + + + ../snippets/src/test/java + + + + + + + + \ No newline at end of file diff --git a/samples/snippets/pom.xml b/samples/snippets/pom.xml new file mode 100644 index 00000000..4bb69c49 --- /dev/null +++ b/samples/snippets/pom.xml @@ -0,0 +1,47 @@ + + + 4.0.0 + com.google.cloud + channel-snippets + jar + Google Channel Services Snippets + https://github.com/googleapis/java-channel + + + + com.google.cloud.samples + shared-configuration + 1.0.12 + + + + 1.8 + 1.8 + UTF-8 + + + + + + com.google.cloud + google-cloud-channel + 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 00000000..d848a714 --- /dev/null +++ b/synth.metadata @@ -0,0 +1,37 @@ +{ + "sources": [ + { + "git": { + "name": ".", + "remote": "sso://devrel/cloud/libraries/java/repo-splitter", + "sha": "969e04ee2cb1154fa535e0f2104ad06d36d00667" + } + }, + { + "git": { + "name": "googleapis", + "remote": "https://github.com/googleapis/googleapis.git", + "sha": "f83715b48369c8d43548cc3cd84015e60be94cf2", + "internalRef": "352834280" + } + }, + { + "git": { + "name": "synthtool", + "remote": "https://github.com/googleapis/synthtool.git", + "sha": "b259489b06b25f399768b74b8baa943991f38ea7" + } + } + ], + "destinations": [ + { + "client": { + "source": "googleapis", + "apiName": "channel", + "apiVersion": "v1", + "language": "java", + "generator": "bazel" + } + } + ] +} \ No newline at end of file diff --git a/synth.py b/synth.py new file mode 100644 index 00000000..6f554745 --- /dev/null +++ b/synth.py @@ -0,0 +1,32 @@ +# Copyright 2020 Google LLC +# +# Licensed under the Apache License, Version 2.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 as s +import synthtool.gcp as gcp +import synthtool.languages.java as java + +service = 'channel' +versions = ['v1'] + +for version in versions: + java.bazel_library( + service=service, + version=version, + proto_path=f'google/cloud/{service}/{version}', + bazel_target=f'//google/cloud/{service}/{version}:google-cloud-{service}-{version}-java', + ) + +java.common_templates() \ No newline at end of file diff --git a/versions.txt b/versions.txt new file mode 100644 index 00000000..806e79c3 --- /dev/null +++ b/versions.txt @@ -0,0 +1,6 @@ +# Format: +# module:released-version:current-version + +google-cloud-channel:0.0.0:0.0.1-SNAPSHOT +proto-google-cloud-channel-v1:0.0.0:0.0.1-SNAPSHOT +grpc-google-cloud-channel-v1:0.0.0:0.0.1-SNAPSHOT \ No newline at end of file